@camstack/addon-matter-broker 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 +2933 -146
  2. package/dist/addon.mjs +2933 -146
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -13,7 +13,7 @@ let node_stream_promises = require("node:stream/promises");
13
13
  let node_net = require("node:net");
14
14
  let node_dgram = require("node:dgram");
15
15
  node_dgram = require_esm.__toESM(node_dgram, 1);
16
- //#region ../types/dist/event-category-Cv9dO26A.mjs
16
+ //#region ../types/dist/event-category-Bxo5yJjt.mjs
17
17
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
18
18
  EventCategory["SystemBoot"] = "system.boot";
19
19
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -220,6 +220,33 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
220
220
  EventCategory["PipelineCameraAssigned"] = "pipeline.camera-assigned";
221
221
  EventCategory["PipelineCameraUnassigned"] = "pipeline.camera-unassigned";
222
222
  /**
223
+ * A node the orchestrator would otherwise place cameras on has NO usable
224
+ * inference device: the operator enabled one or more accelerators there and
225
+ * the live probe reports every one of them unavailable. Emitted once per
226
+ * TRANSITION into that state (never per dispatch), and the node is dropped
227
+ * from the placement candidate set for as long as it holds.
228
+ *
229
+ * This exists because the state was previously invisible: little-unraid
230
+ * absorbed 283k inference errors in a day while still being handed cameras,
231
+ * and nothing in the system said so.
232
+ *
233
+ * A node with no accelerators configured at all is NOT this — its devices
234
+ * are `disabled`, not `unavailable`, and the runner's default CPU pool
235
+ * serves it exactly as before.
236
+ */
237
+ EventCategory["PipelineNodeInferenceUnavailable"] = "pipeline.node-inference-unavailable";
238
+ /**
239
+ * A camera has an OPEN detection session and has produced no detection at
240
+ * all for longer than the blind threshold — the camera is being decoded and
241
+ * inferred and is returning nothing. Emitted once per transition into blind,
242
+ * per camera.
243
+ *
244
+ * The failure it reports: a 1h43 detection blackout on the entrance camera
245
+ * that nobody noticed, because "a camera that detects nothing" and "a quiet
246
+ * camera" produce byte-identical silence.
247
+ */
248
+ EventCategory["PipelineDetectionBlind"] = "pipeline.detection-blind";
249
+ /**
223
250
  * Per-camera pipeline config was mutated by the orchestrator
224
251
  * (3-level settings change via `setAgentAddonDefaults` /
225
252
  * `setCameraStepToggle` / `setCameraPipelineForAgent` or a
@@ -10953,6 +10980,8 @@ var QueryFilterSchema = object({
10953
10980
  where: record(string$2(), unknown()).optional(),
10954
10981
  whereIn: record(string$2(), array(unknown())).optional(),
10955
10982
  whereBetween: record(string$2(), tuple([unknown(), unknown()])).optional(),
10983
+ /** NULL-safe exclusion: matches rows whose field is NULL OR != the value. */
10984
+ whereNot: record(string$2(), unknown()).optional(),
10956
10985
  orderBy: object({
10957
10986
  field: string$2(),
10958
10987
  direction: _enum(["asc", "desc"])
@@ -10972,7 +11001,8 @@ var QueryFilterSchema = object({
10972
11001
  var MutationFilterSchema = object({
10973
11002
  where: record(string$2(), unknown()).optional(),
10974
11003
  whereIn: record(string$2(), array(unknown())).optional(),
10975
- whereBetween: record(string$2(), tuple([unknown(), unknown()])).optional()
11004
+ whereBetween: record(string$2(), tuple([unknown(), unknown()])).optional(),
11005
+ whereNot: record(string$2(), unknown()).optional()
10976
11006
  });
10977
11007
  /** A single stored record: `{ id, data }`. */
10978
11008
  var SettingsRecordSchema = object({
@@ -12508,6 +12538,17 @@ var LlmImageSchema = object({
12508
12538
  bytes: _instanceof(Uint8Array),
12509
12539
  mimeType: string$2()
12510
12540
  });
12541
+ /**
12542
+ * Retry policy. `enabled: false` is NOT the same as `maxAttempts: 1` in intent —
12543
+ * the flag is what a consumer table flips, the count is what the operator tunes.
12544
+ * A retry doubles the wall time of a call, so the two gates that run inside a
12545
+ * notification's budget keep it off (see `CONSUMER_RETRY_POLICY` in addon-ai).
12546
+ */
12547
+ var LlmRetryPolicySchema = object({
12548
+ enabled: boolean().default(false),
12549
+ /** Total attempts INCLUDING the first. 1 = no retry. */
12550
+ maxAttempts: number().int().min(1).max(5).default(1)
12551
+ });
12511
12552
  var LlmGenerateBaseInputSchema = object({
12512
12553
  /** Collection routing (the notification-output posture). */
12513
12554
  addonId: string$2().optional(),
@@ -12522,7 +12563,28 @@ var LlmGenerateBaseInputSchema = object({
12522
12563
  jsonSchema: record(string$2(), unknown()).optional(),
12523
12564
  /** Per-call override of the profile default. */
12524
12565
  maxTokens: number().int().positive().optional(),
12525
- temperature: number().optional()
12566
+ temperature: number().optional(),
12567
+ /** Per-call override of the profile default (nucleus sampling). */
12568
+ topP: number().min(0).max(1).optional(),
12569
+ /** Per-call override of the profile default (top-k sampling). */
12570
+ topK: number().int().positive().optional(),
12571
+ /** Per-call override of `profile.timeoutMs` — the total generation bound. */
12572
+ timeoutMs: number().int().positive().optional(),
12573
+ /** Per-call override; beats both the consumer table and the profile. */
12574
+ retry: LlmRetryPolicySchema.optional(),
12575
+ /**
12576
+ * Caller-minted id that makes this generation CANCELLABLE.
12577
+ *
12578
+ * Without it a caller that stops waiting cannot stop the work: the gates race
12579
+ * the call against 8 s and free their own slot when the timer wins, while the
12580
+ * generation upstream keeps running to `profile.timeoutMs` — 60 s by default,
12581
+ * on a single-threaded local model. The per-camera bound then counts WAITS,
12582
+ * not generations, and the real load is unbounded.
12583
+ *
12584
+ * `AbortSignal` cannot cross a process boundary; an id can. Pass one here and
12585
+ * `llm.cancel({ requestId })` tears the socket down.
12586
+ */
12587
+ requestId: string$2().optional()
12526
12588
  });
12527
12589
  /**
12528
12590
  * `llm-runtime` — node-side managed llama.cpp executor (spec §4). Registered
@@ -12535,6 +12597,18 @@ var LlmGenerateBaseInputSchema = object({
12535
12597
  * Resource ceiling = llama-server flags + idleStopMinutes ONLY (no RSS
12536
12598
  * watchdog — operator decision #3).
12537
12599
  */
12600
+ /**
12601
+ * A companion artifact that MUST land beside the main GGUF: the `mmproj`
12602
+ * projector of a vision model, or shards 2..N of a split GGUF. Carried on the
12603
+ * REF rather than looked up at install time, so what the operator approved in
12604
+ * the preview is exactly what the node downloads.
12605
+ */
12606
+ var ManagedModelExtraFileSchema = object({
12607
+ url: string$2(),
12608
+ filename: string$2(),
12609
+ sizeBytes: number(),
12610
+ sha256: string$2().optional()
12611
+ });
12538
12612
  var ManagedModelRefSchema = discriminatedUnion("kind", [
12539
12613
  object({
12540
12614
  kind: literal("catalog"),
@@ -12543,7 +12617,11 @@ var ManagedModelRefSchema = discriminatedUnion("kind", [
12543
12617
  object({
12544
12618
  kind: literal("url"),
12545
12619
  url: string$2(),
12546
- sha256: string$2().optional()
12620
+ sha256: string$2().optional(),
12621
+ /** Picker/status label; the file basename when absent. */
12622
+ label: string$2().optional(),
12623
+ sizeBytes: number().optional(),
12624
+ extraFiles: array(ManagedModelExtraFileSchema).optional()
12547
12625
  }),
12548
12626
  object({
12549
12627
  kind: literal("path"),
@@ -12561,13 +12639,82 @@ var ManagedRuntimeConfigSchema = object({
12561
12639
  gpuLayers: number().int().default(0),
12562
12640
  /** Default: cpus-2, clamped ≥1 (resolved node-side). */
12563
12641
  threads: number().int().optional(),
12564
- /** Concurrent slots. */
12642
+ /** Concurrent slots (`--parallel`). */
12565
12643
  parallel: number().int().default(1),
12644
+ /** Logical batch size (`-b`). Larger = faster prompt ingest, more RAM. */
12645
+ batchSize: number().int().positive().optional(),
12646
+ /** Physical batch / micro-batch (`-ub`). */
12647
+ ubatchSize: number().int().positive().optional(),
12648
+ /**
12649
+ * `--flash-attn`. Cuts KV-cache memory on the backends that implement it and
12650
+ * is a no-op elsewhere, so it is offered rather than assumed.
12651
+ */
12652
+ flashAttention: boolean().default(false),
12653
+ /**
12654
+ * `--mlock`. Pins the weights in RAM so the OS cannot page them out mid
12655
+ * inference. Costs the full model size in resident memory — which is exactly
12656
+ * what the RAM budget is counting.
12657
+ */
12658
+ mlock: boolean().default(false),
12659
+ /**
12660
+ * `--no-mmap`. Reads the whole GGUF up front instead of mapping it. Slower to
12661
+ * start, but avoids the page-fault stalls a network or spinning-disk model
12662
+ * store produces on every first token.
12663
+ */
12664
+ noMmap: boolean().default(false),
12665
+ /** `--cache-type-k` / `--cache-type-v` — quantising the KV cache is the
12666
+ * cheapest way to fit a longer context in the same RAM. */
12667
+ cacheTypeK: _enum([
12668
+ "f32",
12669
+ "f16",
12670
+ "q8_0",
12671
+ "q5_1",
12672
+ "q5_0",
12673
+ "q4_1",
12674
+ "q4_0"
12675
+ ]).optional(),
12676
+ cacheTypeV: _enum([
12677
+ "f32",
12678
+ "f16",
12679
+ "q8_0",
12680
+ "q5_1",
12681
+ "q5_0",
12682
+ "q4_1",
12683
+ "q4_0"
12684
+ ]).optional(),
12685
+ /**
12686
+ * Escape hatch for llama-server flags this schema does NOT model — `--jinja`
12687
+ * (which most vision chat templates need and some language-only models
12688
+ * dislike), `--cont-batching`, `--rope-scaling`, …
12689
+ *
12690
+ * It is NOT a second place to set the flags above. A token that collides
12691
+ * with a typed field is REJECTED at start, naming the field that owns it
12692
+ * (`assertNoOwnedFlags`), because two knobs writing the same argv is exactly
12693
+ * the "two switches that disagree" failure this repo has already shipped
12694
+ * twice (D62).
12695
+ */
12696
+ extraArgs: array(string$2()).default([]),
12566
12697
  /** Else lazy: first generate boots it. */
12567
12698
  autoStart: boolean().default(false),
12568
12699
  /** 0 = never; frees RAM after quiet periods. */
12569
12700
  idleStopMinutes: number().int().default(30)
12570
12701
  });
12702
+ /**
12703
+ * Where a multi-GB install currently is. A single 0..1 fraction cannot answer
12704
+ * "is it stuck?" for an install that is three files (shards + mmproj) followed
12705
+ * by a sha256 pass over 22 GB — during which the fraction sat at 1.0 and the
12706
+ * node looked hung. Phase + file + bytes is the smallest shape that does.
12707
+ */
12708
+ var LlmDownloadProgressSchema = object({
12709
+ phase: _enum(["downloading", "verifying"]),
12710
+ /** The artifact currently moving, e.g. `mmproj-F16.gguf`. */
12711
+ file: string$2(),
12712
+ fileIndex: number().int(),
12713
+ fileCount: number().int(),
12714
+ /** Across the WHOLE install, not the current file. */
12715
+ downloadedBytes: number(),
12716
+ totalBytes: number().optional()
12717
+ });
12571
12718
  var LlmRuntimeStatusSchema = object({
12572
12719
  /** Status is ALWAYS node-qualified. */
12573
12720
  nodeId: string$2(),
@@ -12584,6 +12731,8 @@ var LlmRuntimeStatusSchema = object({
12584
12731
  modelPath: string$2().optional(),
12585
12732
  modelId: string$2().optional(),
12586
12733
  downloadProgress: number().min(0).max(1).optional(),
12734
+ /** Detail behind `downloadProgress`; present for the same lifetime. */
12735
+ download: LlmDownloadProgressSchema.optional(),
12587
12736
  lastError: string$2().optional(),
12588
12737
  crashesInWindow: number(),
12589
12738
  /** Child RSS (sampled best-effort). */
@@ -12594,7 +12743,14 @@ var LlmNodeModelSchema = object({
12594
12743
  file: string$2(),
12595
12744
  sizeBytes: number(),
12596
12745
  catalogId: string$2().optional(),
12597
- installedAt: number().optional()
12746
+ installedAt: number().optional(),
12747
+ /**
12748
+ * Absolute path on the node. Present so a file that is on disk but matches
12749
+ * no catalog entry — a custom Hugging Face install, or a GGUF the operator
12750
+ * copied in by hand — is still SELECTABLE, as a `{kind:'path'}` ref. Without
12751
+ * it the picker could list such a file and do nothing with it.
12752
+ */
12753
+ path: string$2().optional()
12598
12754
  });
12599
12755
  var LlmRuntimeDiskUsageSchema = object({
12600
12756
  nodeId: string$2(),
@@ -12650,10 +12806,47 @@ var LlmProfileSchema = object({
12650
12806
  baseUrl: string$2().optional(),
12651
12807
  /** ConfigUISchema type:'password' — never round-trips (spec §5). */
12652
12808
  apiKey: string$2().optional(),
12809
+ /** Vision on/off. A vision call against a `false` profile is REFUSED, never
12810
+ * degraded to text — that shipped once and produced a confident answer to a
12811
+ * question about a picture nobody sent. */
12653
12812
  supportsVision: boolean(),
12654
12813
  temperature: number().min(0).max(2).optional(),
12814
+ /** Nucleus sampling. Every wire we speak has it. */
12815
+ topP: number().min(0).max(1).optional(),
12816
+ /** Top-k sampling. Carried only by the wires that have it — NEITHER OpenAI
12817
+ * wire does, and the client drops it there (measured: the request body gets
12818
+ * `top_p` and no `top_k`). The profile editor hides the field wherever it
12819
+ * would change nothing; `KINDS_WITH_TOP_K` is the single owner of that list. */
12820
+ topK: number().int().positive().optional(),
12655
12821
  maxTokens: number().int().positive().optional(),
12822
+ /** Prompt context window. Advisory for cloud kinds (they enforce their own);
12823
+ * for `managed-local` it is the llama.cpp `--ctx-size` the runtime starts
12824
+ * the model with, so it is the one field that changes a PROCESS. */
12825
+ contextLength: number().int().positive().optional(),
12826
+ /** Default system prompt. A caller's `system` REPLACES it (never appends —
12827
+ * two system prompts fighting is worse than either alone). */
12828
+ systemPrompt: string$2().optional(),
12829
+ /** Total generation bound — the only one a unary call has. */
12656
12830
  timeoutMs: number().int().positive().default(6e4),
12831
+ /** The TCP handshake only — "is the port even open". NOT the wait for
12832
+ * response headers: on the LM Studio / llama-server wire those are written
12833
+ * once the model has finished loading, so they belong to the bound below. */
12834
+ connectTimeoutMs: number().int().positive().default(1e4),
12835
+ /** Accepted, but no output yet — response headers included, because a cold
12836
+ * GPU load is exactly what happens before them. */
12837
+ firstTokenTimeoutMs: number().int().positive().default(12e4),
12838
+ /** Output started then stopped. */
12839
+ idleTimeoutMs: number().int().positive().default(6e4),
12840
+ /** Profile-level default. The per-consumer table and a per-call override
12841
+ * both beat it — see `resolveRetryPolicy`. */
12842
+ retry: LlmRetryPolicySchema.default({
12843
+ enabled: false,
12844
+ maxAttempts: 1
12845
+ }),
12846
+ /** Whether this profile may use tools. The tool-call plumbing rides the
12847
+ * library; the REGISTRY of callable tools is ours and is empty in v1, so a
12848
+ * `true` here buys the wiring, not behaviour, until tools are registered. */
12849
+ toolsEnabled: boolean().default(false),
12657
12850
  extraHeaders: record(string$2(), string$2()).optional(),
12658
12851
  /** kind === 'managed-local' only (spec §4). */
12659
12852
  runtime: ManagedRuntimeConfigSchema.optional()
@@ -12703,6 +12896,36 @@ var ManagedModelCatalogEntrySchema = object({
12703
12896
  /** Vision models: companion projector file. */
12704
12897
  mmprojUrl: string$2().optional()
12705
12898
  });
12899
+ /**
12900
+ * The outcome of turning one operator-typed Hugging Face reference into a
12901
+ * download plan. A RESULT, never a throw: "this repo has 24 quantizations and
12902
+ * I will not pick for you" is a normal answer the UI has to render, not an
12903
+ * exception.
12904
+ *
12905
+ * `candidates` is the whole reason the refusal is usable — every string in it
12906
+ * is a tag that resolves when pasted back as `<org>/<repo>:<TAG>`.
12907
+ */
12908
+ var HfModelResolutionSchema = discriminatedUnion("ok", [object({
12909
+ ok: literal(true),
12910
+ /** Ready to hand to `installModel` unchanged. */
12911
+ model: ManagedModelRefSchema,
12912
+ label: string$2(),
12913
+ repo: string$2(),
12914
+ quantization: string$2(),
12915
+ purpose: _enum(["text", "vision"]),
12916
+ totalBytes: number(),
12917
+ /** mmproj + shards, for the preview: an operator approving 23 GB should
12918
+ * see that 0.9 GB of it is a projector they did not name. */
12919
+ extraFilenames: array(string$2())
12920
+ }), object({
12921
+ ok: literal(false),
12922
+ code: string$2(),
12923
+ message: string$2(),
12924
+ candidates: array(string$2()).optional(),
12925
+ /** Set when the refusal was only the ceiling: re-calling with
12926
+ * `maxBytes: requiredBytes` is the operator's explicit override. */
12927
+ requiredBytes: number().optional()
12928
+ })]);
12706
12929
  var LlmRuntimeNodeSchema = object({
12707
12930
  nodeId: string$2(),
12708
12931
  reachable: boolean(),
@@ -12715,7 +12938,10 @@ var ProfileRefInputSchema = object({
12715
12938
  addonId: string$2(),
12716
12939
  profileId: string$2()
12717
12940
  });
12718
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
12941
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
12942
+ addonId: string$2().optional(),
12943
+ requestId: string$2()
12944
+ }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
12719
12945
  kind: "mutation",
12720
12946
  auth: "admin"
12721
12947
  }), method(ProfileRefInputSchema, _void(), {
@@ -12736,6 +12962,15 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
12736
12962
  consumer: string$2().optional(),
12737
12963
  profileId: string$2().optional()
12738
12964
  }), array(LlmUsageRollupSchema)), method(object({}), array(ManagedModelCatalogEntrySchema)), method(object({}), array(LlmRuntimeNodeSchema)), method(object({ nodeId: string$2() }), array(LlmNodeModelSchema)), method(object({
12965
+ /** `https://huggingface.co/<org>/<repo>/resolve/main/<f>.gguf`,
12966
+ * `<org>/<repo>/<f>.gguf`, `<org>/<repo>` or `<org>/<repo>:<QUANT>`. */
12967
+ ref: string$2(),
12968
+ /** Explicit ceiling override, in bytes. Absent = the built-in ceiling. */
12969
+ maxBytes: number().positive().optional()
12970
+ }), HfModelResolutionSchema, {
12971
+ kind: "mutation",
12972
+ auth: "admin"
12973
+ }), method(object({
12739
12974
  nodeId: string$2(),
12740
12975
  model: ManagedModelRefSchema
12741
12976
  }), _void(), {
@@ -13295,11 +13530,33 @@ var NotificationFormatSchema = _enum([
13295
13530
  * Named by INTENT, never by glyph. "check" would tie the vocabulary to one
13296
13531
  * renderer's icon set; "acknowledge" survives an adapter that draws it
13297
13532
  * differently.
13533
+ *
13534
+ * ── A TOKEN IS NOT A WIRE VALUE ─────────────────────────────────────
13535
+ *
13536
+ * These names are for US. **No adapter may forward one verbatim.** Each maps
13537
+ * the whole set onto its own renderer's vocabulary through a
13538
+ * `Record<NotificationActionIcon, string>` — a Record, never a lookup with a
13539
+ * fallback, so adding a member here fails every adapter's build until someone
13540
+ * decides its glyph, which is the only place that decision can be made
13541
+ * honestly.
13542
+ *
13543
+ * This paragraph is the bug. Zentik declared `actionIcons: true` and passed
13544
+ * `disarm` straight through; iOS feeds that string to
13545
+ * `UNNotificationActionIcon(systemImageName:)`, `disarm` is not an SF Symbol,
13546
+ * and every snooze and alarm button arrived BLANK. A pass-through is not a
13547
+ * mapping, and "the field is documented" is not "the value renders".
13548
+ *
13549
+ * Adding a member is TRAIN-BOUND. The enum lives in the published
13550
+ * `@camstack/server` closure and the cap seam validates against the HUB's copy,
13551
+ * so an addon that emits a token the running hub does not know does not lose an
13552
+ * icon — its whole `send` fails Zod validation and the notification never
13553
+ * arrives. Never emit a new token from an addon before the train carrying it.
13298
13554
  */
13299
13555
  var NotificationActionIconSchema = _enum([
13300
13556
  "acknowledge",
13301
13557
  "dismiss",
13302
13558
  "silence",
13559
+ "snooze",
13303
13560
  "view",
13304
13561
  "play",
13305
13562
  "open",
@@ -13307,9 +13564,13 @@ var NotificationActionIconSchema = _enum([
13307
13564
  "lock",
13308
13565
  "unlock",
13309
13566
  "arm",
13567
+ "arm-home",
13568
+ "arm-away",
13569
+ "arm-night",
13310
13570
  "disarm",
13311
13571
  "light",
13312
- "alert"
13572
+ "alert",
13573
+ "camera"
13313
13574
  ]);
13314
13575
  /** A single tap-through action button. */
13315
13576
  var NotificationActionSchema = object({
@@ -13509,6 +13770,24 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
13509
13770
  targetId: string$2(),
13510
13771
  enabled: boolean()
13511
13772
  }), _void(), { kind: "mutation" });
13773
+ new Set([
13774
+ {
13775
+ id: "person",
13776
+ name: "Person"
13777
+ },
13778
+ {
13779
+ id: "vehicle",
13780
+ name: "Vehicle"
13781
+ },
13782
+ {
13783
+ id: "animal",
13784
+ name: "Animal"
13785
+ },
13786
+ {
13787
+ id: "package",
13788
+ name: "Package"
13789
+ }
13790
+ ].map((l) => l.id));
13512
13791
  var COCO_TO_MACRO = {
13513
13792
  mapping: {
13514
13793
  person: "person",
@@ -14339,11 +14618,15 @@ var NcSystemEventKindSchema = _enum([
14339
14618
  "stream-offline",
14340
14619
  "node-online",
14341
14620
  "node-offline",
14621
+ "node-inference-unavailable",
14622
+ "detection-blind",
14342
14623
  "addon-update-available",
14343
14624
  "server-update-available",
14344
14625
  "alarm-triggered",
14345
14626
  "alarm-armed",
14346
14627
  "alarm-disarmed",
14628
+ "alarm-arming",
14629
+ "alarm-arm-refused",
14347
14630
  "camera-online",
14348
14631
  "camera-offline",
14349
14632
  "camera-disabled",
@@ -14398,7 +14681,16 @@ var NcScheduleSchema = object({
14398
14681
  });
14399
14682
  /** Fuzzy plate matcher — OCR noise makes exact match useless (spec row 12/13). */
14400
14683
  var NcPlateMatcherSchema = object({
14401
- values: array(string$2().min(1)).min(1),
14684
+ /**
14685
+ * Plate texts (or gallery vehicle names) to match. EMPTY = **any plate the
14686
+ * pipeline could read** — the plate half of "no selection = no narrowing",
14687
+ * and the switch that says this rule is about vehicles that were IDENTIFIED
14688
+ * rather than merely seen. A subject carrying no plate still fails.
14689
+ *
14690
+ * The `.min(1)` this used to carry made that state unauthorable; nothing has
14691
+ * ever persisted an empty list, so widening it cannot change an existing rule.
14692
+ */
14693
+ values: array(string$2().min(1)),
14402
14694
  /** Max Levenshtein distance after normalization (uppercase alphanumeric). */
14403
14695
  maxDistance: number().int().min(0).max(3).default(1)
14404
14696
  });
@@ -14432,28 +14724,36 @@ var NcOccupancyConditionSchema = object({
14432
14724
  /**
14433
14725
  * Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
14434
14726
  *
14435
- * Operator-approved vocabulary (2026-08-12, option A — the same one the
14436
- * reference notifier uses, so an operator moving between them re-uses what
14437
- * they already know): a rule matches when, over a sampling window of
14438
- * `samplingSeconds`, at least `hitPercent`% of the audio samples in that
14439
- * window are HITS. A sample is a hit when it satisfies BOTH present filters:
14727
+ * **TWO EXCLUSIVE MODES** (operator decision 2026-08-14, D157). Which one a
14728
+ * rule is in is not a stored field — it is WHICH FILTER the rule carries, so
14729
+ * there is no second switch that can disagree with the first and every rule
14730
+ * authored before the decision migrates for free (`audioModeOf`):
14440
14731
  *
14441
- * - `dbThreshold` — its level is at or above this many dBFS (see
14442
- * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
14443
- * - `labels` — the classifier put at least one of these labels on it.
14732
+ * - **LABEL mode — `labels` present.** The rule fires on the FIRST frame the
14733
+ * classifier labels with one of them. No window, no percentage:
14734
+ * `hitPercent` and `samplingSeconds` are ignored, and the rule's own
14735
+ * `throttle` cooldown is the only brake. The per-label confidence floor is
14736
+ * the analyzer's (`classificationMinScore`, per device) — a label only
14737
+ * reaches this condition if the classifier was already confident enough.
14738
+ * - **LEVEL mode — `dbThreshold` present, no labels.** The sampling window IS
14739
+ * the condition: at least `hitPercent`% of the samples over
14740
+ * `samplingSeconds` must be at or above `dbThreshold` dBFS (see
14741
+ * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale). The window
14742
+ * must be FULL before it can match — a window open for two of its ten
14743
+ * seconds is 100% of nothing.
14444
14744
  *
14445
- * Both are OPTIONAL and independent, which is the point of the shape: a
14446
- * loudness rule ("something loud at 3am") needs no model to be right, and a
14447
- * label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
14448
- * is given** — a window in which every sample is trivially a hit would fire on
14449
- * silence, so the engine refuses such a condition rather than notifying on
14450
- * nothing (the schema cannot express "at least one of" without becoming a
14451
- * ZodEffects the cap path would have to special-case).
14745
+ * **Why label mode has no window.** It had one, and it never fired: the
14746
+ * analyzer emits ~1 audio frame per second but YAMNet only LABELS one to three
14747
+ * of them per episode, even through continuous crying. The measured maximum
14748
+ * `hitPercent` over the whole live history was 40 — under the shipped default
14749
+ * of 60, so a label rule could not fire at all, ever. A percentage of frames is
14750
+ * the wrong question to ask of a sparse classifier.
14452
14751
  *
14453
- * `hitPercent` is over the samples the window actually HOLDS, and the window
14454
- * must be FULL before it can match — a window that has been open for two
14455
- * seconds of its ten is 100% of nothing, and firing on it would make
14456
- * `samplingSeconds` decorative.
14752
+ * **Fail-closed when NEITHER is given** — every sample would be a trivial hit
14753
+ * and the rule would fire on silence. The schema cannot express "exactly one
14754
+ * of" without becoming a ZodEffects the cap path would have to special-case, so
14755
+ * the exclusivity is enforced where every editor writes (`patchAudio`) and a
14756
+ * legacy rule carrying both resolves to LABEL (the mode that fires).
14457
14757
  *
14458
14758
  * Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
14459
14759
  * `audio-*` ids). Both spellings are accepted — the matcher normalizes the
@@ -14461,13 +14761,13 @@ var NcOccupancyConditionSchema = object({
14461
14761
  * an operator who typed `dog` mean the same thing.
14462
14762
  */
14463
14763
  var NcAudioConditionSchema = object({
14464
- /** Audio macro labels; absent = any sound (level-only rule). */
14764
+ /** LABEL MODE: audio macro labels. Present ⇒ fires on the first labelled frame. */
14465
14765
  labels: array(string$2().min(1)).min(1).optional(),
14466
- /** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
14766
+ /** LEVEL MODE: floor in dBFS (negative-going, `0` = full scale). */
14467
14767
  dbThreshold: number().min(-96).max(0).optional(),
14468
- /** Percentage of the window's samples that must be hits (1–100). */
14768
+ /** LEVEL MODE ONLY: percentage of the window's samples that must be hits (1–100). */
14469
14769
  hitPercent: number().int().min(1).max(100).default(60),
14470
- /** Length of the sampling window in seconds. */
14770
+ /** LEVEL MODE ONLY: length of the sampling window in seconds. */
14471
14771
  samplingSeconds: number().int().min(1).max(300).default(10)
14472
14772
  });
14473
14773
  /**
@@ -14605,13 +14905,81 @@ var NcRuleActionsSchema = object({
14605
14905
  */
14606
14906
  buttons: array(NcRuleNotificationButtonSchema).max(8).optional()
14607
14907
  });
14908
+ /**
14909
+ * "This rule applies only while `deviceId` is in one of `states`."
14910
+ *
14911
+ * The states are the DEVICE's own vocabulary — `AlarmState` for a panel,
14912
+ * `on`/`off` for a switch — not a normalised set, because normalising would
14913
+ * make the condition lie about devices whose states have no equivalent.
14914
+ *
14915
+ * An unreadable state does NOT match: see the engine's fail-closed gate. A
14916
+ * condition that fired on "I could not read it" would be worse than no gate.
14917
+ */
14918
+ var NcDeviceStateConditionSchema = object({
14919
+ deviceId: number().int(),
14920
+ /** Any of these matches. */
14921
+ states: array(string$2().min(1)).min(1)
14922
+ });
14923
+ /**
14924
+ * "This rule applies only while scene `sceneId` is `matched` / `diverged`."
14925
+ *
14926
+ * A GATE, not a trigger. `occupancy` and `audio` each DISCRIMINATE their rule —
14927
+ * carrying one makes the rule fire on that subject and nothing else. Scene is
14928
+ * the other shape entirely, the `deviceState` shape: it narrows a rule that
14929
+ * already has a trigger ("tell me about a person at the front door, but only
14930
+ * while the bin is still out"). That is why it composes with every delivery
14931
+ * instead of owning one, and why no new `NcDelivery` member and no new subject
14932
+ * kind exist for it — see D159.
14933
+ *
14934
+ * ── Identity ───────────────────────────────────────────────────────────────
14935
+ * `sceneId` is `SceneMonitor.id`, a `randomUUID()` minted by `createScene` —
14936
+ * globally unique, so it needs no device to disambiguate it. `deviceId` is
14937
+ * carried as a HINT for the editor and for the log line, never as part of the
14938
+ * lookup key: a rule whose hint drifted must still gate correctly.
14939
+ *
14940
+ * ── Which boolean ──────────────────────────────────────────────────────────
14941
+ * `latched` ABSENT means "whatever the scene itself says" — `SceneMonitor.emit`
14942
+ * already declares which boolean drives notification rules, and a second knob
14943
+ * that could disagree with it is exactly the D62 failure. Set it only to
14944
+ * override one rule against the scene's own default.
14945
+ *
14946
+ * - LIVE reading (`emit`/`latched` resolve to live): passes iff
14947
+ * `verdict === requiredState`. `unknown` — no reference for this light, view
14948
+ * shifted, no snapshot — passes NEITHER. A scene that cannot judge is not
14949
+ * evidence, in either direction.
14950
+ * - LATCHED reading: passes iff `latched === (requiredState === 'diverged')`.
14951
+ * The latch is a durable fact about the past ("it has diverged since I armed
14952
+ * it"), so a camera that has gone dark does not clear it — that is the whole
14953
+ * reason the operator asked for a latch.
14954
+ *
14955
+ * The gate reads an in-memory mirror (`NcSceneStateCache`) refreshed OFF the
14956
+ * event path, never the cap: D49. A mirror that has never loaded, or a scene it
14957
+ * does not carry, reads absent and the rule does NOT fire — fail closed, and
14958
+ * said out loud in the log rather than dropped in silence.
14959
+ */
14960
+ var NcSceneConditionSchema = object({
14961
+ /** `SceneMonitor.id` — the uuid the cap mints. The whole lookup key. */
14962
+ sceneId: string$2().min(1),
14963
+ /** The camera the scene lives on. A hint for the editor and the log line. */
14964
+ deviceId: number().int().optional(),
14965
+ /** The state the scene must be in for the rule to fire. */
14966
+ requiredState: _enum(["matched", "diverged"]),
14967
+ /**
14968
+ * Read the LATCH (`true`) or the LIVE verdict (`false`). Absent = follow the
14969
+ * scene's own `emit` field, which is the only place that decision belongs.
14970
+ */
14971
+ latched: boolean().optional()
14972
+ });
14608
14973
  var NcConditionsSchema = object({
14609
14974
  /** Gate on ANOTHER device's current state (the alarm armed, a switch on). */
14610
- deviceState: object({
14611
- deviceId: number().int(),
14612
- /** Any of these matches. */
14613
- states: array(string$2().min(1)).min(1)
14614
- }).optional(),
14975
+ deviceState: NcDeviceStateConditionSchema.optional(),
14976
+ /**
14977
+ * Gate on a SCENE's state — "only while the bin is still out". Composes with
14978
+ * every trigger (detection, occupancy, audio, sensor, package, track-end);
14979
+ * unlike `occupancy`/`audio` it discriminates nothing. See
14980
+ * {@link NcSceneCondition} and D159.
14981
+ */
14982
+ scene: NcSceneConditionSchema.optional(),
14615
14983
  /** Device scope — absent = all devices. */
14616
14984
  devices: array(number()).optional(),
14617
14985
  /** Detector class names (any overlap with the record's class set). */
@@ -14637,18 +15005,47 @@ var NcConditionsSchema = object({
14637
15005
  */
14638
15006
  labelEquals: array(string$2().min(1)).optional(),
14639
15007
  /**
14640
- * Identity matcher. P1 boundary: matched against the record's collapsed
14641
- * `label` (the identity display name propagated by the face pipeline) —
14642
- * identity-ID matching rides in P2 when identity ids reach the record.
15008
+ * KNOWN FACES — the rule's identity scope, and the switch that says the rule
15009
+ * is about recognised people at all.
15010
+ *
15011
+ * Three states, and the empty one is the point:
15012
+ *
15013
+ * | value | meaning |
15014
+ * | --- | --- |
15015
+ * | absent | the rule does not care who it is; an unrecognised person matches |
15016
+ * | `[]` | **only known faces** — any identity in the gallery, nobody in particular |
15017
+ * | a list | only these identities |
15018
+ *
15019
+ * `[]` is the repo-wide "no selection = no narrowing" reading (an absent
15020
+ * `devices` list is every device), applied one level down: the operator has
15021
+ * turned the face scope ON and narrowed it to nothing, which is every known
15022
+ * face. No second field states the same thing — a switch that can disagree
15023
+ * with the list under it is worse than no switch (D62).
15024
+ *
15025
+ * MEMBERS ARE FACE-GALLERY `Identity.id`s (uuid), not display names. A name is
15026
+ * renameable, and a rule authored on "Gianluca" went silently dark the moment
15027
+ * the operator fixed the spelling. The id reaches the record on
15028
+ * `LabelAttribution.identityId`; the name is what the editor shows and what
15029
+ * `{{label}}` renders.
15030
+ *
15031
+ * Rules written before this carry NAMES, and are resolved to ids lazily at
15032
+ * load (`NcRuleStore.load`) against the live gallery — a name nothing answers
15033
+ * for is left as it stands and reported, never dropped. The engine also
15034
+ * accepts a display-name hit as a compatibility leg, so a rule whose
15035
+ * migration could not resolve keeps matching exactly what it matched before.
14643
15036
  */
14644
15037
  identities: array(string$2().min(1)).optional(),
14645
- /** Fuzzy plate matcher against the record's `label` (plate text). */
15038
+ /**
15039
+ * KNOWN PLATES / VEHICLES — the plate mirror of {@link identities}, including
15040
+ * the empty-list reading: `values: []` is "any plate the OCR could read",
15041
+ * a non-empty list is those plates (fuzzily). See {@link NcPlateMatcherSchema}.
15042
+ */
14646
15043
  plates: NcPlateMatcherSchema.optional(),
14647
15044
  /**
14648
- * Identity EXCLUDE — mirror of {@link identities} with `notIn` semantics.
14649
- * Same P1 boundary: matched against the record's collapsed `label` (the
14650
- * identity display name). A record with NO label passes (nothing to
14651
- * exclude), unlike the include variant which fails on an absent label.
15045
+ * Identity EXCLUDE — mirror of {@link identities} with `notIn` semantics, and
15046
+ * the same id members and the same lazy name→id migration. A record with NO
15047
+ * identity passes (nothing to exclude), unlike the include variant which
15048
+ * fails on an unrecognised subject. An EMPTY list excludes nobody.
14652
15049
  */
14653
15050
  identitiesExclude: array(string$2().min(1)).optional(),
14654
15051
  /**
@@ -15040,7 +15437,80 @@ var NcRuleInputSchema = object({
15040
15437
  * a rule that predates the gate must keep delivering byte-for-byte as it
15041
15438
  * did, and absent is the only way to say that without a migration.
15042
15439
  */
15043
- confirm: NcConfirmSchema.optional()
15440
+ confirm: NcConfirmSchema.optional(),
15441
+ /**
15442
+ * WAIT for face/plate recognition before saying anything.
15443
+ *
15444
+ * A notification's TEXT is frozen at enqueue and its media is re-resolved at
15445
+ * send; the identity is neither. A face is confirmed after `confirmFrames`
15446
+ * agreeing observations — p50 **11.4 s** after the track was first seen,
15447
+ * measured on this hub — and an `immediate` rule enqueues on the first object
15448
+ * event, seconds before that. So "Gianluca è arrivato" is unsayable on the
15449
+ * immediate path, and no amount of media re-resolution fixes a sentence.
15450
+ *
15451
+ * Only two honest answers exist, and this flag picks between them. It has
15452
+ * effect ONLY on a rule that declares a recognition scope
15453
+ * ({@link NcConditions.identities} or {@link NcConditions.plates}) — on any
15454
+ * other rule there is nothing to wait for and the flag is inert.
15455
+ *
15456
+ * | value | what happens |
15457
+ * | --- | --- |
15458
+ * | `true` | the rule stops firing on the object event and fires at TRACK CLOSE instead, once, with the name — later, and complete |
15459
+ * | 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) |
15460
+ *
15461
+ * `.optional()` and deliberately NOT `.default()`: a Zod default does not run
15462
+ * on the addon cap path, and absent has to keep meaning exactly what every
15463
+ * rule authored before this field meant.
15464
+ *
15465
+ * The cost of `true` is stated here because the editor states it too: a rule
15466
+ * that waits also inherits track-close SEMANTICS — its `zones` condition
15467
+ * tests every zone the track visited and a `crossing` condition can no longer
15468
+ * be satisfied, because a closed track carries no crossing.
15469
+ */
15470
+ waitForEnhancement: boolean().optional(),
15471
+ /**
15472
+ * GROUP a burst of subjects into ONE notification that grows.
15473
+ *
15474
+ * Seconds of quiet after the last matching subject before the burst is
15475
+ * considered over. While it is open, the first subject enqueues immediately —
15476
+ * **exactly as today, with no added latency** — and every real growth (a new
15477
+ * subject, or a name confirmed on one already in it) REPLACES that
15478
+ * notification with an updated one naming everybody. The push carries the
15479
+ * group's own coalescing tag, so the phone replaces rather than stacks.
15480
+ *
15481
+ * `0` / absent = off, and off is today's behaviour byte for byte.
15482
+ *
15483
+ * ### Why an idle cutoff and not a window
15484
+ *
15485
+ * The measured seven-person arrival on device 590 spans 110 s with every
15486
+ * internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
15487
+ * idle cutoff holds it as one and ends it when the arrival actually ends.
15488
+ * 30 is Frigate's shipped value for the same decision.
15489
+ *
15490
+ * ### What it replaces
15491
+ *
15492
+ * The blind cooldown, which collapses a burst by DISCARDING it. Measured on
15493
+ * device 615 / *Persona su Uscio* over six days: 116 qualifying tracks → 74
15494
+ * notifications, **44 (37.9%) suppressed outright**, 23 of them overlapping a
15495
+ * track that did fire and 7 carrying a confirmed identity nobody heard about.
15496
+ * A group collapses the same volume by MERGING, so the cooldown becomes a
15497
+ * budget over GROUPS — which is what it always meant — and a growth is never
15498
+ * throttled by the window its own first member spent.
15499
+ *
15500
+ * ### Interaction with {@link waitForEnhancement}
15501
+ *
15502
+ * They compose, and the order matters. `waitForEnhancement` defers the rule to
15503
+ * TRACK CLOSE, so with both set the group is opened by the first member to
15504
+ * CLOSE — already carrying its name — and grows as later members close. That
15505
+ * is later, and complete. With grouping alone the group opens on the first
15506
+ * object event and picks up names as they are confirmed, through the growth
15507
+ * path. Neither combination fires twice for one subject.
15508
+ *
15509
+ * `.optional()` and deliberately NOT `.default()`: a Zod default does not run
15510
+ * on the addon cap path, so absent must keep meaning what it meant before this
15511
+ * field existed.
15512
+ */
15513
+ groupIdleSec: number().int().min(0).max(600).optional()
15044
15514
  });
15045
15515
  /**
15046
15516
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -15147,6 +15617,7 @@ var NcConditionDescriptorSchema = object({
15147
15617
  "occupancy",
15148
15618
  "audio",
15149
15619
  "deviceState",
15620
+ "scene",
15150
15621
  "systemEvent"
15151
15622
  ]),
15152
15623
  operator: _enum([
@@ -15552,7 +16023,87 @@ var MethodAccessSchema = _enum([
15552
16023
  var AllowedProviderSchema = union([literal("*"), array(string$2())]);
15553
16024
  var AllowedDevicesSchema = record(string$2(), union([literal("*"), array(string$2())]));
15554
16025
  var CapScopeSchema = _enum(["device", "system"]);
15555
- var TokenScopeSchema = discriminatedUnion("type", [
16026
+ /**
16027
+ * DeviceSelector (scope model v3 — 2026-08-12).
16028
+ *
16029
+ * A `device` grant no longer carries a frozen list of deviceIds. It carries
16030
+ * a SELECTOR the matcher resolves against the live fleet, so the grant can be
16031
+ * DYNAMIC: a `types:['camera']` selector automatically covers a camera added
16032
+ * AFTER the grant was minted — no re-grant, no re-login.
16033
+ *
16034
+ * - `all` — every device in the deployment. The broad viewer/operator
16035
+ * lever without a `category` grant (a `category` grant also covers device
16036
+ * caps that carry no deviceId; `all` is specifically the device set).
16037
+ * - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
16038
+ * grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
16039
+ * is NOT covered until the grant is edited.
16040
+ * - `types` — every device of a `DeviceType` (e.g. every `camera`).
16041
+ * DYNAMIC. A device that changes type, or a new device of the type,
16042
+ * re-resolves on the next request.
16043
+ * - `locations` — every device whose operator-assigned `location` label is
16044
+ * in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
16045
+ * null/unset location matches NO `locations` selector.
16046
+ */
16047
+ var DeviceSelectorSchema = discriminatedUnion("kind", [
16048
+ object({ kind: literal("all") }),
16049
+ object({
16050
+ kind: literal("ids"),
16051
+ ids: array(number().int()).min(1)
16052
+ }),
16053
+ object({
16054
+ kind: literal("types"),
16055
+ types: array(_enum(DeviceType)).min(1)
16056
+ }),
16057
+ object({
16058
+ kind: literal("locations"),
16059
+ locations: array(string$2().min(1)).min(1)
16060
+ })
16061
+ ]);
16062
+ var DeviceTokenScopeSchema = object({
16063
+ type: literal("device"),
16064
+ /** The device SET this grant covers — resolved against the live fleet. */
16065
+ selector: DeviceSelectorSchema,
16066
+ access: array(MethodAccessSchema).min(1),
16067
+ /**
16068
+ * Whether a grant on a PARENT device transparently covers its accessory
16069
+ * CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
16070
+ * Direction is parent → children ONLY.
16071
+ *
16072
+ * Absent → the matcher DERIVES it from the access flavour: `view`
16073
+ * inherits (a camera viewer sees the camera's accessories), `create` /
16074
+ * `delete` do NOT (actuating/removing a child is an explicit act the
16075
+ * operator must grant on the child, not inherit from the parent). Set it
16076
+ * explicitly to override that default per grant.
16077
+ */
16078
+ includeLinked: boolean().optional()
16079
+ });
16080
+ /**
16081
+ * v2 → v3 lazy migration. A pre-v3 `device` grant carried
16082
+ * `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
16083
+ * `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
16084
+ * EVERY parse path — stored records AND the JWT-carried scope arrays
16085
+ * normalised at the request boundary ({@link normalizeTokenScopes} in
16086
+ * `device-selector.ts`). Chosen over a one-time DB migration because a
16087
+ * migration cannot reach a JWT already in a client's hands; parse-time
16088
+ * migration covers both without a flag day. No cast — the raw object is read
16089
+ * through `Reflect.get` (its static type is `unknown`).
16090
+ */
16091
+ function migrateLegacyTokenScope(raw) {
16092
+ if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
16093
+ if (Reflect.get(raw, "type") !== "device") return raw;
16094
+ if (Reflect.get(raw, "selector") !== void 0) return raw;
16095
+ const targets = Reflect.get(raw, "targets");
16096
+ if (!Array.isArray(targets)) return raw;
16097
+ return {
16098
+ type: "device",
16099
+ selector: {
16100
+ kind: "ids",
16101
+ ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
16102
+ },
16103
+ access: Reflect.get(raw, "access")
16104
+ };
16105
+ }
16106
+ var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
15556
16107
  object({
15557
16108
  type: literal("category"),
15558
16109
  target: CapScopeSchema,
@@ -15568,18 +16119,8 @@ var TokenScopeSchema = discriminatedUnion("type", [
15568
16119
  target: string$2(),
15569
16120
  access: array(MethodAccessSchema).min(1)
15570
16121
  }),
15571
- object({
15572
- type: literal("device"),
15573
- /**
15574
- * One or more deviceIds (serialised as strings for wire-format
15575
- * consistency with the rest of the union). Matcher accepts if
15576
- * `input.deviceId` ∈ `targets`. Array shape avoids the row-explosion
15577
- * of one scope-per-device when granting access to a set of cameras.
15578
- */
15579
- targets: array(string$2()).min(1),
15580
- access: array(MethodAccessSchema).min(1)
15581
- })
15582
- ]);
16122
+ DeviceTokenScopeSchema
16123
+ ]));
15583
16124
  object({
15584
16125
  id: string$2(),
15585
16126
  username: string$2(),
@@ -15896,7 +16437,7 @@ var TrackEnvelopeSchema = object({
15896
16437
  * `snapshots[]` references — megabytes across a page of tracks. `slim`
15897
16438
  * keeps every scalar the list surfaces actually render (ids, class(es),
15898
16439
  * label / audioLabels / importance enrichment, firstSeen/lastSeen, state,
15899
- * zonesVisited, bestEventId, envelope, hasFace) and returns `positions` /
16440
+ * zonesVisited, bestEventId, envelope, hasFace, hasRider) and returns `positions` /
15900
16441
  * `snapshots` as EMPTY arrays — detail views re-fetch the full row via
15901
16442
  * `getTrack`. Mirrors the event-store `projection` convention
15902
16443
  * (`getObjectEvents` et al.).
@@ -16032,7 +16573,21 @@ union([literal(1), literal(2)]);
16032
16573
  var LabelAttributionSchema = object({
16033
16574
  stepId: string$2(),
16034
16575
  modelId: string$2().optional(),
16035
- decidedAt: number()
16576
+ decidedAt: number(),
16577
+ /**
16578
+ * The GALLERY id behind a recognised tier-2 label — a face-gallery
16579
+ * `Identity.id` or a plate-gallery `Vehicle.id` (both `randomUUID`).
16580
+ *
16581
+ * The text alone is a DISPLAY NAME, and a display name is renameable: a
16582
+ * notification rule authored on "Gianluca" stopped matching the moment the
16583
+ * operator fixed the spelling in the gallery, and nothing said so. The id is
16584
+ * the thing that does not move, so it is what a rule matches on
16585
+ * (`NcConditions.identities`) and the text is what a human is shown.
16586
+ *
16587
+ * Absent when the label names no gallery row — a plate the OCR read but no
16588
+ * vehicle claims, a sub-class, a species, any tier-1 value.
16589
+ */
16590
+ identityId: string$2().optional()
16036
16591
  });
16037
16592
  /**
16038
16593
  * The TIERED label model (roadmap 4g), spread into `TrackSchema` and
@@ -16169,6 +16724,28 @@ var TrackSchema = object({
16169
16724
  * `=== true` and render nothing otherwise, never infer "no face".
16170
16725
  */
16171
16726
  hasFace: boolean().optional(),
16727
+ /**
16728
+ * This subject CONTAINS a folded rider — a person the rider-pairing step
16729
+ * ([D34](../decisions/adr-0034.md)) removed from the frame BEFORE the tracker,
16730
+ * so the passage is tracked once and as a VEHICLE.
16731
+ *
16732
+ * It exists because the fold's record was dishonest. D34 and the code both
16733
+ * said "the person is not lost — it is reported so both entities stay on the
16734
+ * record"; in fact the pair went into a per-processor RAM field behind an
16735
+ * accessor nobody called, and every durable surface said `vehicle`, full
16736
+ * stop. This is the composition note that makes the row true.
16737
+ *
16738
+ * A COMPOSITION, never a class and never a label. "This vehicle contains a
16739
+ * person" is not an answer to "what is this" — both label tiers would refuse
16740
+ * a macro token anyway (D89), and correctly. Nothing here changes what the
16741
+ * subject IS: a cyclist stays one vehicle track, occupancy still counts one,
16742
+ * and a `person` rule still does not fire for someone cycling past.
16743
+ *
16744
+ * **Absent ≠ false**, exactly like {@link hasFace}: every row written before
16745
+ * the column, and every hub that predates the field, omits it. Test
16746
+ * `=== true` and render nothing otherwise — never infer "no rider".
16747
+ */
16748
+ hasRider: boolean().optional(),
16172
16749
  ...TrackFlagFields,
16173
16750
  ...TrackRetrainFields
16174
16751
  });
@@ -16518,7 +17095,10 @@ var RecentTracksQueryInput = object({
16518
17095
  * Encodes the (lastSeen, trackId) sort position — treat as opaque. */
16519
17096
  cursor: string$2().optional(),
16520
17097
  /** See {@link TrackProjectionSchema}. Default `full`. */
16521
- projection: TrackProjectionSchema.optional()
17098
+ projection: TrackProjectionSchema.optional(),
17099
+ /** Include stationary-promoted rows (parked objects). Default false: the
17100
+ * feed lists passages; parking records live on the stationary registry. */
17101
+ includeStationary: boolean().optional()
16522
17102
  });
16523
17103
  var RecentTracksPageSchema = object({
16524
17104
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -16736,7 +17316,11 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16736
17316
  zone: TrackZoneFilterSchema.optional(),
16737
17317
  /** See {@link TrackProjectionSchema}. Default `full` (backward
16738
17318
  * compatible — omitting the field keeps today's exact behaviour). */
16739
- projection: TrackProjectionSchema.optional()
17319
+ projection: TrackProjectionSchema.optional(),
17320
+ /** Include stationary-promoted rows (parked objects handed to the
17321
+ * stationary registry). Default false: the timeline lists passages,
17322
+ * not parking records (operator decision, 2026-08-15). */
17323
+ includeStationary: boolean().optional()
16740
17324
  }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
16741
17325
  kind: "mutation",
16742
17326
  auth: "admin"
@@ -16900,11 +17484,16 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16900
17484
  auth: "admin"
16901
17485
  }), method(object({
16902
17486
  eventId: string$2(),
16903
- kind: MediaFileKindEnum.optional()
17487
+ kind: MediaFileKindEnum.optional(),
17488
+ deviceId: number()
17489
+ }), array(MediaFileSchema).readonly()), method(object({
17490
+ trackId: string$2(),
17491
+ kinds: array(MediaFileKindEnum).optional(),
17492
+ deviceId: number()
16904
17493
  }), array(MediaFileSchema).readonly()), method(object({
16905
17494
  trackId: string$2(),
16906
- kinds: array(MediaFileKindEnum).optional()
16907
- }), array(MediaFileSchema).readonly()), method(object({ trackId: string$2() }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
17495
+ deviceId: number()
17496
+ }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
16908
17497
  kind: "mutation",
16909
17498
  auth: "admin"
16910
17499
  }), method(RebuildObjectEmbeddingsInput, RebuildObjectEmbeddingsResultSchema, {
@@ -17604,6 +18193,17 @@ var maxSessionHoldMsField = {
17604
18193
  default: 12e4,
17605
18194
  step: 5e3
17606
18195
  };
18196
+ /**
18197
+ * Quiet period that closes an `audioMode: 'on-motion'` audio window. Floor of
18198
+ * 5s so a rearm can never degenerate into per-event stream churn; default 90s
18199
+ * comfortably outlives the gap between two PIR wakes on a battery camera.
18200
+ */
18201
+ var audioMotionWindowMsField = {
18202
+ min: 5e3,
18203
+ max: 6e5,
18204
+ default: 9e4,
18205
+ step: 5e3
18206
+ };
17607
18207
  var motionFpsField = {
17608
18208
  min: 1,
17609
18209
  max: 30,
@@ -17616,10 +18216,26 @@ var detectionFpsField = {
17616
18216
  default: 10,
17617
18217
  step: 1
17618
18218
  };
18219
+ /**
18220
+ * The occupancy re-check interval. DEFAULT 300 s (2026-08-13 — was 30 s).
18221
+ *
18222
+ * The recheck is now on by default (a parked car is invisible to occupancy
18223
+ * rules until the stationary registry has been rebuilt by motion, which after a
18224
+ * restart may be never on a quiet camera). Each cycle re-subscribes a detection
18225
+ * session — an RTSP re-dial — so the switch is only affordable at a WIDE
18226
+ * interval: 300 s is ~12 re-dials an hour per camera, against 120 at the old
18227
+ * 30 s. A parked car is therefore counted within 5 minutes of a restart.
18228
+ *
18229
+ * Why not wider: `max` is 300 and raising it is TRAIN-BOUND, not addon-bound —
18230
+ * the host validates `attachCamera` against ITS copy of this schema, so a
18231
+ * runner asked for 600 would be rejected by the hub until a `@camstack/server`
18232
+ * carrying the wider bound is installed everywhere. 300 is the widest value
18233
+ * that ships with an addon deploy.
18234
+ */
17619
18235
  var occupancyRecheckSecField = {
17620
18236
  min: 0,
17621
18237
  max: 300,
17622
- default: 30,
18238
+ default: 300,
17623
18239
  step: 5
17624
18240
  };
17625
18241
  var occupancyRecheckFramesField = {
@@ -17764,6 +18380,27 @@ var RunnerCameraConfigSchema = object({
17764
18380
  * resolved `CameraDetectionConfig`.
17765
18381
  */
17766
18382
  maxSessionHoldMs: number().min(maxSessionHoldMsField.min).max(maxSessionHoldMsField.max).optional(),
18383
+ /**
18384
+ * Orchestrator-side quiet period (ms) that closes an `audioMode:
18385
+ * 'on-motion'` audio window, measured from the LAST motion event.
18386
+ *
18387
+ * This exists because the falling edge cannot be relied on. Camera-native
18388
+ * providers emit motion as a RISING EDGE ONLY (Reolink's Baichuan push and
18389
+ * its email-push SMTP path both emit `detected: true` and never the
18390
+ * counterpart); only the frame-diff analyzer emits falls. So on an
18391
+ * onboard-only camera a window that closed only on `detected: false` never
18392
+ * closed at all, and `on-motion` silently behaved as `always-on` — on a
18393
+ * battery camera, the one failure mode the mode exists to prevent.
18394
+ *
18395
+ * Every motion event rearms this timer WITHOUT restarting the stream, so a
18396
+ * burst of re-fires costs nothing. A falling edge, when one does arrive,
18397
+ * still closes earlier via `motionCooldownMs` — whichever comes first wins.
18398
+ *
18399
+ * Not consumed by the runner: carried here so it shares the per-camera
18400
+ * device-settings surface with `motionCooldownMs`, exactly like
18401
+ * `maxSessionHoldMs`.
18402
+ */
18403
+ audioMotionWindowMs: number().min(audioMotionWindowMsField.min).max(audioMotionWindowMsField.max).optional(),
17767
18404
  motionFps: number().min(motionFpsField.min).max(motionFpsField.max).default(motionFpsField.default),
17768
18405
  detectionFps: number().min(detectionFpsField.min).max(detectionFpsField.max).default(detectionFpsField.default),
17769
18406
  motionStreamId: string$2(),
@@ -17817,15 +18454,21 @@ var RunnerCameraConfigSchema = object({
17817
18454
  */
17818
18455
  onboardMotionDrivesAnalyzer: boolean().default(true),
17819
18456
  /**
17820
- * Master toggle for the occupancy re-check. When `false` (DEFAULT) the runner
17821
- * never arms the periodic recheck timer, regardless of `occupancyRecheckSec` —
17822
- * this is off by default because the recheck re-subscribes a detection session
17823
- * every N seconds while `watching`, a major source of pull-decoder re-dial
17824
- * churn (each cycle creates+tears a session → RTSP re-dial → latency). The
18457
+ * Master toggle for the occupancy re-check. When `false` the runner never arms
18458
+ * the periodic recheck timer, regardless of `occupancyRecheckSec`; the
17825
18459
  * `occupancyRecheckSec` / `occupancyRecheckFrames` sliders only take effect
17826
18460
  * (and only render) when this is enabled.
18461
+ *
18462
+ * DEFAULT `true` since 2026-08-13 (was `false`). It was off because the
18463
+ * recheck re-subscribes a detection session every N seconds while `watching`
18464
+ * — each cycle creates+tears a session ⇒ an RTSP re-dial ⇒ latency, a major
18465
+ * pull-decoder churn source. What that bought was a blind spot: a STATIONARY
18466
+ * object is counted only while the stationary registry holds it, and the
18467
+ * registry rebuilds from motion, so after a restart a parked car was invisible
18468
+ * to every occupancy rule until something moved in front of it. The churn is
18469
+ * now paid on the interval instead — see `occupancyRecheckSecField`.
17827
18470
  */
17828
- occupancyRecheckEnabled: boolean().default(false),
18471
+ occupancyRecheckEnabled: boolean().default(true),
17829
18472
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
17830
18473
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
17831
18474
  /**
@@ -17853,7 +18496,7 @@ var RunnerCameraConfigSchema = object({
17853
18496
  */
17854
18497
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
17855
18498
  });
17856
- 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;
18499
+ 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;
17857
18500
  /**
17858
18501
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
17859
18502
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -18869,7 +19512,16 @@ targets: array(object({
18869
19512
  /** A sleeping battery camera: the frame is deliberately stale and will
18870
19513
  * NOT refresh in the background. A surface should say so rather than
18871
19514
  * present it as current. */
18872
- sleeping: boolean()
19515
+ sleeping: boolean(),
19516
+ /** Current device state rendered over the cached frame. State images
19517
+ * remain authoritative even when their photographic background is
19518
+ * old; null means the link must carry a current camera frame. */
19519
+ stateReason: _enum([
19520
+ "disabled",
19521
+ "sleeping",
19522
+ "unreachable",
19523
+ "waking"
19524
+ ]).nullable()
18873
19525
  })));
18874
19526
  /**
18875
19527
  * `sso-bridge` — internal hub-only cap that lets SSO-style auth
@@ -20523,6 +21175,25 @@ var BatteryStatusSchema = object({
20523
21175
  /** Ms epoch of the last observation. Lets consumers reason about freshness. */
20524
21176
  lastUpdated: number(),
20525
21177
  /**
21178
+ * Ms epoch of the last time the device PROVED it was reachable — a
21179
+ * completed firmware round-trip, an observed wake, or an inbound push
21180
+ * (firmware event, email). `0`/absent = never since this slice was born.
21181
+ *
21182
+ * This is the ONLY input that separates "asleep" from "gone", and it is
21183
+ * fed exclusively by PASSIVE signals: nothing may write it by reaching
21184
+ * for the radio, because a poll that confirms reachability is the same
21185
+ * poll that drains the battery. See {@link deriveBatteryPresence} — the
21186
+ * single derivation every consumer must use; no surface computes its own.
21187
+ *
21188
+ * It is deliberately NOT a clock in the
21189
+ * `scripts/check-runtime-state-durability.ts` sense: it is the
21190
+ * observation itself, and it is the only thing a 30-hour silence is
21191
+ * visible in. Writers quantise it (see `CONTACT_WRITE_QUANTUM_MS` in the
21192
+ * Reolink provider) so a value that means "recently" cannot cost a
21193
+ * SQLite commit per round-trip.
21194
+ */
21195
+ lastContactAt: number().optional(),
21196
+ /**
20526
21197
  * True when the source is a BINARY low-battery indicator (HA
20527
21198
  * `binary_sensor` device_class=battery / `LOW_BAT`) that has no real
20528
21199
  * charge level — `percentage` is then a coarse stand-in (100 = normal,
@@ -22804,54 +23475,139 @@ var TalkAudioCodecSchema = _enum([
22804
23475
  "g711ulaw",
22805
23476
  "g711alaw"
22806
23477
  ]);
22807
- DeviceType.Camera, method(object({ deviceId: number() }), object({
22808
- sessionId: string$2(),
22809
- sdpOffer: string$2()
22810
- }), {
22811
- kind: "mutation",
22812
- auth: "admin"
22813
- }), method(object({
22814
- deviceId: number(),
22815
- sessionId: string$2(),
22816
- sdpAnswer: string$2()
22817
- }), _void(), {
22818
- kind: "mutation",
22819
- auth: "admin"
22820
- }), method(object({
22821
- deviceId: number(),
22822
- sessionId: string$2()
22823
- }), _void(), {
22824
- kind: "mutation",
22825
- auth: "admin"
22826
- }), method(object({ deviceId: number() }), object({ sessionId: string$2() }), {
22827
- kind: "mutation",
22828
- auth: "admin"
22829
- }), method(object({
22830
- deviceId: number(),
22831
- /** Audio bytes for ONE frame, base64-encoded so the payload
22832
- * survives tRPC JSON serialization. */
22833
- audioBase64: string$2(),
22834
- /** Wire codec of the payload. Omit to let the provider default
22835
- * to its native expected format (s16le @ provider-native rate,
22836
- * mono). See {@link TalkAudioCodecSchema} for the supported set. */
22837
- codec: TalkAudioCodecSchema.optional(),
22838
- /** Sample rate (Hz). REQUIRED for `s16le`; advisory for
22839
- * `opus` (encoder clock); ignored for `g711*` (implied 8000). */
22840
- sampleRate: number().int().positive().optional(),
22841
- /** Channel count. Default 1. */
22842
- channels: number().int().positive().optional(),
22843
- /** Sequence number for ordering / dropping out-of-order frames. */
22844
- sequenceNumber: number().int()
22845
- }), object({ accepted: boolean() }), {
22846
- kind: "mutation",
22847
- auth: "admin"
22848
- }), method(object({ deviceId: number() }), _void(), {
22849
- kind: "mutation",
22850
- auth: "admin"
22851
- }), object({
22852
- deviceId: number(),
22853
- status: IntercomStatusSchema
22854
- });
23478
+ var intercomCapability = {
23479
+ name: "intercom",
23480
+ scope: "device",
23481
+ deviceNative: true,
23482
+ mode: "singleton",
23483
+ deviceTypes: [DeviceType.Camera],
23484
+ methods: {
23485
+ /**
23486
+ * Open a server-side WebRTC audio-only session. Returns an SDP
23487
+ * offer with a single sendonly audio m-line the client answers
23488
+ * (client → server direction). The server wakes battery cams
23489
+ * transparently before opening the upstream talk channel.
23490
+ */
23491
+ startSession: method(object({ deviceId: number() }), object({
23492
+ sessionId: string$2(),
23493
+ sdpOffer: string$2()
23494
+ }), {
23495
+ kind: "mutation",
23496
+ auth: "admin"
23497
+ }),
23498
+ handleAnswer: method(object({
23499
+ deviceId: number(),
23500
+ sessionId: string$2(),
23501
+ sdpAnswer: string$2()
23502
+ }), _void(), {
23503
+ kind: "mutation",
23504
+ auth: "admin"
23505
+ }),
23506
+ /** Close explicitly. Server also auto-closes on 30s idle. */
23507
+ stopSession: method(object({
23508
+ deviceId: number(),
23509
+ sessionId: string$2()
23510
+ }), _void(), {
23511
+ kind: "mutation",
23512
+ auth: "admin"
23513
+ }),
23514
+ /**
23515
+ * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
23516
+ * non-WebRTC consumers (HomeKit export, Alexa raw audio, test
23517
+ * harnesses) that already have decoded PCM frames and just need a
23518
+ * direct path onto the camera's talk channel. Mutually exclusive
23519
+ * with `startSession` (an active WebRTC session must be stopped
23520
+ * before a raw-PCM session can be opened on the same device, and
23521
+ * vice versa).
23522
+ */
23523
+ startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string$2() }), {
23524
+ kind: "mutation",
23525
+ auth: "admin"
23526
+ }),
23527
+ /**
23528
+ * Push one chunk of talk-back audio onto the active talk session.
23529
+ * The cap is codec-agnostic: the caller declares (or omits) the
23530
+ * wire format via `codec`; the provider decides between passthrough
23531
+ * (when the wire codec matches the camera's native talk channel),
23532
+ * transcoding via the `audio-codec` cap, or rejecting the call.
23533
+ *
23534
+ * Callers do NOT need to know the camera's wire format or sample
23535
+ * rate — that information lives entirely inside the provider.
23536
+ *
23537
+ * Sequence numbers MUST be monotonic per talk session; older frames
23538
+ * arriving after newer ones are dropped to avoid smearing the
23539
+ * downstream encoder state (G.711 is stateless but IMA ADPCM's
23540
+ * predictor would corrupt with re-ordering).
23541
+ */
23542
+ pushTalkAudio: method(object({
23543
+ deviceId: number(),
23544
+ /** Audio bytes for ONE frame, base64-encoded so the payload
23545
+ * survives tRPC JSON serialization. */
23546
+ audioBase64: string$2(),
23547
+ /** Wire codec of the payload. Omit to let the provider default
23548
+ * to its native expected format (s16le @ provider-native rate,
23549
+ * mono). See {@link TalkAudioCodecSchema} for the supported set. */
23550
+ codec: TalkAudioCodecSchema.optional(),
23551
+ /** Sample rate (Hz). REQUIRED for `s16le`; advisory for
23552
+ * `opus` (encoder clock); ignored for `g711*` (implied 8000). */
23553
+ sampleRate: number().int().positive().optional(),
23554
+ /** Channel count. Default 1. */
23555
+ channels: number().int().positive().optional(),
23556
+ /** Sequence number for ordering / dropping out-of-order frames. */
23557
+ sequenceNumber: number().int()
23558
+ }), object({ accepted: boolean() }), {
23559
+ kind: "mutation",
23560
+ auth: "admin"
23561
+ }),
23562
+ /** Close the raw-PCM talk session. Idempotent. */
23563
+ endTalkSession: method(object({ deviceId: number() }), _void(), {
23564
+ kind: "mutation",
23565
+ auth: "admin"
23566
+ })
23567
+ },
23568
+ events: { onStatusChanged: { data: object({
23569
+ deviceId: number(),
23570
+ status: IntercomStatusSchema
23571
+ }) } },
23572
+ status: {
23573
+ schema: IntercomStatusSchema,
23574
+ kind: "command-driven"
23575
+ },
23576
+ /**
23577
+ * Runtime-state slice — mirrored by the kernel.
23578
+ *
23579
+ * The cap declared `status` and nothing else, so the only two sources an
23580
+ * exporter has for a value — the `device.state-changed` slice event and the
23581
+ * `deviceState.getAllSnapshots` snapshot, both built from runtime state —
23582
+ * carried nothing for `intercom`. A talk-back entity in Home Assistant would
23583
+ * have been published and never received a value, which is the defect the
23584
+ * export's two classification tables exist to prevent (177 of them, once), so
23585
+ * `intercom` was excluded rather than exported.
23586
+ *
23587
+ * The shape is the status shape: there is exactly one truth about talk-back
23588
+ * and duplicating it into a second schema is how two halves of one capability
23589
+ * come to disagree. Providers write it through
23590
+ * `this.runtimeState.setCapState('intercom', …)` at the four points that open
23591
+ * and close a session, and seed it at registration so the slice exists before
23592
+ * the first session rather than after it.
23593
+ *
23594
+ * **Bound, named rather than hidden:** `talking` mirrors the provider's own
23595
+ * session handle, so a session torn down by a transport death that never
23596
+ * reaches `stopSession` / `endTalkSession` leaves it latched until the next
23597
+ * session or the next restart. That is why the slice is `session` and not
23598
+ * `restored` — a restart must never restore "talking".
23599
+ */
23600
+ runtimeState: IntercomStatusSchema,
23601
+ /**
23602
+ * Runtime-state durability: **session** — `talking` describes a live audio
23603
+ * session, which by definition does not survive the process that held it.
23604
+ * Restoring it would publish a camera as talking to nobody.
23605
+ *
23606
+ * See `RuntimeStateDurability`. Enforced by
23607
+ * `scripts/check-runtime-state-durability.ts`.
23608
+ */
23609
+ durability: "session"
23610
+ };
22855
23611
  /**
22856
23612
  * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
22857
23613
  * with a mowing lifecycle plus a dock action.
@@ -25548,7 +26304,7 @@ method(object({
25548
26304
  toMs: number()
25549
26305
  }), RecordingAvailabilitySchema, {
25550
26306
  kind: "query",
25551
- auth: "admin"
26307
+ auth: "protected"
25552
26308
  }), method(object({
25553
26309
  deviceId: number(),
25554
26310
  fromMs: number(),
@@ -25556,14 +26312,14 @@ method(object({
25556
26312
  tzOffsetMinutes: number()
25557
26313
  }), RecordingDaysSchema, {
25558
26314
  kind: "query",
25559
- auth: "admin"
26315
+ auth: "protected"
25560
26316
  }), method(object({
25561
26317
  deviceId: number(),
25562
26318
  fromMs: number(),
25563
26319
  toMs: number()
25564
26320
  }), RecordingManifestSchema, {
25565
26321
  kind: "query",
25566
- auth: "admin"
26322
+ auth: "protected"
25567
26323
  }), method(object({}), RecordingStorageUsageSchema, {
25568
26324
  kind: "query",
25569
26325
  auth: "admin"
@@ -25853,14 +26609,77 @@ method(object({
25853
26609
  * thing except the comparator: `similarity` (CLIP cosine at the same ROI coords
25854
26610
  * vs condition-tagged references) and `llm` (vision-LLM judgment over the crop).
25855
26611
  *
25856
- * D14 device-config archetype (`deviceConfig.ui.kind:'widget'`) — the framework
25857
- * derives the device-detail contribution; the provider carries NO hand-written
25858
- * settings-contribution methods. `status.kind:'push'` — the engine pushes on
25859
- * every hysteresis flip / availability change; consumers never poll.
26612
+ * **No `deviceConfig`, deliberately.** This shipped as the D14 widget archetype,
26613
+ * which put a "Scenes" tab on one camera's detail page. That is the wrong shape
26614
+ * for the thing: a scene is a standing question about the property ("is the bin
26615
+ * still out"), and the operator's question is "which of my scenes have tripped",
26616
+ * across every camera at once — not "what does camera 617 think". Buried one
26617
+ * camera deep it also could not be found. The surface is now a top-level admin
26618
+ * page (`/scenes`, `pages/Scenes.tsx`) that lists every scene on every camera and
26619
+ * picks the camera inside the create flow, the same shape Events and Faces have.
26620
+ *
26621
+ * The consequence to keep in mind: `host/scene-monitor-editor` is gone from
26622
+ * `HOST_WIDGETS` too. `scripts/check-host-widget-resolves.ts` asserts BOTH
26623
+ * directions, so a registration nobody declares fails exactly as loudly as a
26624
+ * declaration nobody registers. The editor is imported directly by the page.
26625
+ *
26626
+ * `status.kind:'push'` — the engine pushes on every hysteresis flip /
26627
+ * availability change; consumers never poll.
25860
26628
  */
25861
- /** Extensible condition tag. Seeded 'day' | 'night'; open by design so more can
25862
- * be added without a wire break (matching falls back to any-condition refs). */
26629
+ /** Extensible condition tag. Seeded 'day' | 'ir' (the two variants the operator
26630
+ * captures) plus 'night' | 'dawn' | 'dusk' from the resolver's sun-times band.
26631
+ * Open by design so more can be added without a wire break.
26632
+ *
26633
+ * Matching does NOT fall back across conditions: cross-condition cosines are
26634
+ * not comparable, so "I have never seen this scene in this light" is reported
26635
+ * as `unknown`, never guessed. A day reference scored against an IR frame
26636
+ * collapses the cosine and would latch a false alarm every single night. */
25863
26637
  var SceneConditionSchema = string$2();
26638
+ /**
26639
+ * What a scene does when the CURRENT light has no reference of its own.
26640
+ *
26641
+ * The lighting variants are not equally likely to exist. Almost every operator
26642
+ * captures daylight and then never stands outside at 22:00 to capture IR, and a
26643
+ * scene that is only ever going to be asked about a daytime question ("is the
26644
+ * bin still on the kerb at 08:00") does not need a night reference at all. The
26645
+ * night half must therefore be OPTIONAL, and optional means the scene keeps
26646
+ * working without it rather than degrading into a permanent complaint.
26647
+ *
26648
+ * - `skip` (default) — the check in that light is not made. Not a verdict, not
26649
+ * an alarm, not even an `unknown`: the live state simply stays whatever the
26650
+ * last covered light left it at, the latch is untouched, and the hysteresis
26651
+ * run is neither spent nor cleared. The scene resumes by itself at first
26652
+ * light. This is the only behaviour under which "I never captured IR" is a
26653
+ * configuration choice instead of a nightly fault.
26654
+ * - `judge-anyway` — score against the OTHER conditions' references. Available
26655
+ * for cameras whose IR frame is close enough to daylight (a floodlit
26656
+ * driveway, an always-white-light doorbell), and wrong for everything else:
26657
+ * cross-condition cosines are not comparable, so a day reference against a
26658
+ * true IR frame collapses and the scene reports a theft at 21:40.
26659
+ *
26660
+ * Never applies when the scene has NO comparable reference at all — that is
26661
+ * "not armed yet", it is reported as `no-reference-for-condition`, and silence
26662
+ * there would hide a scene the operator never finished setting up.
26663
+ */
26664
+ var SceneUncoveredPolicySchema = _enum(["skip", "judge-anyway"]);
26665
+ /** `matched` = the baseline is what we see; `diverged` = it demonstrably is not;
26666
+ * `unknown` = we cannot judge (no reference for this condition, encoder model
26667
+ * changed, view shifted, no snapshot). `unknown` is a real value, not a null,
26668
+ * and never counts toward hysteresis in either direction. */
26669
+ var SceneVerdictSchema = _enum([
26670
+ "matched",
26671
+ "diverged",
26672
+ "unknown"
26673
+ ]);
26674
+ /** Why a scene cannot judge. Named, because this feature's failure mode is
26675
+ * silence that reads as "nothing has happened". */
26676
+ var SceneUnavailableSchema = _enum([
26677
+ "no-reference-for-condition",
26678
+ "view-shifted",
26679
+ "no-vision-profile",
26680
+ "encoder-model-changed",
26681
+ "no-snapshot"
26682
+ ]);
25864
26683
  /** One captured reference — condition-tagged, model-version-gated. `embedding`
25865
26684
  * is `number[]` (Float32Array does NOT survive MsgPack/UDS). */
25866
26685
  var SceneReferenceSchema = object({
@@ -25868,7 +26687,14 @@ var SceneReferenceSchema = object({
25868
26687
  modelId: string$2(),
25869
26688
  condition: SceneConditionSchema,
25870
26689
  capturedAt: number(),
25871
- thumbnailMediaId: string$2().optional()
26690
+ thumbnailMediaId: string$2().optional(),
26691
+ /** Whole-frame (downscaled) embedding captured alongside the ROI crop. The
26692
+ * anti-view-shift anchor: a bumped camera, a PTZ preset or a re-aim makes the
26693
+ * normalized rect frame a different piece of world, and the scene would
26694
+ * diverge forever with a perfectly plausible cosine. Checked LAZILY, only
26695
+ * when hysteresis is about to flip — one extra encode per candidate
26696
+ * transition, not per poll. */
26697
+ anchorEmbedding: array(number()).optional()
25872
26698
  });
25873
26699
  var SceneMonitorStateSchema = object({
25874
26700
  id: string$2(),
@@ -25890,6 +26716,28 @@ var SceneCheckSchema = discriminatedUnion("mode", [object({
25890
26716
  profileId: string$2().optional(),
25891
26717
  hysteresisCount: number().int().positive()
25892
26718
  })]);
26719
+ var SCENE_DEFAULT_ANCHOR_THRESHOLD = .85;
26720
+ /** Night is OPTIONAL. A scene with only a daylight reference sits the IR hours
26721
+ * out in silence rather than reporting a fault every night. */
26722
+ var SCENE_DEFAULT_UNCOVERED_POLICY = "skip";
26723
+ /**
26724
+ * Vision-model adjudication of a candidate flip. Field names deliberately
26725
+ * mirror `NcConfirmSchema` so an operator meets one vocabulary, not two.
26726
+ *
26727
+ * `onTimeout` defaults to **'hold'**, the OPPOSITE of `NcConfirmGate`'s
26728
+ * fail-open: a notification suppressed is the worse error there, but a vision
26729
+ * model that timed out has not told us the bin is gone, and a latch is a
26730
+ * stateful claim that costs the operator a trip to reset.
26731
+ */
26732
+ var SceneConfirmSchema = object({
26733
+ enabled: boolean().default(false),
26734
+ prompt: string$2().min(1).max(1e3),
26735
+ profileId: string$2().optional(),
26736
+ timeoutMs: number().int().min(1e3).max(2e4).default(8e3),
26737
+ maxImagePx: number().int().min(64).max(2048).default(448),
26738
+ /** What a timeout / unavailable model means for the PENDING flip. */
26739
+ onTimeout: _enum(["flip", "hold"]).default("hold")
26740
+ });
25893
26741
  var SceneMonitorSchema = object({
25894
26742
  id: string$2(),
25895
26743
  label: string$2(),
@@ -25908,7 +26756,56 @@ var SceneMonitorSchema = object({
25908
26756
  lastConfidence: number().nullable(),
25909
26757
  currentCondition: SceneConditionSchema.nullable(),
25910
26758
  availability: _enum(["ok", "unavailable"]),
25911
- unavailableReason: string$2().nullable()
26759
+ unavailableReason: string$2().nullable(),
26760
+ /** Which state is "the initial screen". `null` until the first capture. */
26761
+ baselineStateId: string$2().nullable(),
26762
+ /** Which boolean drives notification rules and any export. */
26763
+ emit: _enum(["latched", "live"]).default("latched"),
26764
+ /** Live: does the region match the baseline RIGHT NOW. */
26765
+ verdict: SceneVerdictSchema,
26766
+ /** Has it been `diverged` at least once since `armedAt` — the operator's boolean. */
26767
+ latched: boolean(),
26768
+ /** Last reset (or creation). */
26769
+ armedAt: number(),
26770
+ divergedAt: number().nullable(),
26771
+ restoredAt: number().nullable(),
26772
+ /** A check is only COUNTED when the device has been quiet this long. Motion
26773
+ * during the window DISCARDS the observation — a car pulling up in front of
26774
+ * the bin must not be able to spend hysteresis credit. */
26775
+ quietSeconds: number().int().min(0).max(3600).default(60),
26776
+ /** An observation only advances the pending count when it is at least this
26777
+ * far from the previously counted one, so N agreeing checks span real time
26778
+ * rather than N adjacent polls inside one occlusion. */
26779
+ minObservationSpacingSec: number().int().min(0).max(3600).default(120),
26780
+ /** Vision-model adjudication of a candidate flip. Similarity primary only. */
26781
+ confirm: SceneConfirmSchema.optional(),
26782
+ /** Whole-frame anchor cosine below which a flip is REFUSED as `view-shifted`. */
26783
+ anchorThreshold: number().min(0).max(1).default(SCENE_DEFAULT_ANCHOR_THRESHOLD),
26784
+ /** Clear the latch on its own when the scene matches again? Default false —
26785
+ * `restoredAt` and the `scene-restored` edge are recorded regardless, so an
26786
+ * automation can react to the bin coming back without the operator's own
26787
+ * alarm silently clearing itself. */
26788
+ autoRestore: boolean().default(false),
26789
+ /** What to do when the current light has no reference of its own. See
26790
+ * {@link SceneUncoveredPolicySchema} — the default makes night OPTIONAL. */
26791
+ onUncoveredCondition: SceneUncoveredPolicySchema.default(SCENE_DEFAULT_UNCOVERED_POLICY),
26792
+ /**
26793
+ * The light whose checks are currently being SAT OUT under
26794
+ * `onUncoveredCondition: 'skip'` — `null` when the scene is checking normally.
26795
+ *
26796
+ * Engine-reported and advisory only: it moves no verdict, no latch and no
26797
+ * hysteresis. It exists so the card can say *"night (IR) — checks paused,
26798
+ * nothing captured in this light"* in the same calm voice as the coverage
26799
+ * line, because the alternative is a scene that silently stops answering
26800
+ * after sunset with nothing anywhere saying why. A skipped check must never
26801
+ * read as a broken one.
26802
+ */
26803
+ suspendedCondition: SceneConditionSchema.nullable().default(null),
26804
+ /** Named cause when `verdict === 'unknown'`. */
26805
+ unavailable: SceneUnavailableSchema.nullable(),
26806
+ /** Conditions that have at least one comparable reference — the coverage line
26807
+ * ("day ✓ · ir ✓ · dusk ✗") that turns a silent fallback into a visible fact. */
26808
+ coveredConditions: array(SceneConditionSchema)
25912
26809
  });
25913
26810
  var SceneMonitorStatusSchema = object({
25914
26811
  monitors: array(SceneMonitorSchema),
@@ -25921,12 +26818,6 @@ var sceneMonitorCapability = {
25921
26818
  kind: "wrapper",
25922
26819
  defaultActive: true,
25923
26820
  deviceTypes: [DeviceType.Camera],
25924
- deviceConfig: { ui: {
25925
- kind: "widget",
25926
- widgetId: "host/scene-monitor-editor",
25927
- tab: "scenes",
25928
- label: "Scenes"
25929
- } },
25930
26821
  methods: {
25931
26822
  listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
25932
26823
  createScene: method(object({
@@ -25957,7 +26848,15 @@ var sceneMonitorCapability = {
25957
26848
  "both"
25958
26849
  ]).optional(),
25959
26850
  checkIntervalSec: number().optional(),
25960
- check: SceneCheckSchema.optional()
26851
+ check: SceneCheckSchema.optional(),
26852
+ emit: _enum(["latched", "live"]).optional(),
26853
+ quietSeconds: number().int().min(0).max(3600).optional(),
26854
+ minObservationSpacingSec: number().int().min(0).max(3600).optional(),
26855
+ anchorThreshold: number().min(0).max(1).optional(),
26856
+ autoRestore: boolean().optional(),
26857
+ onUncoveredCondition: SceneUncoveredPolicySchema.optional(),
26858
+ /** `null` clears the vision-model adjudicator. */
26859
+ confirm: SceneConfirmSchema.nullable().optional()
25961
26860
  })
25962
26861
  }), _void(), {
25963
26862
  kind: "mutation",
@@ -25998,6 +26897,26 @@ var sceneMonitorCapability = {
25998
26897
  }), _void(), {
25999
26898
  kind: "mutation",
26000
26899
  auth: "admin"
26900
+ }),
26901
+ /**
26902
+ * Clear the latch, re-arm, and — by default — RE-CAPTURE the baseline for
26903
+ * the CURRENT condition. The bin never goes back in exactly the same spot;
26904
+ * "reset" in the operator's head means *this is the new normal*, and
26905
+ * re-capture is what makes the feature self-healing against slow drift
26906
+ * instead of failing silently weeks later.
26907
+ *
26908
+ * Reachable from three surfaces on this one mutation: the scene card, a
26909
+ * notification button (an `onTrigger` sequence with a `kind:'cap'` step —
26910
+ * no new Notification-Center code at all), and tRPC for scripts.
26911
+ */
26912
+ resetScene: method(object({
26913
+ deviceId: number(),
26914
+ monitorId: string$2(),
26915
+ /** Defaults to TRUE at the provider seam — see `SCENE_RESET_RECAPTURES`. */
26916
+ recapture: boolean().optional()
26917
+ }), _void(), {
26918
+ kind: "mutation",
26919
+ auth: "admin"
26001
26920
  })
26002
26921
  },
26003
26922
  status: {
@@ -26234,7 +27153,70 @@ var CamStreamDescriptorSchema = object({
26234
27153
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
26235
27154
  metadata: record(string$2(), unknown()).optional()
26236
27155
  });
26237
- DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), array(CamStreamDescriptorSchema).readonly());
27156
+ /**
27157
+ * `stream-catalog` — device-scoped, provider-implemented. The pull counterpart
27158
+ * of the removed `publishCameraStream` push: a camera provider returns the full
27159
+ * set of stream descriptors it can offer for the device, synchronously, so the
27160
+ * broker can reconcile its registry against the authoritative provider state.
27161
+ */
27162
+ /**
27163
+ * The catalog as a DURABLE fact rather than a live answer.
27164
+ *
27165
+ * A battery camera's descriptors are profile-stable — they change when the
27166
+ * operator rewrites an encoder profile, not minute to minute — but building
27167
+ * them costs a Baichuan login, which on a sleeping Argus IS a wake. So the
27168
+ * provider is allowed to build them exactly once per profile and must serve
27169
+ * every later pull from a cache.
27170
+ *
27171
+ * Holding that cache only in RAM is what turned a restart into an outage. The
27172
+ * runner comes back with the camera asleep, `buildStreamCatalogUncached`
27173
+ * correctly refuses to wake it, the pull answers `[]`, the broker has no
27174
+ * cam-stream entry to build a broker from, and `webrtcSession.handleOffer`
27175
+ * fails with a flat "No broker for stream" — for as long as the camera sleeps,
27176
+ * which on a battery cam is most of the day. The camera was fine. The stream
27177
+ * was unreachable because the process had forgotten what the camera offers.
27178
+ *
27179
+ * Declaring it here puts it in `device-runtime-state`, the kernel's canonical
27180
+ * declared collection, with the same `restored` durability `battery` uses for
27181
+ * the same reason: the last known value is the only value there is while the
27182
+ * device is asleep. The broker's brokers are therefore always DEFINABLE — it
27183
+ * is the DIAL that wakes a camera, never the catalog (D173).
27184
+ */
27185
+ var StreamCatalogStateSchema = object({
27186
+ /** The descriptors as last built from a real camera response. Never a guess:
27187
+ * a failed or refused build writes NOTHING, so a restored catalog is always
27188
+ * one the camera itself once produced. */
27189
+ descriptors: array(CamStreamDescriptorSchema),
27190
+ /** Ms epoch of the build that produced {@link descriptors}. Lets the wake
27191
+ * path decide whether the camera's own awake window is worth spending on a
27192
+ * re-read. */
27193
+ lastFetchedAt: number()
27194
+ });
27195
+ var streamCatalogCapability = {
27196
+ name: "stream-catalog",
27197
+ scope: "device",
27198
+ deviceNative: true,
27199
+ mode: "singleton",
27200
+ deviceTypes: [DeviceType.Camera],
27201
+ methods: { getCatalog: method(object({ deviceId: number().int().nonnegative() }), array(CamStreamDescriptorSchema).readonly()) },
27202
+ runtimeState: StreamCatalogStateSchema,
27203
+ /**
27204
+ * Runtime-state durability: **restored** — see the schema doc. A cold
27205
+ * catalog on a sleeping battery camera is not a slow first frame, it is a
27206
+ * camera that cannot be watched at all until it happens to wake.
27207
+ *
27208
+ * Churn is nil by construction: the slice is written only by a SUCCESSFUL
27209
+ * build, and a build only runs when there is no cached copy (or the copy is
27210
+ * a day old and the camera is awake anyway).
27211
+ *
27212
+ * See `RuntimeStateDurability`. Enforced by
27213
+ * `scripts/check-runtime-state-durability.ts`.
27214
+ */
27215
+ durability: "restored",
27216
+ /** Clock field: written, but excluded from the compare that decides whether
27217
+ * persisting is worth a SQLite commit — the descriptors are the value. */
27218
+ volatileStateFields: ["lastFetchedAt"]
27219
+ };
26238
27220
  /** One of the camera's stream profiles. */
26239
27221
  var StreamProfileSchema = _enum([
26240
27222
  "main",
@@ -26488,12 +27470,64 @@ var NetworkAddressSchema = object({
26488
27470
  family: string$2(),
26489
27471
  internal: boolean()
26490
27472
  });
27473
+ /**
27474
+ * Provenance of the site coordinates, and the whole reason this is not just two
27475
+ * numbers.
27476
+ *
27477
+ * - `operator-set` — a human typed it, or accepted a detection. Authoritative;
27478
+ * nothing overwrites it.
27479
+ * - `derived-from-ip` — the hub geolocated its own public IP once, because a
27480
+ * default that is right to a few kilometres beats the coarse UTC clock split
27481
+ * the sun-times consumers otherwise fall back to.
27482
+ *
27483
+ * The UI shows which one it is. An operator who cannot tell a guess from their
27484
+ * own input will eventually trust the guess.
27485
+ */
27486
+ var SiteLocationSourceSchema = _enum(["operator-set", "derived-from-ip"]);
27487
+ /**
27488
+ * The read shape: the location plus the honest state of the one-shot derivation.
27489
+ *
27490
+ * `derivationAttemptedAt` is what makes the "one call, ever" contract
27491
+ * inspectable. When it is set and `location` is null, the geo-IP lookup ran and
27492
+ * failed; the hub will NOT try again on its own — the fallback is declared
27493
+ * (consumers degrade to their own last resort) and the operator either types the
27494
+ * coordinates or presses detect.
27495
+ */
27496
+ var SiteLocationStatusSchema = object({
27497
+ location: object({
27498
+ /** WGS84 decimal degrees. */
27499
+ latitude: number().min(-90).max(90),
27500
+ longitude: number().min(-180).max(180),
27501
+ source: SiteLocationSourceSchema,
27502
+ /** Epoch ms the value was last written. */
27503
+ updatedAt: number(),
27504
+ /**
27505
+ * Human-readable place the geo-IP service reported ("Napoli, IT"). Display
27506
+ * only — never parsed, never matched on. Absent for an operator-typed value.
27507
+ */
27508
+ label: string$2().optional()
27509
+ }).nullable(),
27510
+ derivationAttemptedAt: number().nullable(),
27511
+ /** Why the last derivation failed, for the UI to show instead of a shrug. */
27512
+ derivationError: string$2().nullable()
27513
+ });
27514
+ /** `null` clears the location and re-arms nothing — the derivation stays spent. */
27515
+ var SetSiteLocationInputSchema = object({
27516
+ latitude: number().min(-90).max(90),
27517
+ longitude: number().min(-180).max(180)
27518
+ }).nullable();
26491
27519
  method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), method(_void(), FeatureManifestSchema), method(_void(), array(NetworkAddressSchema).readonly()), method(_void(), unknown().nullable(), { auth: "admin" }), method(record(string$2(), unknown()), _null(), {
26492
27520
  kind: "mutation",
26493
27521
  auth: "admin"
26494
27522
  }), method(_void(), _void(), {
26495
27523
  kind: "mutation",
26496
27524
  auth: "admin"
27525
+ }), method(_void(), SiteLocationStatusSchema), method(SetSiteLocationInputSchema, SiteLocationStatusSchema, {
27526
+ kind: "mutation",
27527
+ auth: "admin"
27528
+ }), method(_void(), SiteLocationStatusSchema, {
27529
+ kind: "mutation",
27530
+ auth: "admin"
26497
27531
  });
26498
27532
  /**
26499
27533
  * Tamper / case-open detection sensor. Drives Home Assistant
@@ -27813,6 +28847,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
27813
28847
  humiditySensor: humiditySensorCapability,
27814
28848
  image: imageCapability,
27815
28849
  imageSettings: imageSettingsCapability,
28850
+ intercom: intercomCapability,
27816
28851
  lawnMowerControl: lawnMowerControlCapability,
27817
28852
  lockControl: lockControlCapability,
27818
28853
  mediaPlayer: mediaPlayerCapability,
@@ -27831,6 +28866,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
27831
28866
  sceneMonitor: sceneMonitorCapability,
27832
28867
  scriptRunner: scriptRunnerCapability,
27833
28868
  smoke: smokeCapability,
28869
+ streamCatalog: streamCatalogCapability,
27834
28870
  streamParams: streamParamsCapability,
27835
28871
  switch: switchCapability,
27836
28872
  tamper: tamperCapability,
@@ -28484,6 +29520,15 @@ var BaseDeviceProvider = class extends BaseAddon {
28484
29520
  labels: ["probe not implemented"]
28485
29521
  };
28486
29522
  }
29523
+ /**
29524
+ * Top-level devices restored at once in {@link onRestoreDevices}.
29525
+ *
29526
+ * Four covers the fleets this ships to without turning a boot into a burst a
29527
+ * camera NVR answers with a refusal. A provider whose upstream is a single
29528
+ * session with a serial command channel (a Baichuan hub, an NVR that
29529
+ * serialises ISAPI) should lower it; nothing needs to raise it.
29530
+ */
29531
+ restoreConcurrency = 4;
28487
29532
  async restoreDevices(savedDevices) {
28488
29533
  await this.onRestoreDevices(savedDevices);
28489
29534
  if (savedDevices.length > 0) this.ctx.logger.info(`Restored ${savedDevices.length} ${this.providerName} device(s)`);
@@ -28515,15 +29560,15 @@ var BaseDeviceProvider = class extends BaseAddon {
28515
29560
  */
28516
29561
  async onRestoreDevices(savedDevices) {
28517
29562
  const restored = /* @__PURE__ */ new Set();
28518
- for (const saved of savedDevices) {
28519
- if (saved.parentDeviceId !== null) continue;
29563
+ const topLevel = savedDevices.filter((saved) => saved.parentDeviceId === null);
29564
+ const restoreOne = async (saved) => {
28520
29565
  const Class = this.deviceClasses[saved.type];
28521
29566
  if (!Class) {
28522
29567
  this.ctx.logger.warn("No device class registered for restored type — skipping", {
28523
29568
  tags: { stableId: saved.stableId },
28524
29569
  meta: { type: saved.type }
28525
29570
  });
28526
- continue;
29571
+ return;
28527
29572
  }
28528
29573
  try {
28529
29574
  await this.ctx.kernel.devices.create(saved.stableId, Class, {});
@@ -28537,7 +29582,15 @@ var BaseDeviceProvider = class extends BaseAddon {
28537
29582
  }
28538
29583
  });
28539
29584
  }
28540
- }
29585
+ };
29586
+ let nextTopLevel = 0;
29587
+ await Promise.all(Array.from({ length: Math.min(Math.max(1, this.restoreConcurrency), topLevel.length) }, async () => {
29588
+ for (;;) {
29589
+ const saved = topLevel[nextTopLevel++];
29590
+ if (saved === void 0) return;
29591
+ await restoreOne(saved);
29592
+ }
29593
+ }));
28541
29594
  const childRows = savedDevices.filter((s) => s.parentDeviceId !== null);
28542
29595
  for (const saved of childRows) {
28543
29596
  const Class = this.deviceClasses[saved.type];
@@ -30628,6 +31681,12 @@ Object.freeze({
30628
31681
  addonId: null,
30629
31682
  access: "create"
30630
31683
  },
31684
+ "llm.cancel": {
31685
+ capName: "llm",
31686
+ capScope: "system",
31687
+ addonId: null,
31688
+ access: "create"
31689
+ },
30631
31690
  "llm.deleteModel": {
30632
31691
  capName: "llm",
30633
31692
  capScope: "system",
@@ -30712,6 +31771,12 @@ Object.freeze({
30712
31771
  addonId: null,
30713
31772
  access: "view"
30714
31773
  },
31774
+ "llm.resolveModelRef": {
31775
+ capName: "llm",
31776
+ capScope: "system",
31777
+ addonId: null,
31778
+ access: "create"
31779
+ },
30715
31780
  "llm.setDefault": {
30716
31781
  capName: "llm",
30717
31782
  capScope: "system",
@@ -32878,6 +33943,12 @@ Object.freeze({
32878
33943
  addonId: null,
32879
33944
  access: "create"
32880
33945
  },
33946
+ "sceneMonitor.resetScene": {
33947
+ capName: "scene-monitor",
33948
+ capScope: "device",
33949
+ addonId: null,
33950
+ access: "delete"
33951
+ },
32881
33952
  "sceneMonitor.updateScene": {
32882
33953
  capName: "scene-monitor",
32883
33954
  capScope: "device",
@@ -33556,6 +34627,12 @@ Object.freeze({
33556
34627
  addonId: null,
33557
34628
  access: "create"
33558
34629
  },
34630
+ "system.detectSiteLocation": {
34631
+ capName: "system",
34632
+ capScope: "system",
34633
+ addonId: null,
34634
+ access: "create"
34635
+ },
33559
34636
  "system.featureFlags": {
33560
34637
  capName: "system",
33561
34638
  capScope: "system",
@@ -33574,6 +34651,12 @@ Object.freeze({
33574
34651
  addonId: null,
33575
34652
  access: "view"
33576
34653
  },
34654
+ "system.getSiteLocation": {
34655
+ capName: "system",
34656
+ capScope: "system",
34657
+ addonId: null,
34658
+ access: "view"
34659
+ },
33577
34660
  "system.health": {
33578
34661
  capName: "system",
33579
34662
  capScope: "system",
@@ -33598,6 +34681,12 @@ Object.freeze({
33598
34681
  addonId: null,
33599
34682
  access: "create"
33600
34683
  },
34684
+ "system.setSiteLocation": {
34685
+ capName: "system",
34686
+ capScope: "system",
34687
+ addonId: null,
34688
+ access: "create"
34689
+ },
33601
34690
  "terminalSession.adoptLegacyMonitor": {
33602
34691
  capName: "terminal-session",
33603
34692
  capScope: "system",
@@ -34169,6 +35258,1704 @@ Object.freeze({
34169
35258
  access: "create"
34170
35259
  }
34171
35260
  });
35261
+ Object.freeze({
35262
+ "accessories.setChildHidden": [{
35263
+ name: "childDeviceId",
35264
+ form: "single",
35265
+ optional: false
35266
+ }, {
35267
+ name: "deviceId",
35268
+ form: "single",
35269
+ optional: false
35270
+ }],
35271
+ "addonSettings.getDeviceSettings": [{
35272
+ name: "deviceId",
35273
+ form: "single",
35274
+ optional: false
35275
+ }],
35276
+ "addonSettings.updateDeviceSettings": [{
35277
+ name: "deviceId",
35278
+ form: "single",
35279
+ optional: false
35280
+ }],
35281
+ "alarmPanel.arm": [{
35282
+ name: "deviceId",
35283
+ form: "single",
35284
+ optional: false
35285
+ }],
35286
+ "alarmPanel.disarm": [{
35287
+ name: "deviceId",
35288
+ form: "single",
35289
+ optional: false
35290
+ }],
35291
+ "alarmPanel.trigger": [{
35292
+ name: "deviceId",
35293
+ form: "single",
35294
+ optional: false
35295
+ }],
35296
+ "audioAnalysis.resolveDeviceSettings": [{
35297
+ name: "deviceId",
35298
+ form: "single",
35299
+ optional: false
35300
+ }],
35301
+ "audioAnalyzer.classify": [{
35302
+ name: "deviceId",
35303
+ form: "single",
35304
+ optional: true
35305
+ }],
35306
+ "audioMetrics.getCurrentSnapshot": [{
35307
+ name: "deviceId",
35308
+ form: "single",
35309
+ optional: false
35310
+ }],
35311
+ "audioMetrics.getHistory": [{
35312
+ name: "deviceId",
35313
+ form: "single",
35314
+ optional: false
35315
+ }],
35316
+ "automationControl.disable": [{
35317
+ name: "deviceId",
35318
+ form: "single",
35319
+ optional: false
35320
+ }],
35321
+ "automationControl.enable": [{
35322
+ name: "deviceId",
35323
+ form: "single",
35324
+ optional: false
35325
+ }],
35326
+ "automationControl.trigger": [{
35327
+ name: "deviceId",
35328
+ form: "single",
35329
+ optional: false
35330
+ }],
35331
+ "battery.wakeForStream": [{
35332
+ name: "deviceId",
35333
+ form: "single",
35334
+ optional: false
35335
+ }],
35336
+ "brightness.setBrightness": [{
35337
+ name: "deviceId",
35338
+ form: "single",
35339
+ optional: false
35340
+ }],
35341
+ "button.press": [{
35342
+ name: "deviceId",
35343
+ form: "single",
35344
+ optional: false
35345
+ }],
35346
+ "cameraCredentials.getCredentials": [{
35347
+ name: "deviceId",
35348
+ form: "single",
35349
+ optional: false
35350
+ }],
35351
+ "cameraStreams.getBrokerStreams": [{
35352
+ name: "deviceId",
35353
+ form: "single",
35354
+ optional: false
35355
+ }],
35356
+ "cameraStreams.getCameraStreams": [{
35357
+ name: "deviceId",
35358
+ form: "single",
35359
+ optional: false
35360
+ }],
35361
+ "cameraStreams.getProfileRtspEntries": [{
35362
+ name: "deviceId",
35363
+ form: "single",
35364
+ optional: false
35365
+ }],
35366
+ "cameraStreams.getRtspEntries": [{
35367
+ name: "deviceId",
35368
+ form: "single",
35369
+ optional: false
35370
+ }],
35371
+ "cameraStreams.pickStream": [{
35372
+ name: "deviceId",
35373
+ form: "single",
35374
+ optional: false
35375
+ }],
35376
+ "climateControl.setFanMode": [{
35377
+ name: "deviceId",
35378
+ form: "single",
35379
+ optional: false
35380
+ }],
35381
+ "climateControl.setMode": [{
35382
+ name: "deviceId",
35383
+ form: "single",
35384
+ optional: false
35385
+ }],
35386
+ "climateControl.setPreset": [{
35387
+ name: "deviceId",
35388
+ form: "single",
35389
+ optional: false
35390
+ }],
35391
+ "climateControl.setSwingHorizontal": [{
35392
+ name: "deviceId",
35393
+ form: "single",
35394
+ optional: false
35395
+ }],
35396
+ "climateControl.setSwingVertical": [{
35397
+ name: "deviceId",
35398
+ form: "single",
35399
+ optional: false
35400
+ }],
35401
+ "climateControl.setTarget": [{
35402
+ name: "deviceId",
35403
+ form: "single",
35404
+ optional: false
35405
+ }],
35406
+ "climateControl.setTargetHumidity": [{
35407
+ name: "deviceId",
35408
+ form: "single",
35409
+ optional: false
35410
+ }],
35411
+ "climateControl.setTargetRange": [{
35412
+ name: "deviceId",
35413
+ form: "single",
35414
+ optional: false
35415
+ }],
35416
+ "color.setColor": [{
35417
+ name: "deviceId",
35418
+ form: "single",
35419
+ optional: false
35420
+ }],
35421
+ "consumables.reset": [{
35422
+ name: "deviceId",
35423
+ form: "single",
35424
+ optional: false
35425
+ }],
35426
+ "control.setValue": [{
35427
+ name: "deviceId",
35428
+ form: "single",
35429
+ optional: false
35430
+ }],
35431
+ "cover.close": [{
35432
+ name: "deviceId",
35433
+ form: "single",
35434
+ optional: false
35435
+ }],
35436
+ "cover.open": [{
35437
+ name: "deviceId",
35438
+ form: "single",
35439
+ optional: false
35440
+ }],
35441
+ "cover.setPosition": [{
35442
+ name: "deviceId",
35443
+ form: "single",
35444
+ optional: false
35445
+ }],
35446
+ "cover.setTiltPosition": [{
35447
+ name: "deviceId",
35448
+ form: "single",
35449
+ optional: false
35450
+ }],
35451
+ "cover.stop": [{
35452
+ name: "deviceId",
35453
+ form: "single",
35454
+ optional: false
35455
+ }],
35456
+ "dayNight.getOptions": [{
35457
+ name: "deviceId",
35458
+ form: "single",
35459
+ optional: false
35460
+ }],
35461
+ "dayNight.setSettings": [{
35462
+ name: "deviceId",
35463
+ form: "single",
35464
+ optional: false
35465
+ }],
35466
+ "decoder.createSession": [{
35467
+ name: "deviceId",
35468
+ form: "single",
35469
+ optional: true
35470
+ }],
35471
+ "deviceAdoption.release": [{
35472
+ name: "camDeviceId",
35473
+ form: "single",
35474
+ optional: false
35475
+ }],
35476
+ "deviceAdoption.resync": [{
35477
+ name: "camDeviceId",
35478
+ form: "single",
35479
+ optional: false
35480
+ }],
35481
+ "deviceDiscovery.adoptDevice": [{
35482
+ name: "deviceId",
35483
+ form: "single",
35484
+ optional: false
35485
+ }],
35486
+ "deviceDiscovery.listDiscovered": [{
35487
+ name: "deviceId",
35488
+ form: "single",
35489
+ optional: false
35490
+ }],
35491
+ "deviceDiscovery.refreshDiscovery": [{
35492
+ name: "deviceId",
35493
+ form: "single",
35494
+ optional: false
35495
+ }],
35496
+ "deviceDiscovery.releaseDevice": [{
35497
+ name: "childDeviceId",
35498
+ form: "single",
35499
+ optional: false
35500
+ }, {
35501
+ name: "deviceId",
35502
+ form: "single",
35503
+ optional: false
35504
+ }],
35505
+ "deviceManager.adoptionRelease": [{
35506
+ name: "camDeviceId",
35507
+ form: "single",
35508
+ optional: false
35509
+ }],
35510
+ "deviceManager.adoptionResync": [{
35511
+ name: "camDeviceId",
35512
+ form: "single",
35513
+ optional: false
35514
+ }],
35515
+ "deviceManager.applyInitialMeta": [{
35516
+ name: "deviceId",
35517
+ form: "single",
35518
+ optional: false
35519
+ }, {
35520
+ name: "linkDeviceId",
35521
+ form: "single",
35522
+ optional: true
35523
+ }],
35524
+ "deviceManager.disable": [{
35525
+ name: "deviceId",
35526
+ form: "single",
35527
+ optional: false
35528
+ }],
35529
+ "deviceManager.enable": [{
35530
+ name: "deviceId",
35531
+ form: "single",
35532
+ optional: false
35533
+ }],
35534
+ "deviceManager.getBindings": [{
35535
+ name: "deviceId",
35536
+ form: "single",
35537
+ optional: false
35538
+ }],
35539
+ "deviceManager.getChildren": [{
35540
+ name: "parentDeviceId",
35541
+ form: "single",
35542
+ optional: false
35543
+ }],
35544
+ "deviceManager.getConfigSchema": [{
35545
+ name: "deviceId",
35546
+ form: "single",
35547
+ optional: false
35548
+ }],
35549
+ "deviceManager.getDevice": [{
35550
+ name: "deviceId",
35551
+ form: "single",
35552
+ optional: false
35553
+ }],
35554
+ "deviceManager.getDeviceAggregate": [{
35555
+ name: "deviceId",
35556
+ form: "single",
35557
+ optional: false
35558
+ }],
35559
+ "deviceManager.getDeviceLiveInfoAggregate": [{
35560
+ name: "deviceId",
35561
+ form: "single",
35562
+ optional: false
35563
+ }],
35564
+ "deviceManager.getDeviceSettingsAggregate": [{
35565
+ name: "deviceId",
35566
+ form: "single",
35567
+ optional: false
35568
+ }],
35569
+ "deviceManager.getDeviceStatusAggregate": [{
35570
+ name: "deviceId",
35571
+ form: "single",
35572
+ optional: false
35573
+ }],
35574
+ "deviceManager.getDeviceStatusAggregateBatch": [{
35575
+ name: "deviceIds",
35576
+ form: "array",
35577
+ optional: false
35578
+ }],
35579
+ "deviceManager.getLinkedDevices": [{
35580
+ name: "deviceId",
35581
+ form: "single",
35582
+ optional: false
35583
+ }],
35584
+ "deviceManager.getSettingsSchema": [{
35585
+ name: "deviceId",
35586
+ form: "single",
35587
+ optional: false
35588
+ }],
35589
+ "deviceManager.getStreamProfileMap": [{
35590
+ name: "deviceId",
35591
+ form: "single",
35592
+ optional: false
35593
+ }],
35594
+ "deviceManager.getStreamSources": [{
35595
+ name: "deviceId",
35596
+ form: "single",
35597
+ optional: false
35598
+ }],
35599
+ "deviceManager.getWireableFields": [{
35600
+ name: "deviceId",
35601
+ form: "single",
35602
+ optional: false
35603
+ }],
35604
+ "deviceManager.loadConfig": [{
35605
+ name: "deviceId",
35606
+ form: "single",
35607
+ optional: false
35608
+ }],
35609
+ "deviceManager.loadMeta": [{
35610
+ name: "deviceId",
35611
+ form: "single",
35612
+ optional: false
35613
+ }],
35614
+ "deviceManager.loadRuntimeState": [{
35615
+ name: "deviceId",
35616
+ form: "single",
35617
+ optional: false
35618
+ }],
35619
+ "deviceManager.persistConfig": [{
35620
+ name: "deviceId",
35621
+ form: "single",
35622
+ optional: false
35623
+ }],
35624
+ "deviceManager.probeStreams": [{
35625
+ name: "deviceId",
35626
+ form: "single",
35627
+ optional: false
35628
+ }],
35629
+ "deviceManager.registerDevice": [{
35630
+ name: "parentDeviceId",
35631
+ form: "single",
35632
+ optional: true
35633
+ }],
35634
+ "deviceManager.remove": [{
35635
+ name: "deviceId",
35636
+ form: "single",
35637
+ optional: false
35638
+ }],
35639
+ "deviceManager.removeDevice": [{
35640
+ name: "deviceId",
35641
+ form: "single",
35642
+ optional: false
35643
+ }],
35644
+ "deviceManager.runDeviceAction": [{
35645
+ name: "deviceId",
35646
+ form: "single",
35647
+ optional: false
35648
+ }],
35649
+ "deviceManager.setChildLayout": [{
35650
+ name: "deviceId",
35651
+ form: "single",
35652
+ optional: false
35653
+ }],
35654
+ "deviceManager.setDisabled": [{
35655
+ name: "deviceId",
35656
+ form: "single",
35657
+ optional: false
35658
+ }],
35659
+ "deviceManager.setDisplay": [{
35660
+ name: "deviceId",
35661
+ form: "single",
35662
+ optional: false
35663
+ }],
35664
+ "deviceManager.setIntegrationId": [{
35665
+ name: "deviceId",
35666
+ form: "single",
35667
+ optional: false
35668
+ }],
35669
+ "deviceManager.setLinkDeviceId": [{
35670
+ name: "deviceId",
35671
+ form: "single",
35672
+ optional: false
35673
+ }, {
35674
+ name: "linkDeviceId",
35675
+ form: "single",
35676
+ optional: true
35677
+ }],
35678
+ "deviceManager.setLocation": [{
35679
+ name: "deviceId",
35680
+ form: "single",
35681
+ optional: false
35682
+ }],
35683
+ "deviceManager.setMetadata": [{
35684
+ name: "deviceId",
35685
+ form: "single",
35686
+ optional: false
35687
+ }],
35688
+ "deviceManager.setName": [{
35689
+ name: "deviceId",
35690
+ form: "single",
35691
+ optional: false
35692
+ }],
35693
+ "deviceManager.setPrimaryChildEntityId": [{
35694
+ name: "deviceId",
35695
+ form: "single",
35696
+ optional: false
35697
+ }],
35698
+ "deviceManager.setRole": [{
35699
+ name: "deviceId",
35700
+ form: "single",
35701
+ optional: false
35702
+ }],
35703
+ "deviceManager.setStreamProfileMap": [{
35704
+ name: "deviceId",
35705
+ form: "single",
35706
+ optional: false
35707
+ }],
35708
+ "deviceManager.setType": [{
35709
+ name: "deviceId",
35710
+ form: "single",
35711
+ optional: false
35712
+ }],
35713
+ "deviceManager.setWrapperActive": [{
35714
+ name: "deviceId",
35715
+ form: "single",
35716
+ optional: false
35717
+ }],
35718
+ "deviceManager.testField": [{
35719
+ name: "deviceId",
35720
+ form: "single",
35721
+ optional: false
35722
+ }],
35723
+ "deviceManager.updateConfig": [{
35724
+ name: "deviceId",
35725
+ form: "single",
35726
+ optional: false
35727
+ }],
35728
+ "deviceManager.updateDeviceField": [{
35729
+ name: "deviceId",
35730
+ form: "single",
35731
+ optional: false
35732
+ }],
35733
+ "deviceManager.updateDeviceFieldsBatch": [{
35734
+ name: "deviceId",
35735
+ form: "single",
35736
+ optional: false
35737
+ }],
35738
+ "deviceOps.getConfigEntries": [{
35739
+ name: "deviceId",
35740
+ form: "single",
35741
+ optional: false
35742
+ }],
35743
+ "deviceOps.getRawState": [{
35744
+ name: "deviceId",
35745
+ form: "single",
35746
+ optional: false
35747
+ }],
35748
+ "deviceOps.getSettingsSchema": [{
35749
+ name: "deviceId",
35750
+ form: "single",
35751
+ optional: false
35752
+ }],
35753
+ "deviceOps.getStreamSources": [{
35754
+ name: "deviceId",
35755
+ form: "single",
35756
+ optional: false
35757
+ }],
35758
+ "deviceOps.removeDevice": [{
35759
+ name: "deviceId",
35760
+ form: "single",
35761
+ optional: false
35762
+ }],
35763
+ "deviceOps.runAction": [{
35764
+ name: "deviceId",
35765
+ form: "single",
35766
+ optional: false
35767
+ }],
35768
+ "deviceOps.setConfig": [{
35769
+ name: "deviceId",
35770
+ form: "single",
35771
+ optional: false
35772
+ }],
35773
+ "deviceState.getCapSlice": [{
35774
+ name: "deviceId",
35775
+ form: "single",
35776
+ optional: false
35777
+ }],
35778
+ "deviceState.getSnapshot": [{
35779
+ name: "deviceId",
35780
+ form: "single",
35781
+ optional: false
35782
+ }],
35783
+ "deviceState.setCapSlice": [{
35784
+ name: "deviceId",
35785
+ form: "single",
35786
+ optional: false
35787
+ }],
35788
+ "events.getEventClipUrl": [{
35789
+ name: "deviceId",
35790
+ form: "single",
35791
+ optional: false
35792
+ }],
35793
+ "events.getEvents": [{
35794
+ name: "deviceId",
35795
+ form: "single",
35796
+ optional: false
35797
+ }],
35798
+ "events.getEventThumbnail": [{
35799
+ name: "deviceId",
35800
+ form: "single",
35801
+ optional: false
35802
+ }],
35803
+ "faceGallery.getFaceByTrack": [{
35804
+ name: "deviceId",
35805
+ form: "single",
35806
+ optional: false
35807
+ }],
35808
+ "faceGallery.listRecentFaces": [{
35809
+ name: "deviceId",
35810
+ form: "single",
35811
+ optional: true
35812
+ }],
35813
+ "fanControl.setDirection": [{
35814
+ name: "deviceId",
35815
+ form: "single",
35816
+ optional: false
35817
+ }],
35818
+ "fanControl.setOscillating": [{
35819
+ name: "deviceId",
35820
+ form: "single",
35821
+ optional: false
35822
+ }],
35823
+ "fanControl.setPercentage": [{
35824
+ name: "deviceId",
35825
+ form: "single",
35826
+ optional: false
35827
+ }],
35828
+ "fanControl.setPreset": [{
35829
+ name: "deviceId",
35830
+ form: "single",
35831
+ optional: false
35832
+ }],
35833
+ "humidifier.setMode": [{
35834
+ name: "deviceId",
35835
+ form: "single",
35836
+ optional: false
35837
+ }],
35838
+ "humidifier.setOn": [{
35839
+ name: "deviceId",
35840
+ form: "single",
35841
+ optional: false
35842
+ }],
35843
+ "humidifier.setTargetHumidity": [{
35844
+ name: "deviceId",
35845
+ form: "single",
35846
+ optional: false
35847
+ }],
35848
+ "imageSettings.getOptions": [{
35849
+ name: "deviceId",
35850
+ form: "single",
35851
+ optional: false
35852
+ }],
35853
+ "imageSettings.setSettings": [{
35854
+ name: "deviceId",
35855
+ form: "single",
35856
+ optional: false
35857
+ }],
35858
+ "intercom.endTalkSession": [{
35859
+ name: "deviceId",
35860
+ form: "single",
35861
+ optional: false
35862
+ }],
35863
+ "intercom.handleAnswer": [{
35864
+ name: "deviceId",
35865
+ form: "single",
35866
+ optional: false
35867
+ }],
35868
+ "intercom.pushTalkAudio": [{
35869
+ name: "deviceId",
35870
+ form: "single",
35871
+ optional: false
35872
+ }],
35873
+ "intercom.startSession": [{
35874
+ name: "deviceId",
35875
+ form: "single",
35876
+ optional: false
35877
+ }],
35878
+ "intercom.startTalkSession": [{
35879
+ name: "deviceId",
35880
+ form: "single",
35881
+ optional: false
35882
+ }],
35883
+ "intercom.stopSession": [{
35884
+ name: "deviceId",
35885
+ form: "single",
35886
+ optional: false
35887
+ }],
35888
+ "lawnMowerControl.dock": [{
35889
+ name: "deviceId",
35890
+ form: "single",
35891
+ optional: false
35892
+ }],
35893
+ "lawnMowerControl.pause": [{
35894
+ name: "deviceId",
35895
+ form: "single",
35896
+ optional: false
35897
+ }],
35898
+ "lawnMowerControl.startMowing": [{
35899
+ name: "deviceId",
35900
+ form: "single",
35901
+ optional: false
35902
+ }],
35903
+ "lockControl.lock": [{
35904
+ name: "deviceId",
35905
+ form: "single",
35906
+ optional: false
35907
+ }],
35908
+ "lockControl.open": [{
35909
+ name: "deviceId",
35910
+ form: "single",
35911
+ optional: false
35912
+ }],
35913
+ "lockControl.unlock": [{
35914
+ name: "deviceId",
35915
+ form: "single",
35916
+ optional: false
35917
+ }],
35918
+ "mediaPlayer.next": [{
35919
+ name: "deviceId",
35920
+ form: "single",
35921
+ optional: false
35922
+ }],
35923
+ "mediaPlayer.pause": [{
35924
+ name: "deviceId",
35925
+ form: "single",
35926
+ optional: false
35927
+ }],
35928
+ "mediaPlayer.play": [{
35929
+ name: "deviceId",
35930
+ form: "single",
35931
+ optional: false
35932
+ }],
35933
+ "mediaPlayer.playMedia": [{
35934
+ name: "deviceId",
35935
+ form: "single",
35936
+ optional: false
35937
+ }],
35938
+ "mediaPlayer.previous": [{
35939
+ name: "deviceId",
35940
+ form: "single",
35941
+ optional: false
35942
+ }],
35943
+ "mediaPlayer.seek": [{
35944
+ name: "deviceId",
35945
+ form: "single",
35946
+ optional: false
35947
+ }],
35948
+ "mediaPlayer.selectSource": [{
35949
+ name: "deviceId",
35950
+ form: "single",
35951
+ optional: false
35952
+ }],
35953
+ "mediaPlayer.setMute": [{
35954
+ name: "deviceId",
35955
+ form: "single",
35956
+ optional: false
35957
+ }],
35958
+ "mediaPlayer.setRepeat": [{
35959
+ name: "deviceId",
35960
+ form: "single",
35961
+ optional: false
35962
+ }],
35963
+ "mediaPlayer.setShuffle": [{
35964
+ name: "deviceId",
35965
+ form: "single",
35966
+ optional: false
35967
+ }],
35968
+ "mediaPlayer.setVolume": [{
35969
+ name: "deviceId",
35970
+ form: "single",
35971
+ optional: false
35972
+ }],
35973
+ "mediaPlayer.stop": [{
35974
+ name: "deviceId",
35975
+ form: "single",
35976
+ optional: false
35977
+ }],
35978
+ "motion.isDetected": [{
35979
+ name: "deviceId",
35980
+ form: "single",
35981
+ optional: false
35982
+ }],
35983
+ "motionDetection.analyze": [{
35984
+ name: "deviceId",
35985
+ form: "single",
35986
+ optional: false
35987
+ }],
35988
+ "motionDetection.removeCamera": [{
35989
+ name: "deviceId",
35990
+ form: "single",
35991
+ optional: false
35992
+ }],
35993
+ "motionTrigger.setMotionTrigger": [{
35994
+ name: "deviceId",
35995
+ form: "single",
35996
+ optional: false
35997
+ }],
35998
+ "motionZones.getOptions": [{
35999
+ name: "deviceId",
36000
+ form: "single",
36001
+ optional: false
36002
+ }],
36003
+ "motionZones.setZone": [{
36004
+ name: "deviceId",
36005
+ form: "single",
36006
+ optional: false
36007
+ }],
36008
+ "nativeObjectDetection.setEnabled": [{
36009
+ name: "deviceId",
36010
+ form: "single",
36011
+ optional: false
36012
+ }],
36013
+ "networkQuality.getDeviceStats": [{
36014
+ name: "deviceId",
36015
+ form: "single",
36016
+ optional: false
36017
+ }],
36018
+ "networkQuality.reportClientStats": [{
36019
+ name: "deviceId",
36020
+ form: "single",
36021
+ optional: false
36022
+ }],
36023
+ "notificationRules.setDeviceMuted": [{
36024
+ name: "deviceId",
36025
+ form: "single",
36026
+ optional: false
36027
+ }],
36028
+ "notifier.cancel": [{
36029
+ name: "deviceId",
36030
+ form: "single",
36031
+ optional: false
36032
+ }],
36033
+ "notifier.send": [{
36034
+ name: "deviceId",
36035
+ form: "single",
36036
+ optional: false
36037
+ }],
36038
+ "osd.setOverlay": [{
36039
+ name: "deviceId",
36040
+ form: "single",
36041
+ optional: false
36042
+ }],
36043
+ "osdManager.clearSlotBinding": [{
36044
+ name: "deviceId",
36045
+ form: "single",
36046
+ optional: false
36047
+ }],
36048
+ "osdManager.copyDeviceConfiguration": [{
36049
+ name: "sourceDeviceId",
36050
+ form: "single",
36051
+ optional: false
36052
+ }, {
36053
+ name: "targetDeviceId",
36054
+ form: "single",
36055
+ optional: false
36056
+ }],
36057
+ "osdManager.getDeviceOsd": [{
36058
+ name: "deviceId",
36059
+ form: "single",
36060
+ optional: false
36061
+ }],
36062
+ "osdManager.getSourceCatalog": [{
36063
+ name: "deviceId",
36064
+ form: "single",
36065
+ optional: false
36066
+ }],
36067
+ "osdManager.previewSlot": [{
36068
+ name: "deviceId",
36069
+ form: "single",
36070
+ optional: false
36071
+ }],
36072
+ "osdManager.renderDevice": [{
36073
+ name: "deviceId",
36074
+ form: "single",
36075
+ optional: false
36076
+ }],
36077
+ "osdManager.setSlotBinding": [{
36078
+ name: "deviceId",
36079
+ form: "single",
36080
+ optional: false
36081
+ }],
36082
+ "petFeeder.callPet": [{
36083
+ name: "deviceId",
36084
+ form: "single",
36085
+ optional: false
36086
+ }],
36087
+ "petFeeder.cancelFeed": [{
36088
+ name: "deviceId",
36089
+ form: "single",
36090
+ optional: false
36091
+ }],
36092
+ "petFeeder.feed": [{
36093
+ name: "deviceId",
36094
+ form: "single",
36095
+ optional: false
36096
+ }],
36097
+ "petFeeder.markFoodReplenished": [{
36098
+ name: "deviceId",
36099
+ form: "single",
36100
+ optional: false
36101
+ }],
36102
+ "petFeeder.playSound": [{
36103
+ name: "deviceId",
36104
+ form: "single",
36105
+ optional: false
36106
+ }],
36107
+ "petFeeder.resetDesiccant": [{
36108
+ name: "deviceId",
36109
+ form: "single",
36110
+ optional: false
36111
+ }],
36112
+ "petFeeder.setChildLock": [{
36113
+ name: "deviceId",
36114
+ form: "single",
36115
+ optional: false
36116
+ }],
36117
+ "petFeeder.setFeedSound": [{
36118
+ name: "deviceId",
36119
+ form: "single",
36120
+ optional: false
36121
+ }],
36122
+ "petFeeder.setIndicatorLight": [{
36123
+ name: "deviceId",
36124
+ form: "single",
36125
+ optional: false
36126
+ }],
36127
+ "petFeeder.setVolume": [{
36128
+ name: "deviceId",
36129
+ form: "single",
36130
+ optional: false
36131
+ }],
36132
+ "pipelineAnalytics.clearTracks": [{
36133
+ name: "deviceId",
36134
+ form: "single",
36135
+ optional: false
36136
+ }],
36137
+ "pipelineAnalytics.completeRetrainTrack": [{
36138
+ name: "deviceId",
36139
+ form: "single",
36140
+ optional: false
36141
+ }],
36142
+ "pipelineAnalytics.deleteDeviceEvents": [{
36143
+ name: "deviceId",
36144
+ form: "single",
36145
+ optional: false
36146
+ }],
36147
+ "pipelineAnalytics.deleteTracks": [{
36148
+ name: "deviceId",
36149
+ form: "single",
36150
+ optional: false
36151
+ }],
36152
+ "pipelineAnalytics.deselectRetrainFrame": [{
36153
+ name: "deviceId",
36154
+ form: "single",
36155
+ optional: false
36156
+ }],
36157
+ "pipelineAnalytics.getActiveTracks": [{
36158
+ name: "deviceId",
36159
+ form: "single",
36160
+ optional: false
36161
+ }],
36162
+ "pipelineAnalytics.getAudioEvents": [{
36163
+ name: "deviceId",
36164
+ form: "single",
36165
+ optional: false
36166
+ }],
36167
+ "pipelineAnalytics.getEventDensity": [{
36168
+ name: "deviceId",
36169
+ form: "single",
36170
+ optional: false
36171
+ }],
36172
+ "pipelineAnalytics.getEventMedia": [{
36173
+ name: "deviceId",
36174
+ form: "single",
36175
+ optional: false
36176
+ }],
36177
+ "pipelineAnalytics.getKeyEvents": [{
36178
+ name: "deviceId",
36179
+ form: "single",
36180
+ optional: false
36181
+ }],
36182
+ "pipelineAnalytics.getMotionEvents": [{
36183
+ name: "deviceId",
36184
+ form: "single",
36185
+ optional: false
36186
+ }],
36187
+ "pipelineAnalytics.getObjectEvents": [{
36188
+ name: "deviceId",
36189
+ form: "single",
36190
+ optional: false
36191
+ }],
36192
+ "pipelineAnalytics.getRetrainExportUrl": [{
36193
+ name: "deviceIds",
36194
+ form: "array",
36195
+ optional: true
36196
+ }],
36197
+ "pipelineAnalytics.getSensorEvents": [{
36198
+ name: "deviceId",
36199
+ form: "single",
36200
+ optional: false
36201
+ }],
36202
+ "pipelineAnalytics.getTrack": [{
36203
+ name: "deviceId",
36204
+ form: "single",
36205
+ optional: false
36206
+ }],
36207
+ "pipelineAnalytics.getTrackMedia": [{
36208
+ name: "deviceId",
36209
+ form: "single",
36210
+ optional: false
36211
+ }],
36212
+ "pipelineAnalytics.getTrainingExportSummary": [{
36213
+ name: "deviceIds",
36214
+ form: "array",
36215
+ optional: true
36216
+ }],
36217
+ "pipelineAnalytics.getTrainingExportUrl": [{
36218
+ name: "deviceIds",
36219
+ form: "array",
36220
+ optional: true
36221
+ }],
36222
+ "pipelineAnalytics.listEventKinds": [{
36223
+ name: "deviceId",
36224
+ form: "single",
36225
+ optional: false
36226
+ }],
36227
+ "pipelineAnalytics.listEventKindsBatch": [{
36228
+ name: "deviceIds",
36229
+ form: "array",
36230
+ optional: false
36231
+ }],
36232
+ "pipelineAnalytics.listOpsLog": [{
36233
+ name: "deviceId",
36234
+ form: "single",
36235
+ optional: true
36236
+ }],
36237
+ "pipelineAnalytics.listRecentTracks": [{
36238
+ name: "deviceIds",
36239
+ form: "array",
36240
+ optional: false
36241
+ }],
36242
+ "pipelineAnalytics.listRetrainStaging": [{
36243
+ name: "deviceIds",
36244
+ form: "array",
36245
+ optional: true
36246
+ }],
36247
+ "pipelineAnalytics.listTrackMedia": [{
36248
+ name: "deviceId",
36249
+ form: "single",
36250
+ optional: false
36251
+ }],
36252
+ "pipelineAnalytics.listTracks": [{
36253
+ name: "deviceId",
36254
+ form: "single",
36255
+ optional: false
36256
+ }],
36257
+ "pipelineAnalytics.proposeRetrainAnnotations": [{
36258
+ name: "deviceId",
36259
+ form: "single",
36260
+ optional: false
36261
+ }],
36262
+ "pipelineAnalytics.pruneEventsBefore": [{
36263
+ name: "deviceId",
36264
+ form: "single",
36265
+ optional: false
36266
+ }],
36267
+ "pipelineAnalytics.pruneTracksBefore": [{
36268
+ name: "deviceId",
36269
+ form: "single",
36270
+ optional: false
36271
+ }],
36272
+ "pipelineAnalytics.rebuildObjectEmbeddings": [{
36273
+ name: "deviceId",
36274
+ form: "single",
36275
+ optional: true
36276
+ }],
36277
+ "pipelineAnalytics.restageRetrainTrack": [{
36278
+ name: "deviceId",
36279
+ form: "single",
36280
+ optional: false
36281
+ }],
36282
+ "pipelineAnalytics.saveRetrainAnnotations": [{
36283
+ name: "deviceId",
36284
+ form: "single",
36285
+ optional: false
36286
+ }],
36287
+ "pipelineAnalytics.searchObjectEvents": [{
36288
+ name: "deviceId",
36289
+ form: "single",
36290
+ optional: true
36291
+ }],
36292
+ "pipelineAnalytics.selectRetrainFrames": [{
36293
+ name: "deviceId",
36294
+ form: "single",
36295
+ optional: false
36296
+ }],
36297
+ "pipelineAnalytics.setTrackFlags": [{
36298
+ name: "deviceId",
36299
+ form: "single",
36300
+ optional: false
36301
+ }],
36302
+ "pipelineAnalytics.wipeAllAnalytics": [{
36303
+ name: "deviceId",
36304
+ form: "single",
36305
+ optional: false
36306
+ }],
36307
+ "pipelineExecutor.runPipeline": [{
36308
+ name: "deviceId",
36309
+ form: "single",
36310
+ optional: true
36311
+ }],
36312
+ "pipelineExecutor.runPipelineBatch": [{
36313
+ name: "deviceId",
36314
+ form: "single",
36315
+ optional: true
36316
+ }],
36317
+ "pipelineOrchestrator.assignAudio": [{
36318
+ name: "deviceId",
36319
+ form: "single",
36320
+ optional: false
36321
+ }],
36322
+ "pipelineOrchestrator.assignPipeline": [{
36323
+ name: "deviceId",
36324
+ form: "single",
36325
+ optional: false
36326
+ }],
36327
+ "pipelineOrchestrator.getAudioAssignment": [{
36328
+ name: "deviceId",
36329
+ form: "single",
36330
+ optional: false
36331
+ }],
36332
+ "pipelineOrchestrator.getCameraMetrics": [{
36333
+ name: "deviceId",
36334
+ form: "single",
36335
+ optional: false
36336
+ }],
36337
+ "pipelineOrchestrator.getCameraSettings": [{
36338
+ name: "deviceId",
36339
+ form: "single",
36340
+ optional: false
36341
+ }],
36342
+ "pipelineOrchestrator.getCameraStatus": [{
36343
+ name: "deviceId",
36344
+ form: "single",
36345
+ optional: false
36346
+ }],
36347
+ "pipelineOrchestrator.getCameraStatuses": [{
36348
+ name: "deviceIds",
36349
+ form: "array",
36350
+ optional: true
36351
+ }],
36352
+ "pipelineOrchestrator.getCameraStepOverrides": [{
36353
+ name: "deviceId",
36354
+ form: "single",
36355
+ optional: false
36356
+ }],
36357
+ "pipelineOrchestrator.getCameraSwitches": [{
36358
+ name: "deviceId",
36359
+ form: "single",
36360
+ optional: false
36361
+ }],
36362
+ "pipelineOrchestrator.getPipelineAssignment": [{
36363
+ name: "deviceId",
36364
+ form: "single",
36365
+ optional: false
36366
+ }],
36367
+ "pipelineOrchestrator.getPipelineDevicePin": [{
36368
+ name: "deviceId",
36369
+ form: "single",
36370
+ optional: false
36371
+ }],
36372
+ "pipelineOrchestrator.resolvePipeline": [{
36373
+ name: "deviceId",
36374
+ form: "single",
36375
+ optional: false
36376
+ }],
36377
+ "pipelineOrchestrator.setCameraPipelineForAgent": [{
36378
+ name: "deviceId",
36379
+ form: "single",
36380
+ optional: false
36381
+ }],
36382
+ "pipelineOrchestrator.setCameraStepOverride": [{
36383
+ name: "deviceId",
36384
+ form: "single",
36385
+ optional: false
36386
+ }],
36387
+ "pipelineOrchestrator.setCameraStepToggle": [{
36388
+ name: "deviceId",
36389
+ form: "single",
36390
+ optional: false
36391
+ }],
36392
+ "pipelineOrchestrator.setCameraSwitch": [{
36393
+ name: "deviceId",
36394
+ form: "single",
36395
+ optional: false
36396
+ }],
36397
+ "pipelineOrchestrator.setPipelineDevicePin": [{
36398
+ name: "deviceId",
36399
+ form: "single",
36400
+ optional: false
36401
+ }],
36402
+ "pipelineOrchestrator.unassignAudio": [{
36403
+ name: "deviceId",
36404
+ form: "single",
36405
+ optional: false
36406
+ }],
36407
+ "pipelineOrchestrator.unassignPipeline": [{
36408
+ name: "deviceId",
36409
+ form: "single",
36410
+ optional: false
36411
+ }],
36412
+ "pipelineRunner.attachCamera": [{
36413
+ name: "deviceId",
36414
+ form: "single",
36415
+ optional: false
36416
+ }],
36417
+ "pipelineRunner.detachCamera": [{
36418
+ name: "deviceId",
36419
+ form: "single",
36420
+ optional: false
36421
+ }],
36422
+ "pipelineRunner.getCameraMetrics": [{
36423
+ name: "deviceId",
36424
+ form: "single",
36425
+ optional: false
36426
+ }],
36427
+ "pipelineRunner.reportMotion": [{
36428
+ name: "deviceId",
36429
+ form: "single",
36430
+ optional: false
36431
+ }],
36432
+ "pipelineRunner.runDetailSubtree": [{
36433
+ name: "deviceId",
36434
+ form: "single",
36435
+ optional: false
36436
+ }],
36437
+ "pipelineRunner.runStatelessStep": [{
36438
+ name: "sourceDeviceId",
36439
+ form: "single",
36440
+ optional: false
36441
+ }],
36442
+ "plateGallery.getPlateByTrack": [{
36443
+ name: "deviceId",
36444
+ form: "single",
36445
+ optional: false
36446
+ }],
36447
+ "plateGallery.listPlates": [{
36448
+ name: "deviceId",
36449
+ form: "single",
36450
+ optional: true
36451
+ }],
36452
+ "privacyMask.getOptions": [{
36453
+ name: "deviceId",
36454
+ form: "single",
36455
+ optional: false
36456
+ }],
36457
+ "privacyMask.setAudioEnabled": [{
36458
+ name: "deviceId",
36459
+ form: "single",
36460
+ optional: false
36461
+ }],
36462
+ "privacyMask.setMask": [{
36463
+ name: "deviceId",
36464
+ form: "single",
36465
+ optional: false
36466
+ }],
36467
+ "ptz.continuousMove": [{
36468
+ name: "deviceId",
36469
+ form: "single",
36470
+ optional: false
36471
+ }],
36472
+ "ptz.deletePreset": [{
36473
+ name: "deviceId",
36474
+ form: "single",
36475
+ optional: false
36476
+ }],
36477
+ "ptz.getOptions": [{
36478
+ name: "deviceId",
36479
+ form: "single",
36480
+ optional: false
36481
+ }],
36482
+ "ptz.getPosition": [{
36483
+ name: "deviceId",
36484
+ form: "single",
36485
+ optional: false
36486
+ }],
36487
+ "ptz.getPresets": [{
36488
+ name: "deviceId",
36489
+ form: "single",
36490
+ optional: false
36491
+ }],
36492
+ "ptz.goHome": [{
36493
+ name: "deviceId",
36494
+ form: "single",
36495
+ optional: false
36496
+ }],
36497
+ "ptz.goToPreset": [{
36498
+ name: "deviceId",
36499
+ form: "single",
36500
+ optional: false
36501
+ }],
36502
+ "ptz.move": [{
36503
+ name: "deviceId",
36504
+ form: "single",
36505
+ optional: false
36506
+ }],
36507
+ "ptz.savePreset": [{
36508
+ name: "deviceId",
36509
+ form: "single",
36510
+ optional: false
36511
+ }],
36512
+ "ptz.setAutofocus": [{
36513
+ name: "deviceId",
36514
+ form: "single",
36515
+ optional: false
36516
+ }],
36517
+ "ptz.stop": [{
36518
+ name: "deviceId",
36519
+ form: "single",
36520
+ optional: false
36521
+ }],
36522
+ "ptzAutotrack.getSettings": [{
36523
+ name: "deviceId",
36524
+ form: "single",
36525
+ optional: false
36526
+ }],
36527
+ "ptzAutotrack.getStatus": [{
36528
+ name: "deviceId",
36529
+ form: "single",
36530
+ optional: false
36531
+ }],
36532
+ "ptzAutotrack.setEnabled": [{
36533
+ name: "deviceId",
36534
+ form: "single",
36535
+ optional: false
36536
+ }],
36537
+ "ptzAutotrack.setSettings": [{
36538
+ name: "deviceId",
36539
+ form: "single",
36540
+ optional: false
36541
+ }],
36542
+ "reboot.reboot": [{
36543
+ name: "deviceId",
36544
+ form: "single",
36545
+ optional: false
36546
+ }],
36547
+ "recording.deleteFootprint": [{
36548
+ name: "deviceId",
36549
+ form: "single",
36550
+ optional: false
36551
+ }],
36552
+ "recording.getAvailability": [{
36553
+ name: "deviceId",
36554
+ form: "single",
36555
+ optional: false
36556
+ }],
36557
+ "recording.getDaysWithRecordings": [{
36558
+ name: "deviceId",
36559
+ form: "single",
36560
+ optional: false
36561
+ }],
36562
+ "recording.getDeviceConfig": [{
36563
+ name: "deviceId",
36564
+ form: "single",
36565
+ optional: false
36566
+ }],
36567
+ "recording.getPlaybackManifest": [{
36568
+ name: "deviceId",
36569
+ form: "single",
36570
+ optional: false
36571
+ }],
36572
+ "recording.listOpsLog": [{
36573
+ name: "deviceId",
36574
+ form: "single",
36575
+ optional: true
36576
+ }],
36577
+ "recording.locateSegment": [{
36578
+ name: "deviceId",
36579
+ form: "single",
36580
+ optional: false
36581
+ }],
36582
+ "recording.pruneFootage": [{
36583
+ name: "deviceId",
36584
+ form: "single",
36585
+ optional: false
36586
+ }],
36587
+ "recording.readGopBytes": [{
36588
+ name: "deviceId",
36589
+ form: "single",
36590
+ optional: false
36591
+ }],
36592
+ "recording.readSegmentBytes": [{
36593
+ name: "deviceId",
36594
+ form: "single",
36595
+ optional: false
36596
+ }],
36597
+ "recording.relocateFootage": [{
36598
+ name: "deviceId",
36599
+ form: "single",
36600
+ optional: true
36601
+ }],
36602
+ "recording.renderClip": [{
36603
+ name: "deviceId",
36604
+ form: "single",
36605
+ optional: false
36606
+ }],
36607
+ "recording.renderGif": [{
36608
+ name: "deviceId",
36609
+ form: "single",
36610
+ optional: false
36611
+ }],
36612
+ "recording.rescanStorage": [{
36613
+ name: "deviceId",
36614
+ form: "single",
36615
+ optional: false
36616
+ }],
36617
+ "recording.setDeviceConfig": [{
36618
+ name: "deviceId",
36619
+ form: "single",
36620
+ optional: false
36621
+ }],
36622
+ "recording.startStorageMigrationMove": [{
36623
+ name: "deviceId",
36624
+ form: "single",
36625
+ optional: true
36626
+ }],
36627
+ "recordingExport.createExport": [{
36628
+ name: "deviceId",
36629
+ form: "single",
36630
+ optional: false
36631
+ }],
36632
+ "recordingExport.listExports": [{
36633
+ name: "deviceId",
36634
+ form: "single",
36635
+ optional: true
36636
+ }],
36637
+ "sceneMonitor.captureReference": [{
36638
+ name: "deviceId",
36639
+ form: "single",
36640
+ optional: false
36641
+ }],
36642
+ "sceneMonitor.createScene": [{
36643
+ name: "deviceId",
36644
+ form: "single",
36645
+ optional: false
36646
+ }],
36647
+ "sceneMonitor.deleteReference": [{
36648
+ name: "deviceId",
36649
+ form: "single",
36650
+ optional: false
36651
+ }],
36652
+ "sceneMonitor.deleteScene": [{
36653
+ name: "deviceId",
36654
+ form: "single",
36655
+ optional: false
36656
+ }],
36657
+ "sceneMonitor.listScenes": [{
36658
+ name: "deviceId",
36659
+ form: "single",
36660
+ optional: false
36661
+ }],
36662
+ "sceneMonitor.recheckNow": [{
36663
+ name: "deviceId",
36664
+ form: "single",
36665
+ optional: false
36666
+ }],
36667
+ "sceneMonitor.resetScene": [{
36668
+ name: "deviceId",
36669
+ form: "single",
36670
+ optional: false
36671
+ }],
36672
+ "sceneMonitor.updateScene": [{
36673
+ name: "deviceId",
36674
+ form: "single",
36675
+ optional: false
36676
+ }],
36677
+ "scriptRunner.run": [{
36678
+ name: "deviceId",
36679
+ form: "single",
36680
+ optional: false
36681
+ }],
36682
+ "scriptRunner.stop": [{
36683
+ name: "deviceId",
36684
+ form: "single",
36685
+ optional: false
36686
+ }],
36687
+ "snapshot.getSnapshot": [{
36688
+ name: "deviceId",
36689
+ form: "single",
36690
+ optional: false
36691
+ }],
36692
+ "snapshot.getSnapshotLinks": [{
36693
+ name: "targets",
36694
+ form: "object-array",
36695
+ optional: false,
36696
+ itemField: "deviceId"
36697
+ }],
36698
+ "snapshot.getSnapshotOverview": [{
36699
+ name: "deviceIds",
36700
+ form: "array",
36701
+ optional: false
36702
+ }],
36703
+ "snapshot.invalidateCache": [{
36704
+ name: "deviceId",
36705
+ form: "single",
36706
+ optional: false
36707
+ }],
36708
+ "streamBroker.acquireEgressTranscode": [{
36709
+ name: "deviceId",
36710
+ form: "single",
36711
+ optional: false
36712
+ }],
36713
+ "streamBroker.assignProfile": [{
36714
+ name: "deviceId",
36715
+ form: "single",
36716
+ optional: false
36717
+ }],
36718
+ "streamBroker.getDeviceAudioMute": [{
36719
+ name: "deviceId",
36720
+ form: "single",
36721
+ optional: false
36722
+ }],
36723
+ "streamBroker.getStreamWithCodec": [{
36724
+ name: "deviceId",
36725
+ form: "single",
36726
+ optional: false
36727
+ }],
36728
+ "streamBroker.produceEventMedia": [{
36729
+ name: "deviceId",
36730
+ form: "single",
36731
+ optional: false
36732
+ }],
36733
+ "streamBroker.publishCameraStream": [{
36734
+ name: "deviceId",
36735
+ form: "single",
36736
+ optional: false
36737
+ }],
36738
+ "streamBroker.renderPreBufferClip": [{
36739
+ name: "deviceId",
36740
+ form: "single",
36741
+ optional: false
36742
+ }],
36743
+ "streamBroker.restartProfile": [{
36744
+ name: "deviceId",
36745
+ form: "single",
36746
+ optional: false
36747
+ }],
36748
+ "streamBroker.retractCameraStream": [{
36749
+ name: "deviceId",
36750
+ form: "single",
36751
+ optional: false
36752
+ }],
36753
+ "streamBroker.setDeviceAudioMute": [{
36754
+ name: "deviceId",
36755
+ form: "single",
36756
+ optional: false
36757
+ }],
36758
+ "streamBroker.unassignProfile": [{
36759
+ name: "deviceId",
36760
+ form: "single",
36761
+ optional: false
36762
+ }],
36763
+ "streamCatalog.getCatalog": [{
36764
+ name: "deviceId",
36765
+ form: "single",
36766
+ optional: false
36767
+ }],
36768
+ "streamParams.getConfigSchema": [{
36769
+ name: "deviceId",
36770
+ form: "single",
36771
+ optional: false
36772
+ }],
36773
+ "streamParams.getOptions": [{
36774
+ name: "deviceId",
36775
+ form: "single",
36776
+ optional: false
36777
+ }],
36778
+ "streamParams.setProfile": [{
36779
+ name: "deviceId",
36780
+ form: "single",
36781
+ optional: false
36782
+ }],
36783
+ "switch.setState": [{
36784
+ name: "deviceId",
36785
+ form: "single",
36786
+ optional: false
36787
+ }],
36788
+ "vacuumControl.locate": [{
36789
+ name: "deviceId",
36790
+ form: "single",
36791
+ optional: false
36792
+ }],
36793
+ "vacuumControl.pause": [{
36794
+ name: "deviceId",
36795
+ form: "single",
36796
+ optional: false
36797
+ }],
36798
+ "vacuumControl.returnToBase": [{
36799
+ name: "deviceId",
36800
+ form: "single",
36801
+ optional: false
36802
+ }],
36803
+ "vacuumControl.setFanSpeed": [{
36804
+ name: "deviceId",
36805
+ form: "single",
36806
+ optional: false
36807
+ }],
36808
+ "vacuumControl.start": [{
36809
+ name: "deviceId",
36810
+ form: "single",
36811
+ optional: false
36812
+ }],
36813
+ "vacuumControl.stop": [{
36814
+ name: "deviceId",
36815
+ form: "single",
36816
+ optional: false
36817
+ }],
36818
+ "valve.close": [{
36819
+ name: "deviceId",
36820
+ form: "single",
36821
+ optional: false
36822
+ }],
36823
+ "valve.open": [{
36824
+ name: "deviceId",
36825
+ form: "single",
36826
+ optional: false
36827
+ }],
36828
+ "valve.setPosition": [{
36829
+ name: "deviceId",
36830
+ form: "single",
36831
+ optional: false
36832
+ }],
36833
+ "valve.stop": [{
36834
+ name: "deviceId",
36835
+ form: "single",
36836
+ optional: false
36837
+ }],
36838
+ "videoclips.getClipPlayback": [{
36839
+ name: "deviceId",
36840
+ form: "single",
36841
+ optional: false
36842
+ }],
36843
+ "videoclips.listClips": [{
36844
+ name: "deviceId",
36845
+ form: "single",
36846
+ optional: false
36847
+ }],
36848
+ "waterHeater.setAway": [{
36849
+ name: "deviceId",
36850
+ form: "single",
36851
+ optional: false
36852
+ }],
36853
+ "waterHeater.setOperationMode": [{
36854
+ name: "deviceId",
36855
+ form: "single",
36856
+ optional: false
36857
+ }],
36858
+ "waterHeater.setTargetTemp": [{
36859
+ name: "deviceId",
36860
+ form: "single",
36861
+ optional: false
36862
+ }],
36863
+ "webrtcSession.addIceCandidate": [{
36864
+ name: "deviceId",
36865
+ form: "single",
36866
+ optional: false
36867
+ }],
36868
+ "webrtcSession.closeSession": [{
36869
+ name: "deviceId",
36870
+ form: "single",
36871
+ optional: false
36872
+ }],
36873
+ "webrtcSession.createSession": [{
36874
+ name: "deviceId",
36875
+ form: "single",
36876
+ optional: false
36877
+ }],
36878
+ "webrtcSession.getIceCandidates": [{
36879
+ name: "deviceId",
36880
+ form: "single",
36881
+ optional: false
36882
+ }],
36883
+ "webrtcSession.getSessionState": [{
36884
+ name: "deviceId",
36885
+ form: "single",
36886
+ optional: false
36887
+ }],
36888
+ "webrtcSession.handleAnswer": [{
36889
+ name: "deviceId",
36890
+ form: "single",
36891
+ optional: false
36892
+ }],
36893
+ "webrtcSession.handleOffer": [{
36894
+ name: "deviceId",
36895
+ form: "single",
36896
+ optional: false
36897
+ }],
36898
+ "webrtcSession.hasAdaptiveBitrate": [{
36899
+ name: "deviceId",
36900
+ form: "single",
36901
+ optional: false
36902
+ }],
36903
+ "webrtcSession.listStreams": [{
36904
+ name: "deviceId",
36905
+ form: "single",
36906
+ optional: false
36907
+ }],
36908
+ "zoneAnalytics.getCameraHistory": [{
36909
+ name: "deviceId",
36910
+ form: "single",
36911
+ optional: false
36912
+ }],
36913
+ "zoneAnalytics.getCurrentSnapshot": [{
36914
+ name: "deviceId",
36915
+ form: "single",
36916
+ optional: false
36917
+ }],
36918
+ "zoneAnalytics.getUnzonedHistory": [{
36919
+ name: "deviceId",
36920
+ form: "single",
36921
+ optional: false
36922
+ }],
36923
+ "zoneAnalytics.getZoneHistory": [{
36924
+ name: "deviceId",
36925
+ form: "single",
36926
+ optional: false
36927
+ }],
36928
+ "zoneRules.listRules": [{
36929
+ name: "deviceId",
36930
+ form: "single",
36931
+ optional: false
36932
+ }],
36933
+ "zoneRules.setRules": [{
36934
+ name: "deviceId",
36935
+ form: "single",
36936
+ optional: false
36937
+ }],
36938
+ "zones.addZone": [{
36939
+ name: "deviceId",
36940
+ form: "single",
36941
+ optional: false
36942
+ }],
36943
+ "zones.listZones": [{
36944
+ name: "deviceId",
36945
+ form: "single",
36946
+ optional: false
36947
+ }],
36948
+ "zones.removeZone": [{
36949
+ name: "deviceId",
36950
+ form: "single",
36951
+ optional: false
36952
+ }],
36953
+ "zones.updateZone": [{
36954
+ name: "deviceId",
36955
+ form: "single",
36956
+ optional: false
36957
+ }]
36958
+ });
34172
36959
  Object.freeze({
34173
36960
  "broker": "broker",
34174
36961
  "device-export": "device-export",