@camstack/addon-provider-wyze 0.2.16 → 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 +2765 -96
  2. package/dist/addon.mjs +2765 -96
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -30,7 +30,7 @@ let events = require("events");
30
30
  let net = require("net");
31
31
  net = __toESM(net, 1);
32
32
  let node_child_process = require("node:child_process");
33
- //#region ../types/dist/event-category-Cv9dO26A.mjs
33
+ //#region ../types/dist/event-category-Bxo5yJjt.mjs
34
34
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
35
35
  EventCategory["SystemBoot"] = "system.boot";
36
36
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -237,6 +237,33 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
237
237
  EventCategory["PipelineCameraAssigned"] = "pipeline.camera-assigned";
238
238
  EventCategory["PipelineCameraUnassigned"] = "pipeline.camera-unassigned";
239
239
  /**
240
+ * A node the orchestrator would otherwise place cameras on has NO usable
241
+ * inference device: the operator enabled one or more accelerators there and
242
+ * the live probe reports every one of them unavailable. Emitted once per
243
+ * TRANSITION into that state (never per dispatch), and the node is dropped
244
+ * from the placement candidate set for as long as it holds.
245
+ *
246
+ * This exists because the state was previously invisible: little-unraid
247
+ * absorbed 283k inference errors in a day while still being handed cameras,
248
+ * and nothing in the system said so.
249
+ *
250
+ * A node with no accelerators configured at all is NOT this — its devices
251
+ * are `disabled`, not `unavailable`, and the runner's default CPU pool
252
+ * serves it exactly as before.
253
+ */
254
+ EventCategory["PipelineNodeInferenceUnavailable"] = "pipeline.node-inference-unavailable";
255
+ /**
256
+ * A camera has an OPEN detection session and has produced no detection at
257
+ * all for longer than the blind threshold — the camera is being decoded and
258
+ * inferred and is returning nothing. Emitted once per transition into blind,
259
+ * per camera.
260
+ *
261
+ * The failure it reports: a 1h43 detection blackout on the entrance camera
262
+ * that nobody noticed, because "a camera that detects nothing" and "a quiet
263
+ * camera" produce byte-identical silence.
264
+ */
265
+ EventCategory["PipelineDetectionBlind"] = "pipeline.detection-blind";
266
+ /**
240
267
  * Per-camera pipeline config was mutated by the orchestrator
241
268
  * (3-level settings change via `setAgentAddonDefaults` /
242
269
  * `setCameraStepToggle` / `setCameraPipelineForAgent` or a
@@ -3028,6 +3055,9 @@ function handlePipeResult(left, next, ctx) {
3028
3055
  fallback: left.fallback
3029
3056
  }, ctx);
3030
3057
  }
3058
+ var $ZodPreprocess = /*@__PURE__*/ $constructor("$ZodPreprocess", (inst, def) => {
3059
+ $ZodPipe.init(inst, def);
3060
+ });
3031
3061
  var $ZodReadonly = /*@__PURE__*/ $constructor("$ZodReadonly", (inst, def) => {
3032
3062
  $ZodType.init(inst, def);
3033
3063
  defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
@@ -5213,6 +5243,10 @@ function pipe(in_, out) {
5213
5243
  out
5214
5244
  });
5215
5245
  }
5246
+ var ZodPreprocess = /*@__PURE__*/ $constructor("ZodPreprocess", (inst, def) => {
5247
+ ZodPipe.init(inst, def);
5248
+ $ZodPreprocess.init(inst, def);
5249
+ });
5216
5250
  var ZodReadonly = /*@__PURE__*/ $constructor("ZodReadonly", (inst, def) => {
5217
5251
  $ZodReadonly.init(inst, def);
5218
5252
  ZodType.init(inst, def);
@@ -5271,6 +5305,13 @@ function _instanceof(cls, params = {}) {
5271
5305
  };
5272
5306
  return inst;
5273
5307
  }
5308
+ function preprocess(fn, schema) {
5309
+ return new ZodPreprocess({
5310
+ type: "pipe",
5311
+ in: transform(fn),
5312
+ out: schema
5313
+ });
5314
+ }
5274
5315
  //#endregion
5275
5316
  //#region ../../node_modules/zod/v4/classic/compat.js
5276
5317
  /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
@@ -10907,6 +10948,8 @@ var QueryFilterSchema = object({
10907
10948
  where: record(string(), unknown()).optional(),
10908
10949
  whereIn: record(string(), array(unknown())).optional(),
10909
10950
  whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
10951
+ /** NULL-safe exclusion: matches rows whose field is NULL OR != the value. */
10952
+ whereNot: record(string(), unknown()).optional(),
10910
10953
  orderBy: object({
10911
10954
  field: string(),
10912
10955
  direction: _enum(["asc", "desc"])
@@ -10926,7 +10969,8 @@ var QueryFilterSchema = object({
10926
10969
  var MutationFilterSchema = object({
10927
10970
  where: record(string(), unknown()).optional(),
10928
10971
  whereIn: record(string(), array(unknown())).optional(),
10929
- whereBetween: record(string(), tuple([unknown(), unknown()])).optional()
10972
+ whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
10973
+ whereNot: record(string(), unknown()).optional()
10930
10974
  });
10931
10975
  /** A single stored record: `{ id, data }`. */
10932
10976
  var SettingsRecordSchema = object({
@@ -12462,6 +12506,17 @@ var LlmImageSchema = object({
12462
12506
  bytes: _instanceof(Uint8Array),
12463
12507
  mimeType: string()
12464
12508
  });
12509
+ /**
12510
+ * Retry policy. `enabled: false` is NOT the same as `maxAttempts: 1` in intent —
12511
+ * the flag is what a consumer table flips, the count is what the operator tunes.
12512
+ * A retry doubles the wall time of a call, so the two gates that run inside a
12513
+ * notification's budget keep it off (see `CONSUMER_RETRY_POLICY` in addon-ai).
12514
+ */
12515
+ var LlmRetryPolicySchema = object({
12516
+ enabled: boolean().default(false),
12517
+ /** Total attempts INCLUDING the first. 1 = no retry. */
12518
+ maxAttempts: number().int().min(1).max(5).default(1)
12519
+ });
12465
12520
  var LlmGenerateBaseInputSchema = object({
12466
12521
  /** Collection routing (the notification-output posture). */
12467
12522
  addonId: string().optional(),
@@ -12476,7 +12531,28 @@ var LlmGenerateBaseInputSchema = object({
12476
12531
  jsonSchema: record(string(), unknown()).optional(),
12477
12532
  /** Per-call override of the profile default. */
12478
12533
  maxTokens: number().int().positive().optional(),
12479
- temperature: number().optional()
12534
+ temperature: number().optional(),
12535
+ /** Per-call override of the profile default (nucleus sampling). */
12536
+ topP: number().min(0).max(1).optional(),
12537
+ /** Per-call override of the profile default (top-k sampling). */
12538
+ topK: number().int().positive().optional(),
12539
+ /** Per-call override of `profile.timeoutMs` — the total generation bound. */
12540
+ timeoutMs: number().int().positive().optional(),
12541
+ /** Per-call override; beats both the consumer table and the profile. */
12542
+ retry: LlmRetryPolicySchema.optional(),
12543
+ /**
12544
+ * Caller-minted id that makes this generation CANCELLABLE.
12545
+ *
12546
+ * Without it a caller that stops waiting cannot stop the work: the gates race
12547
+ * the call against 8 s and free their own slot when the timer wins, while the
12548
+ * generation upstream keeps running to `profile.timeoutMs` — 60 s by default,
12549
+ * on a single-threaded local model. The per-camera bound then counts WAITS,
12550
+ * not generations, and the real load is unbounded.
12551
+ *
12552
+ * `AbortSignal` cannot cross a process boundary; an id can. Pass one here and
12553
+ * `llm.cancel({ requestId })` tears the socket down.
12554
+ */
12555
+ requestId: string().optional()
12480
12556
  });
12481
12557
  /**
12482
12558
  * `llm-runtime` — node-side managed llama.cpp executor (spec §4). Registered
@@ -12489,6 +12565,18 @@ var LlmGenerateBaseInputSchema = object({
12489
12565
  * Resource ceiling = llama-server flags + idleStopMinutes ONLY (no RSS
12490
12566
  * watchdog — operator decision #3).
12491
12567
  */
12568
+ /**
12569
+ * A companion artifact that MUST land beside the main GGUF: the `mmproj`
12570
+ * projector of a vision model, or shards 2..N of a split GGUF. Carried on the
12571
+ * REF rather than looked up at install time, so what the operator approved in
12572
+ * the preview is exactly what the node downloads.
12573
+ */
12574
+ var ManagedModelExtraFileSchema = object({
12575
+ url: string(),
12576
+ filename: string(),
12577
+ sizeBytes: number(),
12578
+ sha256: string().optional()
12579
+ });
12492
12580
  var ManagedModelRefSchema = discriminatedUnion("kind", [
12493
12581
  object({
12494
12582
  kind: literal("catalog"),
@@ -12497,7 +12585,11 @@ var ManagedModelRefSchema = discriminatedUnion("kind", [
12497
12585
  object({
12498
12586
  kind: literal("url"),
12499
12587
  url: string(),
12500
- sha256: string().optional()
12588
+ sha256: string().optional(),
12589
+ /** Picker/status label; the file basename when absent. */
12590
+ label: string().optional(),
12591
+ sizeBytes: number().optional(),
12592
+ extraFiles: array(ManagedModelExtraFileSchema).optional()
12501
12593
  }),
12502
12594
  object({
12503
12595
  kind: literal("path"),
@@ -12515,13 +12607,82 @@ var ManagedRuntimeConfigSchema = object({
12515
12607
  gpuLayers: number().int().default(0),
12516
12608
  /** Default: cpus-2, clamped ≥1 (resolved node-side). */
12517
12609
  threads: number().int().optional(),
12518
- /** Concurrent slots. */
12610
+ /** Concurrent slots (`--parallel`). */
12519
12611
  parallel: number().int().default(1),
12612
+ /** Logical batch size (`-b`). Larger = faster prompt ingest, more RAM. */
12613
+ batchSize: number().int().positive().optional(),
12614
+ /** Physical batch / micro-batch (`-ub`). */
12615
+ ubatchSize: number().int().positive().optional(),
12616
+ /**
12617
+ * `--flash-attn`. Cuts KV-cache memory on the backends that implement it and
12618
+ * is a no-op elsewhere, so it is offered rather than assumed.
12619
+ */
12620
+ flashAttention: boolean().default(false),
12621
+ /**
12622
+ * `--mlock`. Pins the weights in RAM so the OS cannot page them out mid
12623
+ * inference. Costs the full model size in resident memory — which is exactly
12624
+ * what the RAM budget is counting.
12625
+ */
12626
+ mlock: boolean().default(false),
12627
+ /**
12628
+ * `--no-mmap`. Reads the whole GGUF up front instead of mapping it. Slower to
12629
+ * start, but avoids the page-fault stalls a network or spinning-disk model
12630
+ * store produces on every first token.
12631
+ */
12632
+ noMmap: boolean().default(false),
12633
+ /** `--cache-type-k` / `--cache-type-v` — quantising the KV cache is the
12634
+ * cheapest way to fit a longer context in the same RAM. */
12635
+ cacheTypeK: _enum([
12636
+ "f32",
12637
+ "f16",
12638
+ "q8_0",
12639
+ "q5_1",
12640
+ "q5_0",
12641
+ "q4_1",
12642
+ "q4_0"
12643
+ ]).optional(),
12644
+ cacheTypeV: _enum([
12645
+ "f32",
12646
+ "f16",
12647
+ "q8_0",
12648
+ "q5_1",
12649
+ "q5_0",
12650
+ "q4_1",
12651
+ "q4_0"
12652
+ ]).optional(),
12653
+ /**
12654
+ * Escape hatch for llama-server flags this schema does NOT model — `--jinja`
12655
+ * (which most vision chat templates need and some language-only models
12656
+ * dislike), `--cont-batching`, `--rope-scaling`, …
12657
+ *
12658
+ * It is NOT a second place to set the flags above. A token that collides
12659
+ * with a typed field is REJECTED at start, naming the field that owns it
12660
+ * (`assertNoOwnedFlags`), because two knobs writing the same argv is exactly
12661
+ * the "two switches that disagree" failure this repo has already shipped
12662
+ * twice (D62).
12663
+ */
12664
+ extraArgs: array(string()).default([]),
12520
12665
  /** Else lazy: first generate boots it. */
12521
12666
  autoStart: boolean().default(false),
12522
12667
  /** 0 = never; frees RAM after quiet periods. */
12523
12668
  idleStopMinutes: number().int().default(30)
12524
12669
  });
12670
+ /**
12671
+ * Where a multi-GB install currently is. A single 0..1 fraction cannot answer
12672
+ * "is it stuck?" for an install that is three files (shards + mmproj) followed
12673
+ * by a sha256 pass over 22 GB — during which the fraction sat at 1.0 and the
12674
+ * node looked hung. Phase + file + bytes is the smallest shape that does.
12675
+ */
12676
+ var LlmDownloadProgressSchema = object({
12677
+ phase: _enum(["downloading", "verifying"]),
12678
+ /** The artifact currently moving, e.g. `mmproj-F16.gguf`. */
12679
+ file: string(),
12680
+ fileIndex: number().int(),
12681
+ fileCount: number().int(),
12682
+ /** Across the WHOLE install, not the current file. */
12683
+ downloadedBytes: number(),
12684
+ totalBytes: number().optional()
12685
+ });
12525
12686
  var LlmRuntimeStatusSchema = object({
12526
12687
  /** Status is ALWAYS node-qualified. */
12527
12688
  nodeId: string(),
@@ -12538,6 +12699,8 @@ var LlmRuntimeStatusSchema = object({
12538
12699
  modelPath: string().optional(),
12539
12700
  modelId: string().optional(),
12540
12701
  downloadProgress: number().min(0).max(1).optional(),
12702
+ /** Detail behind `downloadProgress`; present for the same lifetime. */
12703
+ download: LlmDownloadProgressSchema.optional(),
12541
12704
  lastError: string().optional(),
12542
12705
  crashesInWindow: number(),
12543
12706
  /** Child RSS (sampled best-effort). */
@@ -12548,7 +12711,14 @@ var LlmNodeModelSchema = object({
12548
12711
  file: string(),
12549
12712
  sizeBytes: number(),
12550
12713
  catalogId: string().optional(),
12551
- installedAt: number().optional()
12714
+ installedAt: number().optional(),
12715
+ /**
12716
+ * Absolute path on the node. Present so a file that is on disk but matches
12717
+ * no catalog entry — a custom Hugging Face install, or a GGUF the operator
12718
+ * copied in by hand — is still SELECTABLE, as a `{kind:'path'}` ref. Without
12719
+ * it the picker could list such a file and do nothing with it.
12720
+ */
12721
+ path: string().optional()
12552
12722
  });
12553
12723
  var LlmRuntimeDiskUsageSchema = object({
12554
12724
  nodeId: string(),
@@ -12604,10 +12774,47 @@ var LlmProfileSchema = object({
12604
12774
  baseUrl: string().optional(),
12605
12775
  /** ConfigUISchema type:'password' — never round-trips (spec §5). */
12606
12776
  apiKey: string().optional(),
12777
+ /** Vision on/off. A vision call against a `false` profile is REFUSED, never
12778
+ * degraded to text — that shipped once and produced a confident answer to a
12779
+ * question about a picture nobody sent. */
12607
12780
  supportsVision: boolean(),
12608
12781
  temperature: number().min(0).max(2).optional(),
12782
+ /** Nucleus sampling. Every wire we speak has it. */
12783
+ topP: number().min(0).max(1).optional(),
12784
+ /** Top-k sampling. Carried only by the wires that have it — NEITHER OpenAI
12785
+ * wire does, and the client drops it there (measured: the request body gets
12786
+ * `top_p` and no `top_k`). The profile editor hides the field wherever it
12787
+ * would change nothing; `KINDS_WITH_TOP_K` is the single owner of that list. */
12788
+ topK: number().int().positive().optional(),
12609
12789
  maxTokens: number().int().positive().optional(),
12790
+ /** Prompt context window. Advisory for cloud kinds (they enforce their own);
12791
+ * for `managed-local` it is the llama.cpp `--ctx-size` the runtime starts
12792
+ * the model with, so it is the one field that changes a PROCESS. */
12793
+ contextLength: number().int().positive().optional(),
12794
+ /** Default system prompt. A caller's `system` REPLACES it (never appends —
12795
+ * two system prompts fighting is worse than either alone). */
12796
+ systemPrompt: string().optional(),
12797
+ /** Total generation bound — the only one a unary call has. */
12610
12798
  timeoutMs: number().int().positive().default(6e4),
12799
+ /** The TCP handshake only — "is the port even open". NOT the wait for
12800
+ * response headers: on the LM Studio / llama-server wire those are written
12801
+ * once the model has finished loading, so they belong to the bound below. */
12802
+ connectTimeoutMs: number().int().positive().default(1e4),
12803
+ /** Accepted, but no output yet — response headers included, because a cold
12804
+ * GPU load is exactly what happens before them. */
12805
+ firstTokenTimeoutMs: number().int().positive().default(12e4),
12806
+ /** Output started then stopped. */
12807
+ idleTimeoutMs: number().int().positive().default(6e4),
12808
+ /** Profile-level default. The per-consumer table and a per-call override
12809
+ * both beat it — see `resolveRetryPolicy`. */
12810
+ retry: LlmRetryPolicySchema.default({
12811
+ enabled: false,
12812
+ maxAttempts: 1
12813
+ }),
12814
+ /** Whether this profile may use tools. The tool-call plumbing rides the
12815
+ * library; the REGISTRY of callable tools is ours and is empty in v1, so a
12816
+ * `true` here buys the wiring, not behaviour, until tools are registered. */
12817
+ toolsEnabled: boolean().default(false),
12611
12818
  extraHeaders: record(string(), string()).optional(),
12612
12819
  /** kind === 'managed-local' only (spec §4). */
12613
12820
  runtime: ManagedRuntimeConfigSchema.optional()
@@ -12657,6 +12864,36 @@ var ManagedModelCatalogEntrySchema = object({
12657
12864
  /** Vision models: companion projector file. */
12658
12865
  mmprojUrl: string().optional()
12659
12866
  });
12867
+ /**
12868
+ * The outcome of turning one operator-typed Hugging Face reference into a
12869
+ * download plan. A RESULT, never a throw: "this repo has 24 quantizations and
12870
+ * I will not pick for you" is a normal answer the UI has to render, not an
12871
+ * exception.
12872
+ *
12873
+ * `candidates` is the whole reason the refusal is usable — every string in it
12874
+ * is a tag that resolves when pasted back as `<org>/<repo>:<TAG>`.
12875
+ */
12876
+ var HfModelResolutionSchema = discriminatedUnion("ok", [object({
12877
+ ok: literal(true),
12878
+ /** Ready to hand to `installModel` unchanged. */
12879
+ model: ManagedModelRefSchema,
12880
+ label: string(),
12881
+ repo: string(),
12882
+ quantization: string(),
12883
+ purpose: _enum(["text", "vision"]),
12884
+ totalBytes: number(),
12885
+ /** mmproj + shards, for the preview: an operator approving 23 GB should
12886
+ * see that 0.9 GB of it is a projector they did not name. */
12887
+ extraFilenames: array(string())
12888
+ }), object({
12889
+ ok: literal(false),
12890
+ code: string(),
12891
+ message: string(),
12892
+ candidates: array(string()).optional(),
12893
+ /** Set when the refusal was only the ceiling: re-calling with
12894
+ * `maxBytes: requiredBytes` is the operator's explicit override. */
12895
+ requiredBytes: number().optional()
12896
+ })]);
12660
12897
  var LlmRuntimeNodeSchema = object({
12661
12898
  nodeId: string(),
12662
12899
  reachable: boolean(),
@@ -12669,7 +12906,10 @@ var ProfileRefInputSchema = object({
12669
12906
  addonId: string(),
12670
12907
  profileId: string()
12671
12908
  });
12672
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
12909
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
12910
+ addonId: string().optional(),
12911
+ requestId: string()
12912
+ }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
12673
12913
  kind: "mutation",
12674
12914
  auth: "admin"
12675
12915
  }), method(ProfileRefInputSchema, _void(), {
@@ -12690,6 +12930,15 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
12690
12930
  consumer: string().optional(),
12691
12931
  profileId: string().optional()
12692
12932
  }), array(LlmUsageRollupSchema)), method(object({}), array(ManagedModelCatalogEntrySchema)), method(object({}), array(LlmRuntimeNodeSchema)), method(object({ nodeId: string() }), array(LlmNodeModelSchema)), method(object({
12933
+ /** `https://huggingface.co/<org>/<repo>/resolve/main/<f>.gguf`,
12934
+ * `<org>/<repo>/<f>.gguf`, `<org>/<repo>` or `<org>/<repo>:<QUANT>`. */
12935
+ ref: string(),
12936
+ /** Explicit ceiling override, in bytes. Absent = the built-in ceiling. */
12937
+ maxBytes: number().positive().optional()
12938
+ }), HfModelResolutionSchema, {
12939
+ kind: "mutation",
12940
+ auth: "admin"
12941
+ }), method(object({
12693
12942
  nodeId: string(),
12694
12943
  model: ManagedModelRefSchema
12695
12944
  }), _void(), {
@@ -14337,6 +14586,8 @@ var NcSystemEventKindSchema = _enum([
14337
14586
  "stream-offline",
14338
14587
  "node-online",
14339
14588
  "node-offline",
14589
+ "node-inference-unavailable",
14590
+ "detection-blind",
14340
14591
  "addon-update-available",
14341
14592
  "server-update-available",
14342
14593
  "alarm-triggered",
@@ -14398,7 +14649,16 @@ var NcScheduleSchema = object({
14398
14649
  });
14399
14650
  /** Fuzzy plate matcher — OCR noise makes exact match useless (spec row 12/13). */
14400
14651
  var NcPlateMatcherSchema = object({
14401
- values: array(string().min(1)).min(1),
14652
+ /**
14653
+ * Plate texts (or gallery vehicle names) to match. EMPTY = **any plate the
14654
+ * pipeline could read** — the plate half of "no selection = no narrowing",
14655
+ * and the switch that says this rule is about vehicles that were IDENTIFIED
14656
+ * rather than merely seen. A subject carrying no plate still fails.
14657
+ *
14658
+ * The `.min(1)` this used to carry made that state unauthorable; nothing has
14659
+ * ever persisted an empty list, so widening it cannot change an existing rule.
14660
+ */
14661
+ values: array(string().min(1)),
14402
14662
  /** Max Levenshtein distance after normalization (uppercase alphanumeric). */
14403
14663
  maxDistance: number().int().min(0).max(3).default(1)
14404
14664
  });
@@ -14432,28 +14692,36 @@ var NcOccupancyConditionSchema = object({
14432
14692
  /**
14433
14693
  * Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
14434
14694
  *
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:
14440
- *
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.
14444
- *
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).
14452
- *
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.
14695
+ * **TWO EXCLUSIVE MODES** (operator decision 2026-08-14, D157). Which one a
14696
+ * rule is in is not a stored field it is WHICH FILTER the rule carries, so
14697
+ * there is no second switch that can disagree with the first and every rule
14698
+ * authored before the decision migrates for free (`audioModeOf`):
14699
+ *
14700
+ * - **LABEL mode — `labels` present.** The rule fires on the FIRST frame the
14701
+ * classifier labels with one of them. No window, no percentage:
14702
+ * `hitPercent` and `samplingSeconds` are ignored, and the rule's own
14703
+ * `throttle` cooldown is the only brake. The per-label confidence floor is
14704
+ * the analyzer's (`classificationMinScore`, per device) — a label only
14705
+ * reaches this condition if the classifier was already confident enough.
14706
+ * - **LEVEL mode `dbThreshold` present, no labels.** The sampling window IS
14707
+ * the condition: at least `hitPercent`% of the samples over
14708
+ * `samplingSeconds` must be at or above `dbThreshold` dBFS (see
14709
+ * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale). The window
14710
+ * must be FULL before it can match a window open for two of its ten
14711
+ * seconds is 100% of nothing.
14712
+ *
14713
+ * **Why label mode has no window.** It had one, and it never fired: the
14714
+ * analyzer emits ~1 audio frame per second but YAMNet only LABELS one to three
14715
+ * of them per episode, even through continuous crying. The measured maximum
14716
+ * `hitPercent` over the whole live history was 40 — under the shipped default
14717
+ * of 60, so a label rule could not fire at all, ever. A percentage of frames is
14718
+ * the wrong question to ask of a sparse classifier.
14719
+ *
14720
+ * **Fail-closed when NEITHER is given** — every sample would be a trivial hit
14721
+ * and the rule would fire on silence. The schema cannot express "exactly one
14722
+ * of" without becoming a ZodEffects the cap path would have to special-case, so
14723
+ * the exclusivity is enforced where every editor writes (`patchAudio`) and a
14724
+ * legacy rule carrying both resolves to LABEL (the mode that fires).
14457
14725
  *
14458
14726
  * Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
14459
14727
  * `audio-*` ids). Both spellings are accepted — the matcher normalizes the
@@ -14461,13 +14729,13 @@ var NcOccupancyConditionSchema = object({
14461
14729
  * an operator who typed `dog` mean the same thing.
14462
14730
  */
14463
14731
  var NcAudioConditionSchema = object({
14464
- /** Audio macro labels; absent = any sound (level-only rule). */
14732
+ /** LABEL MODE: audio macro labels. Present fires on the first labelled frame. */
14465
14733
  labels: array(string().min(1)).min(1).optional(),
14466
- /** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
14734
+ /** LEVEL MODE: floor in dBFS (negative-going, `0` = full scale). */
14467
14735
  dbThreshold: number().min(-96).max(0).optional(),
14468
- /** Percentage of the window's samples that must be hits (1–100). */
14736
+ /** LEVEL MODE ONLY: percentage of the window's samples that must be hits (1–100). */
14469
14737
  hitPercent: number().int().min(1).max(100).default(60),
14470
- /** Length of the sampling window in seconds. */
14738
+ /** LEVEL MODE ONLY: length of the sampling window in seconds. */
14471
14739
  samplingSeconds: number().int().min(1).max(300).default(10)
14472
14740
  });
14473
14741
  /**
@@ -14605,13 +14873,81 @@ var NcRuleActionsSchema = object({
14605
14873
  */
14606
14874
  buttons: array(NcRuleNotificationButtonSchema).max(8).optional()
14607
14875
  });
14876
+ /**
14877
+ * "This rule applies only while `deviceId` is in one of `states`."
14878
+ *
14879
+ * The states are the DEVICE's own vocabulary — `AlarmState` for a panel,
14880
+ * `on`/`off` for a switch — not a normalised set, because normalising would
14881
+ * make the condition lie about devices whose states have no equivalent.
14882
+ *
14883
+ * An unreadable state does NOT match: see the engine's fail-closed gate. A
14884
+ * condition that fired on "I could not read it" would be worse than no gate.
14885
+ */
14886
+ var NcDeviceStateConditionSchema = object({
14887
+ deviceId: number().int(),
14888
+ /** Any of these matches. */
14889
+ states: array(string().min(1)).min(1)
14890
+ });
14891
+ /**
14892
+ * "This rule applies only while scene `sceneId` is `matched` / `diverged`."
14893
+ *
14894
+ * A GATE, not a trigger. `occupancy` and `audio` each DISCRIMINATE their rule —
14895
+ * carrying one makes the rule fire on that subject and nothing else. Scene is
14896
+ * the other shape entirely, the `deviceState` shape: it narrows a rule that
14897
+ * already has a trigger ("tell me about a person at the front door, but only
14898
+ * while the bin is still out"). That is why it composes with every delivery
14899
+ * instead of owning one, and why no new `NcDelivery` member and no new subject
14900
+ * kind exist for it — see D159.
14901
+ *
14902
+ * ── Identity ───────────────────────────────────────────────────────────────
14903
+ * `sceneId` is `SceneMonitor.id`, a `randomUUID()` minted by `createScene` —
14904
+ * globally unique, so it needs no device to disambiguate it. `deviceId` is
14905
+ * carried as a HINT for the editor and for the log line, never as part of the
14906
+ * lookup key: a rule whose hint drifted must still gate correctly.
14907
+ *
14908
+ * ── Which boolean ──────────────────────────────────────────────────────────
14909
+ * `latched` ABSENT means "whatever the scene itself says" — `SceneMonitor.emit`
14910
+ * already declares which boolean drives notification rules, and a second knob
14911
+ * that could disagree with it is exactly the D62 failure. Set it only to
14912
+ * override one rule against the scene's own default.
14913
+ *
14914
+ * - LIVE reading (`emit`/`latched` resolve to live): passes iff
14915
+ * `verdict === requiredState`. `unknown` — no reference for this light, view
14916
+ * shifted, no snapshot — passes NEITHER. A scene that cannot judge is not
14917
+ * evidence, in either direction.
14918
+ * - LATCHED reading: passes iff `latched === (requiredState === 'diverged')`.
14919
+ * The latch is a durable fact about the past ("it has diverged since I armed
14920
+ * it"), so a camera that has gone dark does not clear it — that is the whole
14921
+ * reason the operator asked for a latch.
14922
+ *
14923
+ * The gate reads an in-memory mirror (`NcSceneStateCache`) refreshed OFF the
14924
+ * event path, never the cap: D49. A mirror that has never loaded, or a scene it
14925
+ * does not carry, reads absent and the rule does NOT fire — fail closed, and
14926
+ * said out loud in the log rather than dropped in silence.
14927
+ */
14928
+ var NcSceneConditionSchema = object({
14929
+ /** `SceneMonitor.id` — the uuid the cap mints. The whole lookup key. */
14930
+ sceneId: string().min(1),
14931
+ /** The camera the scene lives on. A hint for the editor and the log line. */
14932
+ deviceId: number().int().optional(),
14933
+ /** The state the scene must be in for the rule to fire. */
14934
+ requiredState: _enum(["matched", "diverged"]),
14935
+ /**
14936
+ * Read the LATCH (`true`) or the LIVE verdict (`false`). Absent = follow the
14937
+ * scene's own `emit` field, which is the only place that decision belongs.
14938
+ */
14939
+ latched: boolean().optional()
14940
+ });
14608
14941
  var NcConditionsSchema = object({
14609
14942
  /** 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().min(1)).min(1)
14614
- }).optional(),
14943
+ deviceState: NcDeviceStateConditionSchema.optional(),
14944
+ /**
14945
+ * Gate on a SCENE's state — "only while the bin is still out". Composes with
14946
+ * every trigger (detection, occupancy, audio, sensor, package, track-end);
14947
+ * unlike `occupancy`/`audio` it discriminates nothing. See
14948
+ * {@link NcSceneCondition} and D159.
14949
+ */
14950
+ scene: NcSceneConditionSchema.optional(),
14615
14951
  /** Device scope — absent = all devices. */
14616
14952
  devices: array(number()).optional(),
14617
14953
  /** Detector class names (any overlap with the record's class set). */
@@ -14637,18 +14973,47 @@ var NcConditionsSchema = object({
14637
14973
  */
14638
14974
  labelEquals: array(string().min(1)).optional(),
14639
14975
  /**
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.
14976
+ * KNOWN FACES the rule's identity scope, and the switch that says the rule
14977
+ * is about recognised people at all.
14978
+ *
14979
+ * Three states, and the empty one is the point:
14980
+ *
14981
+ * | value | meaning |
14982
+ * | --- | --- |
14983
+ * | absent | the rule does not care who it is; an unrecognised person matches |
14984
+ * | `[]` | **only known faces** — any identity in the gallery, nobody in particular |
14985
+ * | a list | only these identities |
14986
+ *
14987
+ * `[]` is the repo-wide "no selection = no narrowing" reading (an absent
14988
+ * `devices` list is every device), applied one level down: the operator has
14989
+ * turned the face scope ON and narrowed it to nothing, which is every known
14990
+ * face. No second field states the same thing — a switch that can disagree
14991
+ * with the list under it is worse than no switch (D62).
14992
+ *
14993
+ * MEMBERS ARE FACE-GALLERY `Identity.id`s (uuid), not display names. A name is
14994
+ * renameable, and a rule authored on "Gianluca" went silently dark the moment
14995
+ * the operator fixed the spelling. The id reaches the record on
14996
+ * `LabelAttribution.identityId`; the name is what the editor shows and what
14997
+ * `{{label}}` renders.
14998
+ *
14999
+ * Rules written before this carry NAMES, and are resolved to ids lazily at
15000
+ * load (`NcRuleStore.load`) against the live gallery — a name nothing answers
15001
+ * for is left as it stands and reported, never dropped. The engine also
15002
+ * accepts a display-name hit as a compatibility leg, so a rule whose
15003
+ * migration could not resolve keeps matching exactly what it matched before.
14643
15004
  */
14644
15005
  identities: array(string().min(1)).optional(),
14645
- /** Fuzzy plate matcher against the record's `label` (plate text). */
15006
+ /**
15007
+ * KNOWN PLATES / VEHICLES — the plate mirror of {@link identities}, including
15008
+ * the empty-list reading: `values: []` is "any plate the OCR could read",
15009
+ * a non-empty list is those plates (fuzzily). See {@link NcPlateMatcherSchema}.
15010
+ */
14646
15011
  plates: NcPlateMatcherSchema.optional(),
14647
15012
  /**
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.
15013
+ * Identity EXCLUDE — mirror of {@link identities} with `notIn` semantics, and
15014
+ * the same id members and the same lazy name→id migration. A record with NO
15015
+ * identity passes (nothing to exclude), unlike the include variant which
15016
+ * fails on an unrecognised subject. An EMPTY list excludes nobody.
14652
15017
  */
14653
15018
  identitiesExclude: array(string().min(1)).optional(),
14654
15019
  /**
@@ -15040,7 +15405,80 @@ var NcRuleInputSchema = object({
15040
15405
  * a rule that predates the gate must keep delivering byte-for-byte as it
15041
15406
  * did, and absent is the only way to say that without a migration.
15042
15407
  */
15043
- confirm: NcConfirmSchema.optional()
15408
+ confirm: NcConfirmSchema.optional(),
15409
+ /**
15410
+ * WAIT for face/plate recognition before saying anything.
15411
+ *
15412
+ * A notification's TEXT is frozen at enqueue and its media is re-resolved at
15413
+ * send; the identity is neither. A face is confirmed after `confirmFrames`
15414
+ * agreeing observations — p50 **11.4 s** after the track was first seen,
15415
+ * measured on this hub — and an `immediate` rule enqueues on the first object
15416
+ * event, seconds before that. So "Gianluca è arrivato" is unsayable on the
15417
+ * immediate path, and no amount of media re-resolution fixes a sentence.
15418
+ *
15419
+ * Only two honest answers exist, and this flag picks between them. It has
15420
+ * effect ONLY on a rule that declares a recognition scope
15421
+ * ({@link NcConditions.identities} or {@link NcConditions.plates}) — on any
15422
+ * other rule there is nothing to wait for and the flag is inert.
15423
+ *
15424
+ * | value | what happens |
15425
+ * | --- | --- |
15426
+ * | `true` | the rule stops firing on the object event and fires at TRACK CLOSE instead, once, with the name — later, and complete |
15427
+ * | 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) |
15428
+ *
15429
+ * `.optional()` and deliberately NOT `.default()`: a Zod default does not run
15430
+ * on the addon cap path, and absent has to keep meaning exactly what every
15431
+ * rule authored before this field meant.
15432
+ *
15433
+ * The cost of `true` is stated here because the editor states it too: a rule
15434
+ * that waits also inherits track-close SEMANTICS — its `zones` condition
15435
+ * tests every zone the track visited and a `crossing` condition can no longer
15436
+ * be satisfied, because a closed track carries no crossing.
15437
+ */
15438
+ waitForEnhancement: boolean().optional(),
15439
+ /**
15440
+ * GROUP a burst of subjects into ONE notification that grows.
15441
+ *
15442
+ * Seconds of quiet after the last matching subject before the burst is
15443
+ * considered over. While it is open, the first subject enqueues immediately —
15444
+ * **exactly as today, with no added latency** — and every real growth (a new
15445
+ * subject, or a name confirmed on one already in it) REPLACES that
15446
+ * notification with an updated one naming everybody. The push carries the
15447
+ * group's own coalescing tag, so the phone replaces rather than stacks.
15448
+ *
15449
+ * `0` / absent = off, and off is today's behaviour byte for byte.
15450
+ *
15451
+ * ### Why an idle cutoff and not a window
15452
+ *
15453
+ * The measured seven-person arrival on device 590 spans 110 s with every
15454
+ * internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
15455
+ * idle cutoff holds it as one and ends it when the arrival actually ends.
15456
+ * 30 is Frigate's shipped value for the same decision.
15457
+ *
15458
+ * ### What it replaces
15459
+ *
15460
+ * The blind cooldown, which collapses a burst by DISCARDING it. Measured on
15461
+ * device 615 / *Persona su Uscio* over six days: 116 qualifying tracks → 74
15462
+ * notifications, **44 (37.9%) suppressed outright**, 23 of them overlapping a
15463
+ * track that did fire and 7 carrying a confirmed identity nobody heard about.
15464
+ * A group collapses the same volume by MERGING, so the cooldown becomes a
15465
+ * budget over GROUPS — which is what it always meant — and a growth is never
15466
+ * throttled by the window its own first member spent.
15467
+ *
15468
+ * ### Interaction with {@link waitForEnhancement}
15469
+ *
15470
+ * They compose, and the order matters. `waitForEnhancement` defers the rule to
15471
+ * TRACK CLOSE, so with both set the group is opened by the first member to
15472
+ * CLOSE — already carrying its name — and grows as later members close. That
15473
+ * is later, and complete. With grouping alone the group opens on the first
15474
+ * object event and picks up names as they are confirmed, through the growth
15475
+ * path. Neither combination fires twice for one subject.
15476
+ *
15477
+ * `.optional()` and deliberately NOT `.default()`: a Zod default does not run
15478
+ * on the addon cap path, so absent must keep meaning what it meant before this
15479
+ * field existed.
15480
+ */
15481
+ groupIdleSec: number().int().min(0).max(600).optional()
15044
15482
  });
15045
15483
  /**
15046
15484
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -15147,6 +15585,7 @@ var NcConditionDescriptorSchema = object({
15147
15585
  "occupancy",
15148
15586
  "audio",
15149
15587
  "deviceState",
15588
+ "scene",
15150
15589
  "systemEvent"
15151
15590
  ]),
15152
15591
  operator: _enum([
@@ -15552,7 +15991,87 @@ var MethodAccessSchema = _enum([
15552
15991
  var AllowedProviderSchema = union([literal("*"), array(string())]);
15553
15992
  var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
15554
15993
  var CapScopeSchema = _enum(["device", "system"]);
15555
- var TokenScopeSchema = discriminatedUnion("type", [
15994
+ /**
15995
+ * DeviceSelector (scope model v3 — 2026-08-12).
15996
+ *
15997
+ * A `device` grant no longer carries a frozen list of deviceIds. It carries
15998
+ * a SELECTOR the matcher resolves against the live fleet, so the grant can be
15999
+ * DYNAMIC: a `types:['camera']` selector automatically covers a camera added
16000
+ * AFTER the grant was minted — no re-grant, no re-login.
16001
+ *
16002
+ * - `all` — every device in the deployment. The broad viewer/operator
16003
+ * lever without a `category` grant (a `category` grant also covers device
16004
+ * caps that carry no deviceId; `all` is specifically the device set).
16005
+ * - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
16006
+ * grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
16007
+ * is NOT covered until the grant is edited.
16008
+ * - `types` — every device of a `DeviceType` (e.g. every `camera`).
16009
+ * DYNAMIC. A device that changes type, or a new device of the type,
16010
+ * re-resolves on the next request.
16011
+ * - `locations` — every device whose operator-assigned `location` label is
16012
+ * in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
16013
+ * null/unset location matches NO `locations` selector.
16014
+ */
16015
+ var DeviceSelectorSchema = discriminatedUnion("kind", [
16016
+ object({ kind: literal("all") }),
16017
+ object({
16018
+ kind: literal("ids"),
16019
+ ids: array(number().int()).min(1)
16020
+ }),
16021
+ object({
16022
+ kind: literal("types"),
16023
+ types: array(_enum(DeviceType)).min(1)
16024
+ }),
16025
+ object({
16026
+ kind: literal("locations"),
16027
+ locations: array(string().min(1)).min(1)
16028
+ })
16029
+ ]);
16030
+ var DeviceTokenScopeSchema = object({
16031
+ type: literal("device"),
16032
+ /** The device SET this grant covers — resolved against the live fleet. */
16033
+ selector: DeviceSelectorSchema,
16034
+ access: array(MethodAccessSchema).min(1),
16035
+ /**
16036
+ * Whether a grant on a PARENT device transparently covers its accessory
16037
+ * CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
16038
+ * Direction is parent → children ONLY.
16039
+ *
16040
+ * Absent → the matcher DERIVES it from the access flavour: `view`
16041
+ * inherits (a camera viewer sees the camera's accessories), `create` /
16042
+ * `delete` do NOT (actuating/removing a child is an explicit act the
16043
+ * operator must grant on the child, not inherit from the parent). Set it
16044
+ * explicitly to override that default per grant.
16045
+ */
16046
+ includeLinked: boolean().optional()
16047
+ });
16048
+ /**
16049
+ * v2 → v3 lazy migration. A pre-v3 `device` grant carried
16050
+ * `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
16051
+ * `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
16052
+ * EVERY parse path — stored records AND the JWT-carried scope arrays
16053
+ * normalised at the request boundary ({@link normalizeTokenScopes} in
16054
+ * `device-selector.ts`). Chosen over a one-time DB migration because a
16055
+ * migration cannot reach a JWT already in a client's hands; parse-time
16056
+ * migration covers both without a flag day. No cast — the raw object is read
16057
+ * through `Reflect.get` (its static type is `unknown`).
16058
+ */
16059
+ function migrateLegacyTokenScope(raw) {
16060
+ if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
16061
+ if (Reflect.get(raw, "type") !== "device") return raw;
16062
+ if (Reflect.get(raw, "selector") !== void 0) return raw;
16063
+ const targets = Reflect.get(raw, "targets");
16064
+ if (!Array.isArray(targets)) return raw;
16065
+ return {
16066
+ type: "device",
16067
+ selector: {
16068
+ kind: "ids",
16069
+ ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
16070
+ },
16071
+ access: Reflect.get(raw, "access")
16072
+ };
16073
+ }
16074
+ var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
15556
16075
  object({
15557
16076
  type: literal("category"),
15558
16077
  target: CapScopeSchema,
@@ -15568,18 +16087,8 @@ var TokenScopeSchema = discriminatedUnion("type", [
15568
16087
  target: string(),
15569
16088
  access: array(MethodAccessSchema).min(1)
15570
16089
  }),
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()).min(1),
15580
- access: array(MethodAccessSchema).min(1)
15581
- })
15582
- ]);
16090
+ DeviceTokenScopeSchema
16091
+ ]));
15583
16092
  object({
15584
16093
  id: string(),
15585
16094
  username: string(),
@@ -15896,7 +16405,7 @@ var TrackEnvelopeSchema = object({
15896
16405
  * `snapshots[]` references — megabytes across a page of tracks. `slim`
15897
16406
  * keeps every scalar the list surfaces actually render (ids, class(es),
15898
16407
  * label / audioLabels / importance enrichment, firstSeen/lastSeen, state,
15899
- * zonesVisited, bestEventId, envelope, hasFace) and returns `positions` /
16408
+ * zonesVisited, bestEventId, envelope, hasFace, hasRider) and returns `positions` /
15900
16409
  * `snapshots` as EMPTY arrays — detail views re-fetch the full row via
15901
16410
  * `getTrack`. Mirrors the event-store `projection` convention
15902
16411
  * (`getObjectEvents` et al.).
@@ -16032,7 +16541,21 @@ union([literal(1), literal(2)]);
16032
16541
  var LabelAttributionSchema = object({
16033
16542
  stepId: string(),
16034
16543
  modelId: string().optional(),
16035
- decidedAt: number()
16544
+ decidedAt: number(),
16545
+ /**
16546
+ * The GALLERY id behind a recognised tier-2 label — a face-gallery
16547
+ * `Identity.id` or a plate-gallery `Vehicle.id` (both `randomUUID`).
16548
+ *
16549
+ * The text alone is a DISPLAY NAME, and a display name is renameable: a
16550
+ * notification rule authored on "Gianluca" stopped matching the moment the
16551
+ * operator fixed the spelling in the gallery, and nothing said so. The id is
16552
+ * the thing that does not move, so it is what a rule matches on
16553
+ * (`NcConditions.identities`) and the text is what a human is shown.
16554
+ *
16555
+ * Absent when the label names no gallery row — a plate the OCR read but no
16556
+ * vehicle claims, a sub-class, a species, any tier-1 value.
16557
+ */
16558
+ identityId: string().optional()
16036
16559
  });
16037
16560
  /**
16038
16561
  * The TIERED label model (roadmap 4g), spread into `TrackSchema` and
@@ -16169,6 +16692,28 @@ var TrackSchema = object({
16169
16692
  * `=== true` and render nothing otherwise, never infer "no face".
16170
16693
  */
16171
16694
  hasFace: boolean().optional(),
16695
+ /**
16696
+ * This subject CONTAINS a folded rider — a person the rider-pairing step
16697
+ * ([D34](../decisions/adr-0034.md)) removed from the frame BEFORE the tracker,
16698
+ * so the passage is tracked once and as a VEHICLE.
16699
+ *
16700
+ * It exists because the fold's record was dishonest. D34 and the code both
16701
+ * said "the person is not lost — it is reported so both entities stay on the
16702
+ * record"; in fact the pair went into a per-processor RAM field behind an
16703
+ * accessor nobody called, and every durable surface said `vehicle`, full
16704
+ * stop. This is the composition note that makes the row true.
16705
+ *
16706
+ * A COMPOSITION, never a class and never a label. "This vehicle contains a
16707
+ * person" is not an answer to "what is this" — both label tiers would refuse
16708
+ * a macro token anyway (D89), and correctly. Nothing here changes what the
16709
+ * subject IS: a cyclist stays one vehicle track, occupancy still counts one,
16710
+ * and a `person` rule still does not fire for someone cycling past.
16711
+ *
16712
+ * **Absent ≠ false**, exactly like {@link hasFace}: every row written before
16713
+ * the column, and every hub that predates the field, omits it. Test
16714
+ * `=== true` and render nothing otherwise — never infer "no rider".
16715
+ */
16716
+ hasRider: boolean().optional(),
16172
16717
  ...TrackFlagFields,
16173
16718
  ...TrackRetrainFields
16174
16719
  });
@@ -16518,7 +17063,10 @@ var RecentTracksQueryInput = object({
16518
17063
  * Encodes the (lastSeen, trackId) sort position — treat as opaque. */
16519
17064
  cursor: string().optional(),
16520
17065
  /** See {@link TrackProjectionSchema}. Default `full`. */
16521
- projection: TrackProjectionSchema.optional()
17066
+ projection: TrackProjectionSchema.optional(),
17067
+ /** Include stationary-promoted rows (parked objects). Default false: the
17068
+ * feed lists passages; parking records live on the stationary registry. */
17069
+ includeStationary: boolean().optional()
16522
17070
  });
16523
17071
  var RecentTracksPageSchema = object({
16524
17072
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -16736,7 +17284,11 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16736
17284
  zone: TrackZoneFilterSchema.optional(),
16737
17285
  /** See {@link TrackProjectionSchema}. Default `full` (backward
16738
17286
  * compatible — omitting the field keeps today's exact behaviour). */
16739
- projection: TrackProjectionSchema.optional()
17287
+ projection: TrackProjectionSchema.optional(),
17288
+ /** Include stationary-promoted rows (parked objects handed to the
17289
+ * stationary registry). Default false: the timeline lists passages,
17290
+ * not parking records (operator decision, 2026-08-15). */
17291
+ includeStationary: boolean().optional()
16740
17292
  }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
16741
17293
  kind: "mutation",
16742
17294
  auth: "admin"
@@ -16900,11 +17452,16 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16900
17452
  auth: "admin"
16901
17453
  }), method(object({
16902
17454
  eventId: string(),
16903
- kind: MediaFileKindEnum.optional()
17455
+ kind: MediaFileKindEnum.optional(),
17456
+ deviceId: number()
17457
+ }), array(MediaFileSchema).readonly()), method(object({
17458
+ trackId: string(),
17459
+ kinds: array(MediaFileKindEnum).optional(),
17460
+ deviceId: number()
16904
17461
  }), array(MediaFileSchema).readonly()), method(object({
16905
17462
  trackId: string(),
16906
- kinds: array(MediaFileKindEnum).optional()
16907
- }), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
17463
+ deviceId: number()
17464
+ }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
16908
17465
  kind: "mutation",
16909
17466
  auth: "admin"
16910
17467
  }), method(RebuildObjectEmbeddingsInput, RebuildObjectEmbeddingsResultSchema, {
@@ -17604,6 +18161,17 @@ var maxSessionHoldMsField = {
17604
18161
  default: 12e4,
17605
18162
  step: 5e3
17606
18163
  };
18164
+ /**
18165
+ * Quiet period that closes an `audioMode: 'on-motion'` audio window. Floor of
18166
+ * 5s so a rearm can never degenerate into per-event stream churn; default 90s
18167
+ * comfortably outlives the gap between two PIR wakes on a battery camera.
18168
+ */
18169
+ var audioMotionWindowMsField = {
18170
+ min: 5e3,
18171
+ max: 6e5,
18172
+ default: 9e4,
18173
+ step: 5e3
18174
+ };
17607
18175
  var motionFpsField = {
17608
18176
  min: 1,
17609
18177
  max: 30,
@@ -17635,7 +18203,7 @@ var detectionFpsField = {
17635
18203
  var occupancyRecheckSecField = {
17636
18204
  min: 0,
17637
18205
  max: 300,
17638
- default: 30,
18206
+ default: 300,
17639
18207
  step: 5
17640
18208
  };
17641
18209
  var occupancyRecheckFramesField = {
@@ -17780,6 +18348,27 @@ var RunnerCameraConfigSchema = object({
17780
18348
  * resolved `CameraDetectionConfig`.
17781
18349
  */
17782
18350
  maxSessionHoldMs: number().min(maxSessionHoldMsField.min).max(maxSessionHoldMsField.max).optional(),
18351
+ /**
18352
+ * Orchestrator-side quiet period (ms) that closes an `audioMode:
18353
+ * 'on-motion'` audio window, measured from the LAST motion event.
18354
+ *
18355
+ * This exists because the falling edge cannot be relied on. Camera-native
18356
+ * providers emit motion as a RISING EDGE ONLY (Reolink's Baichuan push and
18357
+ * its email-push SMTP path both emit `detected: true` and never the
18358
+ * counterpart); only the frame-diff analyzer emits falls. So on an
18359
+ * onboard-only camera a window that closed only on `detected: false` never
18360
+ * closed at all, and `on-motion` silently behaved as `always-on` — on a
18361
+ * battery camera, the one failure mode the mode exists to prevent.
18362
+ *
18363
+ * Every motion event rearms this timer WITHOUT restarting the stream, so a
18364
+ * burst of re-fires costs nothing. A falling edge, when one does arrive,
18365
+ * still closes earlier via `motionCooldownMs` — whichever comes first wins.
18366
+ *
18367
+ * Not consumed by the runner: carried here so it shares the per-camera
18368
+ * device-settings surface with `motionCooldownMs`, exactly like
18369
+ * `maxSessionHoldMs`.
18370
+ */
18371
+ audioMotionWindowMs: number().min(audioMotionWindowMsField.min).max(audioMotionWindowMsField.max).optional(),
17783
18372
  motionFps: number().min(motionFpsField.min).max(motionFpsField.max).default(motionFpsField.default),
17784
18373
  detectionFps: number().min(detectionFpsField.min).max(detectionFpsField.max).default(detectionFpsField.default),
17785
18374
  motionStreamId: string(),
@@ -17875,7 +18464,7 @@ var RunnerCameraConfigSchema = object({
17875
18464
  */
17876
18465
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
17877
18466
  });
17878
- 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;
18467
+ 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;
17879
18468
  /**
17880
18469
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
17881
18470
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -18980,7 +19569,16 @@ targets: array(object({
18980
19569
  /** A sleeping battery camera: the frame is deliberately stale and will
18981
19570
  * NOT refresh in the background. A surface should say so rather than
18982
19571
  * present it as current. */
18983
- sleeping: boolean()
19572
+ sleeping: boolean(),
19573
+ /** Current device state rendered over the cached frame. State images
19574
+ * remain authoritative even when their photographic background is
19575
+ * old; null means the link must carry a current camera frame. */
19576
+ stateReason: _enum([
19577
+ "disabled",
19578
+ "sleeping",
19579
+ "unreachable",
19580
+ "waking"
19581
+ ]).nullable()
18984
19582
  })))
18985
19583
  },
18986
19584
  status: {
@@ -20640,6 +21238,25 @@ var BatteryStatusSchema = object({
20640
21238
  /** Ms epoch of the last observation. Lets consumers reason about freshness. */
20641
21239
  lastUpdated: number(),
20642
21240
  /**
21241
+ * Ms epoch of the last time the device PROVED it was reachable — a
21242
+ * completed firmware round-trip, an observed wake, or an inbound push
21243
+ * (firmware event, email). `0`/absent = never since this slice was born.
21244
+ *
21245
+ * This is the ONLY input that separates "asleep" from "gone", and it is
21246
+ * fed exclusively by PASSIVE signals: nothing may write it by reaching
21247
+ * for the radio, because a poll that confirms reachability is the same
21248
+ * poll that drains the battery. See {@link deriveBatteryPresence} — the
21249
+ * single derivation every consumer must use; no surface computes its own.
21250
+ *
21251
+ * It is deliberately NOT a clock in the
21252
+ * `scripts/check-runtime-state-durability.ts` sense: it is the
21253
+ * observation itself, and it is the only thing a 30-hour silence is
21254
+ * visible in. Writers quantise it (see `CONTACT_WRITE_QUANTUM_MS` in the
21255
+ * Reolink provider) so a value that means "recently" cannot cost a
21256
+ * SQLite commit per round-trip.
21257
+ */
21258
+ lastContactAt: number().optional(),
21259
+ /**
20643
21260
  * True when the source is a BINARY low-battery indicator (HA
20644
21261
  * `binary_sensor` device_class=battery / `LOW_BAT`) that has no real
20645
21262
  * charge level — `percentage` is then a coarse stand-in (100 = normal,
@@ -23001,7 +23618,41 @@ var intercomCapability = {
23001
23618
  status: {
23002
23619
  schema: IntercomStatusSchema,
23003
23620
  kind: "command-driven"
23004
- }
23621
+ },
23622
+ /**
23623
+ * Runtime-state slice — mirrored by the kernel.
23624
+ *
23625
+ * The cap declared `status` and nothing else, so the only two sources an
23626
+ * exporter has for a value — the `device.state-changed` slice event and the
23627
+ * `deviceState.getAllSnapshots` snapshot, both built from runtime state —
23628
+ * carried nothing for `intercom`. A talk-back entity in Home Assistant would
23629
+ * have been published and never received a value, which is the defect the
23630
+ * export's two classification tables exist to prevent (177 of them, once), so
23631
+ * `intercom` was excluded rather than exported.
23632
+ *
23633
+ * The shape is the status shape: there is exactly one truth about talk-back
23634
+ * and duplicating it into a second schema is how two halves of one capability
23635
+ * come to disagree. Providers write it through
23636
+ * `this.runtimeState.setCapState('intercom', …)` at the four points that open
23637
+ * and close a session, and seed it at registration so the slice exists before
23638
+ * the first session rather than after it.
23639
+ *
23640
+ * **Bound, named rather than hidden:** `talking` mirrors the provider's own
23641
+ * session handle, so a session torn down by a transport death that never
23642
+ * reaches `stopSession` / `endTalkSession` leaves it latched until the next
23643
+ * session or the next restart. That is why the slice is `session` and not
23644
+ * `restored` — a restart must never restore "talking".
23645
+ */
23646
+ runtimeState: IntercomStatusSchema,
23647
+ /**
23648
+ * Runtime-state durability: **session** — `talking` describes a live audio
23649
+ * session, which by definition does not survive the process that held it.
23650
+ * Restoring it would publish a camera as talking to nobody.
23651
+ *
23652
+ * See `RuntimeStateDurability`. Enforced by
23653
+ * `scripts/check-runtime-state-durability.ts`.
23654
+ */
23655
+ durability: "session"
23005
23656
  };
23006
23657
  /**
23007
23658
  * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
@@ -25699,7 +26350,7 @@ method(object({
25699
26350
  toMs: number()
25700
26351
  }), RecordingAvailabilitySchema, {
25701
26352
  kind: "query",
25702
- auth: "admin"
26353
+ auth: "protected"
25703
26354
  }), method(object({
25704
26355
  deviceId: number(),
25705
26356
  fromMs: number(),
@@ -25707,14 +26358,14 @@ method(object({
25707
26358
  tzOffsetMinutes: number()
25708
26359
  }), RecordingDaysSchema, {
25709
26360
  kind: "query",
25710
- auth: "admin"
26361
+ auth: "protected"
25711
26362
  }), method(object({
25712
26363
  deviceId: number(),
25713
26364
  fromMs: number(),
25714
26365
  toMs: number()
25715
26366
  }), RecordingManifestSchema, {
25716
26367
  kind: "query",
25717
- auth: "admin"
26368
+ auth: "protected"
25718
26369
  }), method(object({}), RecordingStorageUsageSchema, {
25719
26370
  kind: "query",
25720
26371
  auth: "admin"
@@ -26004,14 +26655,77 @@ method(object({
26004
26655
  * thing except the comparator: `similarity` (CLIP cosine at the same ROI coords
26005
26656
  * vs condition-tagged references) and `llm` (vision-LLM judgment over the crop).
26006
26657
  *
26007
- * D14 device-config archetype (`deviceConfig.ui.kind:'widget'`) the framework
26008
- * derives the device-detail contribution; the provider carries NO hand-written
26009
- * settings-contribution methods. `status.kind:'push'` the engine pushes on
26010
- * every hysteresis flip / availability change; consumers never poll.
26011
- */
26012
- /** Extensible condition tag. Seeded 'day' | 'night'; open by design so more can
26013
- * be added without a wire break (matching falls back to any-condition refs). */
26658
+ * **No `deviceConfig`, deliberately.** This shipped as the D14 widget archetype,
26659
+ * which put a "Scenes" tab on one camera's detail page. That is the wrong shape
26660
+ * for the thing: a scene is a standing question about the property ("is the bin
26661
+ * still out"), and the operator's question is "which of my scenes have tripped",
26662
+ * across every camera at once — not "what does camera 617 think". Buried one
26663
+ * camera deep it also could not be found. The surface is now a top-level admin
26664
+ * page (`/scenes`, `pages/Scenes.tsx`) that lists every scene on every camera and
26665
+ * picks the camera inside the create flow, the same shape Events and Faces have.
26666
+ *
26667
+ * The consequence to keep in mind: `host/scene-monitor-editor` is gone from
26668
+ * `HOST_WIDGETS` too. `scripts/check-host-widget-resolves.ts` asserts BOTH
26669
+ * directions, so a registration nobody declares fails exactly as loudly as a
26670
+ * declaration nobody registers. The editor is imported directly by the page.
26671
+ *
26672
+ * `status.kind:'push'` — the engine pushes on every hysteresis flip /
26673
+ * availability change; consumers never poll.
26674
+ */
26675
+ /** Extensible condition tag. Seeded 'day' | 'ir' (the two variants the operator
26676
+ * captures) plus 'night' | 'dawn' | 'dusk' from the resolver's sun-times band.
26677
+ * Open by design so more can be added without a wire break.
26678
+ *
26679
+ * Matching does NOT fall back across conditions: cross-condition cosines are
26680
+ * not comparable, so "I have never seen this scene in this light" is reported
26681
+ * as `unknown`, never guessed. A day reference scored against an IR frame
26682
+ * collapses the cosine and would latch a false alarm every single night. */
26014
26683
  var SceneConditionSchema = string();
26684
+ /**
26685
+ * What a scene does when the CURRENT light has no reference of its own.
26686
+ *
26687
+ * The lighting variants are not equally likely to exist. Almost every operator
26688
+ * captures daylight and then never stands outside at 22:00 to capture IR, and a
26689
+ * scene that is only ever going to be asked about a daytime question ("is the
26690
+ * bin still on the kerb at 08:00") does not need a night reference at all. The
26691
+ * night half must therefore be OPTIONAL, and optional means the scene keeps
26692
+ * working without it rather than degrading into a permanent complaint.
26693
+ *
26694
+ * - `skip` (default) — the check in that light is not made. Not a verdict, not
26695
+ * an alarm, not even an `unknown`: the live state simply stays whatever the
26696
+ * last covered light left it at, the latch is untouched, and the hysteresis
26697
+ * run is neither spent nor cleared. The scene resumes by itself at first
26698
+ * light. This is the only behaviour under which "I never captured IR" is a
26699
+ * configuration choice instead of a nightly fault.
26700
+ * - `judge-anyway` — score against the OTHER conditions' references. Available
26701
+ * for cameras whose IR frame is close enough to daylight (a floodlit
26702
+ * driveway, an always-white-light doorbell), and wrong for everything else:
26703
+ * cross-condition cosines are not comparable, so a day reference against a
26704
+ * true IR frame collapses and the scene reports a theft at 21:40.
26705
+ *
26706
+ * Never applies when the scene has NO comparable reference at all — that is
26707
+ * "not armed yet", it is reported as `no-reference-for-condition`, and silence
26708
+ * there would hide a scene the operator never finished setting up.
26709
+ */
26710
+ var SceneUncoveredPolicySchema = _enum(["skip", "judge-anyway"]);
26711
+ /** `matched` = the baseline is what we see; `diverged` = it demonstrably is not;
26712
+ * `unknown` = we cannot judge (no reference for this condition, encoder model
26713
+ * changed, view shifted, no snapshot). `unknown` is a real value, not a null,
26714
+ * and never counts toward hysteresis in either direction. */
26715
+ var SceneVerdictSchema = _enum([
26716
+ "matched",
26717
+ "diverged",
26718
+ "unknown"
26719
+ ]);
26720
+ /** Why a scene cannot judge. Named, because this feature's failure mode is
26721
+ * silence that reads as "nothing has happened". */
26722
+ var SceneUnavailableSchema = _enum([
26723
+ "no-reference-for-condition",
26724
+ "view-shifted",
26725
+ "no-vision-profile",
26726
+ "encoder-model-changed",
26727
+ "no-snapshot"
26728
+ ]);
26015
26729
  /** One captured reference — condition-tagged, model-version-gated. `embedding`
26016
26730
  * is `number[]` (Float32Array does NOT survive MsgPack/UDS). */
26017
26731
  var SceneReferenceSchema = object({
@@ -26019,7 +26733,14 @@ var SceneReferenceSchema = object({
26019
26733
  modelId: string(),
26020
26734
  condition: SceneConditionSchema,
26021
26735
  capturedAt: number(),
26022
- thumbnailMediaId: string().optional()
26736
+ thumbnailMediaId: string().optional(),
26737
+ /** Whole-frame (downscaled) embedding captured alongside the ROI crop. The
26738
+ * anti-view-shift anchor: a bumped camera, a PTZ preset or a re-aim makes the
26739
+ * normalized rect frame a different piece of world, and the scene would
26740
+ * diverge forever with a perfectly plausible cosine. Checked LAZILY, only
26741
+ * when hysteresis is about to flip — one extra encode per candidate
26742
+ * transition, not per poll. */
26743
+ anchorEmbedding: array(number()).optional()
26023
26744
  });
26024
26745
  var SceneMonitorStateSchema = object({
26025
26746
  id: string(),
@@ -26041,6 +26762,28 @@ var SceneCheckSchema = discriminatedUnion("mode", [object({
26041
26762
  profileId: string().optional(),
26042
26763
  hysteresisCount: number().int().positive()
26043
26764
  })]);
26765
+ var SCENE_DEFAULT_ANCHOR_THRESHOLD = .85;
26766
+ /** Night is OPTIONAL. A scene with only a daylight reference sits the IR hours
26767
+ * out in silence rather than reporting a fault every night. */
26768
+ var SCENE_DEFAULT_UNCOVERED_POLICY = "skip";
26769
+ /**
26770
+ * Vision-model adjudication of a candidate flip. Field names deliberately
26771
+ * mirror `NcConfirmSchema` so an operator meets one vocabulary, not two.
26772
+ *
26773
+ * `onTimeout` defaults to **'hold'**, the OPPOSITE of `NcConfirmGate`'s
26774
+ * fail-open: a notification suppressed is the worse error there, but a vision
26775
+ * model that timed out has not told us the bin is gone, and a latch is a
26776
+ * stateful claim that costs the operator a trip to reset.
26777
+ */
26778
+ var SceneConfirmSchema = object({
26779
+ enabled: boolean().default(false),
26780
+ prompt: string().min(1).max(1e3),
26781
+ profileId: string().optional(),
26782
+ timeoutMs: number().int().min(1e3).max(2e4).default(8e3),
26783
+ maxImagePx: number().int().min(64).max(2048).default(448),
26784
+ /** What a timeout / unavailable model means for the PENDING flip. */
26785
+ onTimeout: _enum(["flip", "hold"]).default("hold")
26786
+ });
26044
26787
  var SceneMonitorSchema = object({
26045
26788
  id: string(),
26046
26789
  label: string(),
@@ -26059,7 +26802,56 @@ var SceneMonitorSchema = object({
26059
26802
  lastConfidence: number().nullable(),
26060
26803
  currentCondition: SceneConditionSchema.nullable(),
26061
26804
  availability: _enum(["ok", "unavailable"]),
26062
- unavailableReason: string().nullable()
26805
+ unavailableReason: string().nullable(),
26806
+ /** Which state is "the initial screen". `null` until the first capture. */
26807
+ baselineStateId: string().nullable(),
26808
+ /** Which boolean drives notification rules and any export. */
26809
+ emit: _enum(["latched", "live"]).default("latched"),
26810
+ /** Live: does the region match the baseline RIGHT NOW. */
26811
+ verdict: SceneVerdictSchema,
26812
+ /** Has it been `diverged` at least once since `armedAt` — the operator's boolean. */
26813
+ latched: boolean(),
26814
+ /** Last reset (or creation). */
26815
+ armedAt: number(),
26816
+ divergedAt: number().nullable(),
26817
+ restoredAt: number().nullable(),
26818
+ /** A check is only COUNTED when the device has been quiet this long. Motion
26819
+ * during the window DISCARDS the observation — a car pulling up in front of
26820
+ * the bin must not be able to spend hysteresis credit. */
26821
+ quietSeconds: number().int().min(0).max(3600).default(60),
26822
+ /** An observation only advances the pending count when it is at least this
26823
+ * far from the previously counted one, so N agreeing checks span real time
26824
+ * rather than N adjacent polls inside one occlusion. */
26825
+ minObservationSpacingSec: number().int().min(0).max(3600).default(120),
26826
+ /** Vision-model adjudication of a candidate flip. Similarity primary only. */
26827
+ confirm: SceneConfirmSchema.optional(),
26828
+ /** Whole-frame anchor cosine below which a flip is REFUSED as `view-shifted`. */
26829
+ anchorThreshold: number().min(0).max(1).default(SCENE_DEFAULT_ANCHOR_THRESHOLD),
26830
+ /** Clear the latch on its own when the scene matches again? Default false —
26831
+ * `restoredAt` and the `scene-restored` edge are recorded regardless, so an
26832
+ * automation can react to the bin coming back without the operator's own
26833
+ * alarm silently clearing itself. */
26834
+ autoRestore: boolean().default(false),
26835
+ /** What to do when the current light has no reference of its own. See
26836
+ * {@link SceneUncoveredPolicySchema} — the default makes night OPTIONAL. */
26837
+ onUncoveredCondition: SceneUncoveredPolicySchema.default(SCENE_DEFAULT_UNCOVERED_POLICY),
26838
+ /**
26839
+ * The light whose checks are currently being SAT OUT under
26840
+ * `onUncoveredCondition: 'skip'` — `null` when the scene is checking normally.
26841
+ *
26842
+ * Engine-reported and advisory only: it moves no verdict, no latch and no
26843
+ * hysteresis. It exists so the card can say *"night (IR) — checks paused,
26844
+ * nothing captured in this light"* in the same calm voice as the coverage
26845
+ * line, because the alternative is a scene that silently stops answering
26846
+ * after sunset with nothing anywhere saying why. A skipped check must never
26847
+ * read as a broken one.
26848
+ */
26849
+ suspendedCondition: SceneConditionSchema.nullable().default(null),
26850
+ /** Named cause when `verdict === 'unknown'`. */
26851
+ unavailable: SceneUnavailableSchema.nullable(),
26852
+ /** Conditions that have at least one comparable reference — the coverage line
26853
+ * ("day ✓ · ir ✓ · dusk ✗") that turns a silent fallback into a visible fact. */
26854
+ coveredConditions: array(SceneConditionSchema)
26063
26855
  });
26064
26856
  var SceneMonitorStatusSchema = object({
26065
26857
  monitors: array(SceneMonitorSchema),
@@ -26072,12 +26864,6 @@ var sceneMonitorCapability = {
26072
26864
  kind: "wrapper",
26073
26865
  defaultActive: true,
26074
26866
  deviceTypes: [DeviceType.Camera],
26075
- deviceConfig: { ui: {
26076
- kind: "widget",
26077
- widgetId: "host/scene-monitor-editor",
26078
- tab: "scenes",
26079
- label: "Scenes"
26080
- } },
26081
26867
  methods: {
26082
26868
  listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
26083
26869
  createScene: method(object({
@@ -26108,7 +26894,15 @@ var sceneMonitorCapability = {
26108
26894
  "both"
26109
26895
  ]).optional(),
26110
26896
  checkIntervalSec: number().optional(),
26111
- check: SceneCheckSchema.optional()
26897
+ check: SceneCheckSchema.optional(),
26898
+ emit: _enum(["latched", "live"]).optional(),
26899
+ quietSeconds: number().int().min(0).max(3600).optional(),
26900
+ minObservationSpacingSec: number().int().min(0).max(3600).optional(),
26901
+ anchorThreshold: number().min(0).max(1).optional(),
26902
+ autoRestore: boolean().optional(),
26903
+ onUncoveredCondition: SceneUncoveredPolicySchema.optional(),
26904
+ /** `null` clears the vision-model adjudicator. */
26905
+ confirm: SceneConfirmSchema.nullable().optional()
26112
26906
  })
26113
26907
  }), _void(), {
26114
26908
  kind: "mutation",
@@ -26149,6 +26943,26 @@ var sceneMonitorCapability = {
26149
26943
  }), _void(), {
26150
26944
  kind: "mutation",
26151
26945
  auth: "admin"
26946
+ }),
26947
+ /**
26948
+ * Clear the latch, re-arm, and — by default — RE-CAPTURE the baseline for
26949
+ * the CURRENT condition. The bin never goes back in exactly the same spot;
26950
+ * "reset" in the operator's head means *this is the new normal*, and
26951
+ * re-capture is what makes the feature self-healing against slow drift
26952
+ * instead of failing silently weeks later.
26953
+ *
26954
+ * Reachable from three surfaces on this one mutation: the scene card, a
26955
+ * notification button (an `onTrigger` sequence with a `kind:'cap'` step —
26956
+ * no new Notification-Center code at all), and tRPC for scripts.
26957
+ */
26958
+ resetScene: method(object({
26959
+ deviceId: number(),
26960
+ monitorId: string(),
26961
+ /** Defaults to TRUE at the provider seam — see `SCENE_RESET_RECAPTURES`. */
26962
+ recapture: boolean().optional()
26963
+ }), _void(), {
26964
+ kind: "mutation",
26965
+ auth: "admin"
26152
26966
  })
26153
26967
  },
26154
26968
  status: {
@@ -26391,13 +27205,63 @@ var CamStreamDescriptorSchema = object({
26391
27205
  * set of stream descriptors it can offer for the device, synchronously, so the
26392
27206
  * broker can reconcile its registry against the authoritative provider state.
26393
27207
  */
27208
+ /**
27209
+ * The catalog as a DURABLE fact rather than a live answer.
27210
+ *
27211
+ * A battery camera's descriptors are profile-stable — they change when the
27212
+ * operator rewrites an encoder profile, not minute to minute — but building
27213
+ * them costs a Baichuan login, which on a sleeping Argus IS a wake. So the
27214
+ * provider is allowed to build them exactly once per profile and must serve
27215
+ * every later pull from a cache.
27216
+ *
27217
+ * Holding that cache only in RAM is what turned a restart into an outage. The
27218
+ * runner comes back with the camera asleep, `buildStreamCatalogUncached`
27219
+ * correctly refuses to wake it, the pull answers `[]`, the broker has no
27220
+ * cam-stream entry to build a broker from, and `webrtcSession.handleOffer`
27221
+ * fails with a flat "No broker for stream" — for as long as the camera sleeps,
27222
+ * which on a battery cam is most of the day. The camera was fine. The stream
27223
+ * was unreachable because the process had forgotten what the camera offers.
27224
+ *
27225
+ * Declaring it here puts it in `device-runtime-state`, the kernel's canonical
27226
+ * declared collection, with the same `restored` durability `battery` uses for
27227
+ * the same reason: the last known value is the only value there is while the
27228
+ * device is asleep. The broker's brokers are therefore always DEFINABLE — it
27229
+ * is the DIAL that wakes a camera, never the catalog (D173).
27230
+ */
27231
+ var StreamCatalogStateSchema = object({
27232
+ /** The descriptors as last built from a real camera response. Never a guess:
27233
+ * a failed or refused build writes NOTHING, so a restored catalog is always
27234
+ * one the camera itself once produced. */
27235
+ descriptors: array(CamStreamDescriptorSchema),
27236
+ /** Ms epoch of the build that produced {@link descriptors}. Lets the wake
27237
+ * path decide whether the camera's own awake window is worth spending on a
27238
+ * re-read. */
27239
+ lastFetchedAt: number()
27240
+ });
26394
27241
  var streamCatalogCapability = {
26395
27242
  name: "stream-catalog",
26396
27243
  scope: "device",
26397
27244
  deviceNative: true,
26398
27245
  mode: "singleton",
26399
27246
  deviceTypes: [DeviceType.Camera],
26400
- methods: { getCatalog: method(object({ deviceId: number().int().nonnegative() }), array(CamStreamDescriptorSchema).readonly()) }
27247
+ methods: { getCatalog: method(object({ deviceId: number().int().nonnegative() }), array(CamStreamDescriptorSchema).readonly()) },
27248
+ runtimeState: StreamCatalogStateSchema,
27249
+ /**
27250
+ * Runtime-state durability: **restored** — see the schema doc. A cold
27251
+ * catalog on a sleeping battery camera is not a slow first frame, it is a
27252
+ * camera that cannot be watched at all until it happens to wake.
27253
+ *
27254
+ * Churn is nil by construction: the slice is written only by a SUCCESSFUL
27255
+ * build, and a build only runs when there is no cached copy (or the copy is
27256
+ * a day old and the camera is awake anyway).
27257
+ *
27258
+ * See `RuntimeStateDurability`. Enforced by
27259
+ * `scripts/check-runtime-state-durability.ts`.
27260
+ */
27261
+ durability: "restored",
27262
+ /** Clock field: written, but excluded from the compare that decides whether
27263
+ * persisting is worth a SQLite commit — the descriptors are the value. */
27264
+ volatileStateFields: ["lastFetchedAt"]
26401
27265
  };
26402
27266
  /** One of the camera's stream profiles. */
26403
27267
  var StreamProfileSchema = _enum([
@@ -26652,12 +27516,64 @@ var NetworkAddressSchema = object({
26652
27516
  family: string(),
26653
27517
  internal: boolean()
26654
27518
  });
27519
+ /**
27520
+ * Provenance of the site coordinates, and the whole reason this is not just two
27521
+ * numbers.
27522
+ *
27523
+ * - `operator-set` — a human typed it, or accepted a detection. Authoritative;
27524
+ * nothing overwrites it.
27525
+ * - `derived-from-ip` — the hub geolocated its own public IP once, because a
27526
+ * default that is right to a few kilometres beats the coarse UTC clock split
27527
+ * the sun-times consumers otherwise fall back to.
27528
+ *
27529
+ * The UI shows which one it is. An operator who cannot tell a guess from their
27530
+ * own input will eventually trust the guess.
27531
+ */
27532
+ var SiteLocationSourceSchema = _enum(["operator-set", "derived-from-ip"]);
27533
+ /**
27534
+ * The read shape: the location plus the honest state of the one-shot derivation.
27535
+ *
27536
+ * `derivationAttemptedAt` is what makes the "one call, ever" contract
27537
+ * inspectable. When it is set and `location` is null, the geo-IP lookup ran and
27538
+ * failed; the hub will NOT try again on its own — the fallback is declared
27539
+ * (consumers degrade to their own last resort) and the operator either types the
27540
+ * coordinates or presses detect.
27541
+ */
27542
+ var SiteLocationStatusSchema = object({
27543
+ location: object({
27544
+ /** WGS84 decimal degrees. */
27545
+ latitude: number().min(-90).max(90),
27546
+ longitude: number().min(-180).max(180),
27547
+ source: SiteLocationSourceSchema,
27548
+ /** Epoch ms the value was last written. */
27549
+ updatedAt: number(),
27550
+ /**
27551
+ * Human-readable place the geo-IP service reported ("Napoli, IT"). Display
27552
+ * only — never parsed, never matched on. Absent for an operator-typed value.
27553
+ */
27554
+ label: string().optional()
27555
+ }).nullable(),
27556
+ derivationAttemptedAt: number().nullable(),
27557
+ /** Why the last derivation failed, for the UI to show instead of a shrug. */
27558
+ derivationError: string().nullable()
27559
+ });
27560
+ /** `null` clears the location and re-arms nothing — the derivation stays spent. */
27561
+ var SetSiteLocationInputSchema = object({
27562
+ latitude: number().min(-90).max(90),
27563
+ longitude: number().min(-180).max(180)
27564
+ }).nullable();
26655
27565
  method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), method(_void(), FeatureManifestSchema), method(_void(), array(NetworkAddressSchema).readonly()), method(_void(), unknown().nullable(), { auth: "admin" }), method(record(string(), unknown()), _null(), {
26656
27566
  kind: "mutation",
26657
27567
  auth: "admin"
26658
27568
  }), method(_void(), _void(), {
26659
27569
  kind: "mutation",
26660
27570
  auth: "admin"
27571
+ }), method(_void(), SiteLocationStatusSchema), method(SetSiteLocationInputSchema, SiteLocationStatusSchema, {
27572
+ kind: "mutation",
27573
+ auth: "admin"
27574
+ }), method(_void(), SiteLocationStatusSchema, {
27575
+ kind: "mutation",
27576
+ auth: "admin"
26661
27577
  });
26662
27578
  /**
26663
27579
  * Tamper / case-open detection sensor. Drives Home Assistant
@@ -27977,6 +28893,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
27977
28893
  humiditySensor: humiditySensorCapability,
27978
28894
  image: imageCapability,
27979
28895
  imageSettings: imageSettingsCapability,
28896
+ intercom: intercomCapability,
27980
28897
  lawnMowerControl: lawnMowerControlCapability,
27981
28898
  lockControl: lockControlCapability,
27982
28899
  mediaPlayer: mediaPlayerCapability,
@@ -27995,6 +28912,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
27995
28912
  sceneMonitor: sceneMonitorCapability,
27996
28913
  scriptRunner: scriptRunnerCapability,
27997
28914
  smoke: smokeCapability,
28915
+ streamCatalog: streamCatalogCapability,
27998
28916
  streamParams: streamParamsCapability,
27999
28917
  switch: switchCapability,
28000
28918
  tamper: tamperCapability,
@@ -28648,6 +29566,15 @@ var BaseDeviceProvider = class extends BaseAddon {
28648
29566
  labels: ["probe not implemented"]
28649
29567
  };
28650
29568
  }
29569
+ /**
29570
+ * Top-level devices restored at once in {@link onRestoreDevices}.
29571
+ *
29572
+ * Four covers the fleets this ships to without turning a boot into a burst a
29573
+ * camera NVR answers with a refusal. A provider whose upstream is a single
29574
+ * session with a serial command channel (a Baichuan hub, an NVR that
29575
+ * serialises ISAPI) should lower it; nothing needs to raise it.
29576
+ */
29577
+ restoreConcurrency = 4;
28651
29578
  async restoreDevices(savedDevices) {
28652
29579
  await this.onRestoreDevices(savedDevices);
28653
29580
  if (savedDevices.length > 0) this.ctx.logger.info(`Restored ${savedDevices.length} ${this.providerName} device(s)`);
@@ -28679,15 +29606,15 @@ var BaseDeviceProvider = class extends BaseAddon {
28679
29606
  */
28680
29607
  async onRestoreDevices(savedDevices) {
28681
29608
  const restored = /* @__PURE__ */ new Set();
28682
- for (const saved of savedDevices) {
28683
- if (saved.parentDeviceId !== null) continue;
29609
+ const topLevel = savedDevices.filter((saved) => saved.parentDeviceId === null);
29610
+ const restoreOne = async (saved) => {
28684
29611
  const Class = this.deviceClasses[saved.type];
28685
29612
  if (!Class) {
28686
29613
  this.ctx.logger.warn("No device class registered for restored type — skipping", {
28687
29614
  tags: { stableId: saved.stableId },
28688
29615
  meta: { type: saved.type }
28689
29616
  });
28690
- continue;
29617
+ return;
28691
29618
  }
28692
29619
  try {
28693
29620
  await this.ctx.kernel.devices.create(saved.stableId, Class, {});
@@ -28701,7 +29628,15 @@ var BaseDeviceProvider = class extends BaseAddon {
28701
29628
  }
28702
29629
  });
28703
29630
  }
28704
- }
29631
+ };
29632
+ let nextTopLevel = 0;
29633
+ await Promise.all(Array.from({ length: Math.min(Math.max(1, this.restoreConcurrency), topLevel.length) }, async () => {
29634
+ for (;;) {
29635
+ const saved = topLevel[nextTopLevel++];
29636
+ if (saved === void 0) return;
29637
+ await restoreOne(saved);
29638
+ }
29639
+ }));
28705
29640
  const childRows = savedDevices.filter((s) => s.parentDeviceId !== null);
28706
29641
  for (const saved of childRows) {
28707
29642
  const Class = this.deviceClasses[saved.type];
@@ -30792,6 +31727,12 @@ Object.freeze({
30792
31727
  addonId: null,
30793
31728
  access: "create"
30794
31729
  },
31730
+ "llm.cancel": {
31731
+ capName: "llm",
31732
+ capScope: "system",
31733
+ addonId: null,
31734
+ access: "create"
31735
+ },
30795
31736
  "llm.deleteModel": {
30796
31737
  capName: "llm",
30797
31738
  capScope: "system",
@@ -30876,6 +31817,12 @@ Object.freeze({
30876
31817
  addonId: null,
30877
31818
  access: "view"
30878
31819
  },
31820
+ "llm.resolveModelRef": {
31821
+ capName: "llm",
31822
+ capScope: "system",
31823
+ addonId: null,
31824
+ access: "create"
31825
+ },
30879
31826
  "llm.setDefault": {
30880
31827
  capName: "llm",
30881
31828
  capScope: "system",
@@ -33042,6 +33989,12 @@ Object.freeze({
33042
33989
  addonId: null,
33043
33990
  access: "create"
33044
33991
  },
33992
+ "sceneMonitor.resetScene": {
33993
+ capName: "scene-monitor",
33994
+ capScope: "device",
33995
+ addonId: null,
33996
+ access: "delete"
33997
+ },
33045
33998
  "sceneMonitor.updateScene": {
33046
33999
  capName: "scene-monitor",
33047
34000
  capScope: "device",
@@ -33720,6 +34673,12 @@ Object.freeze({
33720
34673
  addonId: null,
33721
34674
  access: "create"
33722
34675
  },
34676
+ "system.detectSiteLocation": {
34677
+ capName: "system",
34678
+ capScope: "system",
34679
+ addonId: null,
34680
+ access: "create"
34681
+ },
33723
34682
  "system.featureFlags": {
33724
34683
  capName: "system",
33725
34684
  capScope: "system",
@@ -33738,6 +34697,12 @@ Object.freeze({
33738
34697
  addonId: null,
33739
34698
  access: "view"
33740
34699
  },
34700
+ "system.getSiteLocation": {
34701
+ capName: "system",
34702
+ capScope: "system",
34703
+ addonId: null,
34704
+ access: "view"
34705
+ },
33741
34706
  "system.health": {
33742
34707
  capName: "system",
33743
34708
  capScope: "system",
@@ -33762,6 +34727,12 @@ Object.freeze({
33762
34727
  addonId: null,
33763
34728
  access: "create"
33764
34729
  },
34730
+ "system.setSiteLocation": {
34731
+ capName: "system",
34732
+ capScope: "system",
34733
+ addonId: null,
34734
+ access: "create"
34735
+ },
33765
34736
  "terminalSession.adoptLegacyMonitor": {
33766
34737
  capName: "terminal-session",
33767
34738
  capScope: "system",
@@ -34333,6 +35304,1704 @@ Object.freeze({
34333
35304
  access: "create"
34334
35305
  }
34335
35306
  });
35307
+ Object.freeze({
35308
+ "accessories.setChildHidden": [{
35309
+ name: "childDeviceId",
35310
+ form: "single",
35311
+ optional: false
35312
+ }, {
35313
+ name: "deviceId",
35314
+ form: "single",
35315
+ optional: false
35316
+ }],
35317
+ "addonSettings.getDeviceSettings": [{
35318
+ name: "deviceId",
35319
+ form: "single",
35320
+ optional: false
35321
+ }],
35322
+ "addonSettings.updateDeviceSettings": [{
35323
+ name: "deviceId",
35324
+ form: "single",
35325
+ optional: false
35326
+ }],
35327
+ "alarmPanel.arm": [{
35328
+ name: "deviceId",
35329
+ form: "single",
35330
+ optional: false
35331
+ }],
35332
+ "alarmPanel.disarm": [{
35333
+ name: "deviceId",
35334
+ form: "single",
35335
+ optional: false
35336
+ }],
35337
+ "alarmPanel.trigger": [{
35338
+ name: "deviceId",
35339
+ form: "single",
35340
+ optional: false
35341
+ }],
35342
+ "audioAnalysis.resolveDeviceSettings": [{
35343
+ name: "deviceId",
35344
+ form: "single",
35345
+ optional: false
35346
+ }],
35347
+ "audioAnalyzer.classify": [{
35348
+ name: "deviceId",
35349
+ form: "single",
35350
+ optional: true
35351
+ }],
35352
+ "audioMetrics.getCurrentSnapshot": [{
35353
+ name: "deviceId",
35354
+ form: "single",
35355
+ optional: false
35356
+ }],
35357
+ "audioMetrics.getHistory": [{
35358
+ name: "deviceId",
35359
+ form: "single",
35360
+ optional: false
35361
+ }],
35362
+ "automationControl.disable": [{
35363
+ name: "deviceId",
35364
+ form: "single",
35365
+ optional: false
35366
+ }],
35367
+ "automationControl.enable": [{
35368
+ name: "deviceId",
35369
+ form: "single",
35370
+ optional: false
35371
+ }],
35372
+ "automationControl.trigger": [{
35373
+ name: "deviceId",
35374
+ form: "single",
35375
+ optional: false
35376
+ }],
35377
+ "battery.wakeForStream": [{
35378
+ name: "deviceId",
35379
+ form: "single",
35380
+ optional: false
35381
+ }],
35382
+ "brightness.setBrightness": [{
35383
+ name: "deviceId",
35384
+ form: "single",
35385
+ optional: false
35386
+ }],
35387
+ "button.press": [{
35388
+ name: "deviceId",
35389
+ form: "single",
35390
+ optional: false
35391
+ }],
35392
+ "cameraCredentials.getCredentials": [{
35393
+ name: "deviceId",
35394
+ form: "single",
35395
+ optional: false
35396
+ }],
35397
+ "cameraStreams.getBrokerStreams": [{
35398
+ name: "deviceId",
35399
+ form: "single",
35400
+ optional: false
35401
+ }],
35402
+ "cameraStreams.getCameraStreams": [{
35403
+ name: "deviceId",
35404
+ form: "single",
35405
+ optional: false
35406
+ }],
35407
+ "cameraStreams.getProfileRtspEntries": [{
35408
+ name: "deviceId",
35409
+ form: "single",
35410
+ optional: false
35411
+ }],
35412
+ "cameraStreams.getRtspEntries": [{
35413
+ name: "deviceId",
35414
+ form: "single",
35415
+ optional: false
35416
+ }],
35417
+ "cameraStreams.pickStream": [{
35418
+ name: "deviceId",
35419
+ form: "single",
35420
+ optional: false
35421
+ }],
35422
+ "climateControl.setFanMode": [{
35423
+ name: "deviceId",
35424
+ form: "single",
35425
+ optional: false
35426
+ }],
35427
+ "climateControl.setMode": [{
35428
+ name: "deviceId",
35429
+ form: "single",
35430
+ optional: false
35431
+ }],
35432
+ "climateControl.setPreset": [{
35433
+ name: "deviceId",
35434
+ form: "single",
35435
+ optional: false
35436
+ }],
35437
+ "climateControl.setSwingHorizontal": [{
35438
+ name: "deviceId",
35439
+ form: "single",
35440
+ optional: false
35441
+ }],
35442
+ "climateControl.setSwingVertical": [{
35443
+ name: "deviceId",
35444
+ form: "single",
35445
+ optional: false
35446
+ }],
35447
+ "climateControl.setTarget": [{
35448
+ name: "deviceId",
35449
+ form: "single",
35450
+ optional: false
35451
+ }],
35452
+ "climateControl.setTargetHumidity": [{
35453
+ name: "deviceId",
35454
+ form: "single",
35455
+ optional: false
35456
+ }],
35457
+ "climateControl.setTargetRange": [{
35458
+ name: "deviceId",
35459
+ form: "single",
35460
+ optional: false
35461
+ }],
35462
+ "color.setColor": [{
35463
+ name: "deviceId",
35464
+ form: "single",
35465
+ optional: false
35466
+ }],
35467
+ "consumables.reset": [{
35468
+ name: "deviceId",
35469
+ form: "single",
35470
+ optional: false
35471
+ }],
35472
+ "control.setValue": [{
35473
+ name: "deviceId",
35474
+ form: "single",
35475
+ optional: false
35476
+ }],
35477
+ "cover.close": [{
35478
+ name: "deviceId",
35479
+ form: "single",
35480
+ optional: false
35481
+ }],
35482
+ "cover.open": [{
35483
+ name: "deviceId",
35484
+ form: "single",
35485
+ optional: false
35486
+ }],
35487
+ "cover.setPosition": [{
35488
+ name: "deviceId",
35489
+ form: "single",
35490
+ optional: false
35491
+ }],
35492
+ "cover.setTiltPosition": [{
35493
+ name: "deviceId",
35494
+ form: "single",
35495
+ optional: false
35496
+ }],
35497
+ "cover.stop": [{
35498
+ name: "deviceId",
35499
+ form: "single",
35500
+ optional: false
35501
+ }],
35502
+ "dayNight.getOptions": [{
35503
+ name: "deviceId",
35504
+ form: "single",
35505
+ optional: false
35506
+ }],
35507
+ "dayNight.setSettings": [{
35508
+ name: "deviceId",
35509
+ form: "single",
35510
+ optional: false
35511
+ }],
35512
+ "decoder.createSession": [{
35513
+ name: "deviceId",
35514
+ form: "single",
35515
+ optional: true
35516
+ }],
35517
+ "deviceAdoption.release": [{
35518
+ name: "camDeviceId",
35519
+ form: "single",
35520
+ optional: false
35521
+ }],
35522
+ "deviceAdoption.resync": [{
35523
+ name: "camDeviceId",
35524
+ form: "single",
35525
+ optional: false
35526
+ }],
35527
+ "deviceDiscovery.adoptDevice": [{
35528
+ name: "deviceId",
35529
+ form: "single",
35530
+ optional: false
35531
+ }],
35532
+ "deviceDiscovery.listDiscovered": [{
35533
+ name: "deviceId",
35534
+ form: "single",
35535
+ optional: false
35536
+ }],
35537
+ "deviceDiscovery.refreshDiscovery": [{
35538
+ name: "deviceId",
35539
+ form: "single",
35540
+ optional: false
35541
+ }],
35542
+ "deviceDiscovery.releaseDevice": [{
35543
+ name: "childDeviceId",
35544
+ form: "single",
35545
+ optional: false
35546
+ }, {
35547
+ name: "deviceId",
35548
+ form: "single",
35549
+ optional: false
35550
+ }],
35551
+ "deviceManager.adoptionRelease": [{
35552
+ name: "camDeviceId",
35553
+ form: "single",
35554
+ optional: false
35555
+ }],
35556
+ "deviceManager.adoptionResync": [{
35557
+ name: "camDeviceId",
35558
+ form: "single",
35559
+ optional: false
35560
+ }],
35561
+ "deviceManager.applyInitialMeta": [{
35562
+ name: "deviceId",
35563
+ form: "single",
35564
+ optional: false
35565
+ }, {
35566
+ name: "linkDeviceId",
35567
+ form: "single",
35568
+ optional: true
35569
+ }],
35570
+ "deviceManager.disable": [{
35571
+ name: "deviceId",
35572
+ form: "single",
35573
+ optional: false
35574
+ }],
35575
+ "deviceManager.enable": [{
35576
+ name: "deviceId",
35577
+ form: "single",
35578
+ optional: false
35579
+ }],
35580
+ "deviceManager.getBindings": [{
35581
+ name: "deviceId",
35582
+ form: "single",
35583
+ optional: false
35584
+ }],
35585
+ "deviceManager.getChildren": [{
35586
+ name: "parentDeviceId",
35587
+ form: "single",
35588
+ optional: false
35589
+ }],
35590
+ "deviceManager.getConfigSchema": [{
35591
+ name: "deviceId",
35592
+ form: "single",
35593
+ optional: false
35594
+ }],
35595
+ "deviceManager.getDevice": [{
35596
+ name: "deviceId",
35597
+ form: "single",
35598
+ optional: false
35599
+ }],
35600
+ "deviceManager.getDeviceAggregate": [{
35601
+ name: "deviceId",
35602
+ form: "single",
35603
+ optional: false
35604
+ }],
35605
+ "deviceManager.getDeviceLiveInfoAggregate": [{
35606
+ name: "deviceId",
35607
+ form: "single",
35608
+ optional: false
35609
+ }],
35610
+ "deviceManager.getDeviceSettingsAggregate": [{
35611
+ name: "deviceId",
35612
+ form: "single",
35613
+ optional: false
35614
+ }],
35615
+ "deviceManager.getDeviceStatusAggregate": [{
35616
+ name: "deviceId",
35617
+ form: "single",
35618
+ optional: false
35619
+ }],
35620
+ "deviceManager.getDeviceStatusAggregateBatch": [{
35621
+ name: "deviceIds",
35622
+ form: "array",
35623
+ optional: false
35624
+ }],
35625
+ "deviceManager.getLinkedDevices": [{
35626
+ name: "deviceId",
35627
+ form: "single",
35628
+ optional: false
35629
+ }],
35630
+ "deviceManager.getSettingsSchema": [{
35631
+ name: "deviceId",
35632
+ form: "single",
35633
+ optional: false
35634
+ }],
35635
+ "deviceManager.getStreamProfileMap": [{
35636
+ name: "deviceId",
35637
+ form: "single",
35638
+ optional: false
35639
+ }],
35640
+ "deviceManager.getStreamSources": [{
35641
+ name: "deviceId",
35642
+ form: "single",
35643
+ optional: false
35644
+ }],
35645
+ "deviceManager.getWireableFields": [{
35646
+ name: "deviceId",
35647
+ form: "single",
35648
+ optional: false
35649
+ }],
35650
+ "deviceManager.loadConfig": [{
35651
+ name: "deviceId",
35652
+ form: "single",
35653
+ optional: false
35654
+ }],
35655
+ "deviceManager.loadMeta": [{
35656
+ name: "deviceId",
35657
+ form: "single",
35658
+ optional: false
35659
+ }],
35660
+ "deviceManager.loadRuntimeState": [{
35661
+ name: "deviceId",
35662
+ form: "single",
35663
+ optional: false
35664
+ }],
35665
+ "deviceManager.persistConfig": [{
35666
+ name: "deviceId",
35667
+ form: "single",
35668
+ optional: false
35669
+ }],
35670
+ "deviceManager.probeStreams": [{
35671
+ name: "deviceId",
35672
+ form: "single",
35673
+ optional: false
35674
+ }],
35675
+ "deviceManager.registerDevice": [{
35676
+ name: "parentDeviceId",
35677
+ form: "single",
35678
+ optional: true
35679
+ }],
35680
+ "deviceManager.remove": [{
35681
+ name: "deviceId",
35682
+ form: "single",
35683
+ optional: false
35684
+ }],
35685
+ "deviceManager.removeDevice": [{
35686
+ name: "deviceId",
35687
+ form: "single",
35688
+ optional: false
35689
+ }],
35690
+ "deviceManager.runDeviceAction": [{
35691
+ name: "deviceId",
35692
+ form: "single",
35693
+ optional: false
35694
+ }],
35695
+ "deviceManager.setChildLayout": [{
35696
+ name: "deviceId",
35697
+ form: "single",
35698
+ optional: false
35699
+ }],
35700
+ "deviceManager.setDisabled": [{
35701
+ name: "deviceId",
35702
+ form: "single",
35703
+ optional: false
35704
+ }],
35705
+ "deviceManager.setDisplay": [{
35706
+ name: "deviceId",
35707
+ form: "single",
35708
+ optional: false
35709
+ }],
35710
+ "deviceManager.setIntegrationId": [{
35711
+ name: "deviceId",
35712
+ form: "single",
35713
+ optional: false
35714
+ }],
35715
+ "deviceManager.setLinkDeviceId": [{
35716
+ name: "deviceId",
35717
+ form: "single",
35718
+ optional: false
35719
+ }, {
35720
+ name: "linkDeviceId",
35721
+ form: "single",
35722
+ optional: true
35723
+ }],
35724
+ "deviceManager.setLocation": [{
35725
+ name: "deviceId",
35726
+ form: "single",
35727
+ optional: false
35728
+ }],
35729
+ "deviceManager.setMetadata": [{
35730
+ name: "deviceId",
35731
+ form: "single",
35732
+ optional: false
35733
+ }],
35734
+ "deviceManager.setName": [{
35735
+ name: "deviceId",
35736
+ form: "single",
35737
+ optional: false
35738
+ }],
35739
+ "deviceManager.setPrimaryChildEntityId": [{
35740
+ name: "deviceId",
35741
+ form: "single",
35742
+ optional: false
35743
+ }],
35744
+ "deviceManager.setRole": [{
35745
+ name: "deviceId",
35746
+ form: "single",
35747
+ optional: false
35748
+ }],
35749
+ "deviceManager.setStreamProfileMap": [{
35750
+ name: "deviceId",
35751
+ form: "single",
35752
+ optional: false
35753
+ }],
35754
+ "deviceManager.setType": [{
35755
+ name: "deviceId",
35756
+ form: "single",
35757
+ optional: false
35758
+ }],
35759
+ "deviceManager.setWrapperActive": [{
35760
+ name: "deviceId",
35761
+ form: "single",
35762
+ optional: false
35763
+ }],
35764
+ "deviceManager.testField": [{
35765
+ name: "deviceId",
35766
+ form: "single",
35767
+ optional: false
35768
+ }],
35769
+ "deviceManager.updateConfig": [{
35770
+ name: "deviceId",
35771
+ form: "single",
35772
+ optional: false
35773
+ }],
35774
+ "deviceManager.updateDeviceField": [{
35775
+ name: "deviceId",
35776
+ form: "single",
35777
+ optional: false
35778
+ }],
35779
+ "deviceManager.updateDeviceFieldsBatch": [{
35780
+ name: "deviceId",
35781
+ form: "single",
35782
+ optional: false
35783
+ }],
35784
+ "deviceOps.getConfigEntries": [{
35785
+ name: "deviceId",
35786
+ form: "single",
35787
+ optional: false
35788
+ }],
35789
+ "deviceOps.getRawState": [{
35790
+ name: "deviceId",
35791
+ form: "single",
35792
+ optional: false
35793
+ }],
35794
+ "deviceOps.getSettingsSchema": [{
35795
+ name: "deviceId",
35796
+ form: "single",
35797
+ optional: false
35798
+ }],
35799
+ "deviceOps.getStreamSources": [{
35800
+ name: "deviceId",
35801
+ form: "single",
35802
+ optional: false
35803
+ }],
35804
+ "deviceOps.removeDevice": [{
35805
+ name: "deviceId",
35806
+ form: "single",
35807
+ optional: false
35808
+ }],
35809
+ "deviceOps.runAction": [{
35810
+ name: "deviceId",
35811
+ form: "single",
35812
+ optional: false
35813
+ }],
35814
+ "deviceOps.setConfig": [{
35815
+ name: "deviceId",
35816
+ form: "single",
35817
+ optional: false
35818
+ }],
35819
+ "deviceState.getCapSlice": [{
35820
+ name: "deviceId",
35821
+ form: "single",
35822
+ optional: false
35823
+ }],
35824
+ "deviceState.getSnapshot": [{
35825
+ name: "deviceId",
35826
+ form: "single",
35827
+ optional: false
35828
+ }],
35829
+ "deviceState.setCapSlice": [{
35830
+ name: "deviceId",
35831
+ form: "single",
35832
+ optional: false
35833
+ }],
35834
+ "events.getEventClipUrl": [{
35835
+ name: "deviceId",
35836
+ form: "single",
35837
+ optional: false
35838
+ }],
35839
+ "events.getEvents": [{
35840
+ name: "deviceId",
35841
+ form: "single",
35842
+ optional: false
35843
+ }],
35844
+ "events.getEventThumbnail": [{
35845
+ name: "deviceId",
35846
+ form: "single",
35847
+ optional: false
35848
+ }],
35849
+ "faceGallery.getFaceByTrack": [{
35850
+ name: "deviceId",
35851
+ form: "single",
35852
+ optional: false
35853
+ }],
35854
+ "faceGallery.listRecentFaces": [{
35855
+ name: "deviceId",
35856
+ form: "single",
35857
+ optional: true
35858
+ }],
35859
+ "fanControl.setDirection": [{
35860
+ name: "deviceId",
35861
+ form: "single",
35862
+ optional: false
35863
+ }],
35864
+ "fanControl.setOscillating": [{
35865
+ name: "deviceId",
35866
+ form: "single",
35867
+ optional: false
35868
+ }],
35869
+ "fanControl.setPercentage": [{
35870
+ name: "deviceId",
35871
+ form: "single",
35872
+ optional: false
35873
+ }],
35874
+ "fanControl.setPreset": [{
35875
+ name: "deviceId",
35876
+ form: "single",
35877
+ optional: false
35878
+ }],
35879
+ "humidifier.setMode": [{
35880
+ name: "deviceId",
35881
+ form: "single",
35882
+ optional: false
35883
+ }],
35884
+ "humidifier.setOn": [{
35885
+ name: "deviceId",
35886
+ form: "single",
35887
+ optional: false
35888
+ }],
35889
+ "humidifier.setTargetHumidity": [{
35890
+ name: "deviceId",
35891
+ form: "single",
35892
+ optional: false
35893
+ }],
35894
+ "imageSettings.getOptions": [{
35895
+ name: "deviceId",
35896
+ form: "single",
35897
+ optional: false
35898
+ }],
35899
+ "imageSettings.setSettings": [{
35900
+ name: "deviceId",
35901
+ form: "single",
35902
+ optional: false
35903
+ }],
35904
+ "intercom.endTalkSession": [{
35905
+ name: "deviceId",
35906
+ form: "single",
35907
+ optional: false
35908
+ }],
35909
+ "intercom.handleAnswer": [{
35910
+ name: "deviceId",
35911
+ form: "single",
35912
+ optional: false
35913
+ }],
35914
+ "intercom.pushTalkAudio": [{
35915
+ name: "deviceId",
35916
+ form: "single",
35917
+ optional: false
35918
+ }],
35919
+ "intercom.startSession": [{
35920
+ name: "deviceId",
35921
+ form: "single",
35922
+ optional: false
35923
+ }],
35924
+ "intercom.startTalkSession": [{
35925
+ name: "deviceId",
35926
+ form: "single",
35927
+ optional: false
35928
+ }],
35929
+ "intercom.stopSession": [{
35930
+ name: "deviceId",
35931
+ form: "single",
35932
+ optional: false
35933
+ }],
35934
+ "lawnMowerControl.dock": [{
35935
+ name: "deviceId",
35936
+ form: "single",
35937
+ optional: false
35938
+ }],
35939
+ "lawnMowerControl.pause": [{
35940
+ name: "deviceId",
35941
+ form: "single",
35942
+ optional: false
35943
+ }],
35944
+ "lawnMowerControl.startMowing": [{
35945
+ name: "deviceId",
35946
+ form: "single",
35947
+ optional: false
35948
+ }],
35949
+ "lockControl.lock": [{
35950
+ name: "deviceId",
35951
+ form: "single",
35952
+ optional: false
35953
+ }],
35954
+ "lockControl.open": [{
35955
+ name: "deviceId",
35956
+ form: "single",
35957
+ optional: false
35958
+ }],
35959
+ "lockControl.unlock": [{
35960
+ name: "deviceId",
35961
+ form: "single",
35962
+ optional: false
35963
+ }],
35964
+ "mediaPlayer.next": [{
35965
+ name: "deviceId",
35966
+ form: "single",
35967
+ optional: false
35968
+ }],
35969
+ "mediaPlayer.pause": [{
35970
+ name: "deviceId",
35971
+ form: "single",
35972
+ optional: false
35973
+ }],
35974
+ "mediaPlayer.play": [{
35975
+ name: "deviceId",
35976
+ form: "single",
35977
+ optional: false
35978
+ }],
35979
+ "mediaPlayer.playMedia": [{
35980
+ name: "deviceId",
35981
+ form: "single",
35982
+ optional: false
35983
+ }],
35984
+ "mediaPlayer.previous": [{
35985
+ name: "deviceId",
35986
+ form: "single",
35987
+ optional: false
35988
+ }],
35989
+ "mediaPlayer.seek": [{
35990
+ name: "deviceId",
35991
+ form: "single",
35992
+ optional: false
35993
+ }],
35994
+ "mediaPlayer.selectSource": [{
35995
+ name: "deviceId",
35996
+ form: "single",
35997
+ optional: false
35998
+ }],
35999
+ "mediaPlayer.setMute": [{
36000
+ name: "deviceId",
36001
+ form: "single",
36002
+ optional: false
36003
+ }],
36004
+ "mediaPlayer.setRepeat": [{
36005
+ name: "deviceId",
36006
+ form: "single",
36007
+ optional: false
36008
+ }],
36009
+ "mediaPlayer.setShuffle": [{
36010
+ name: "deviceId",
36011
+ form: "single",
36012
+ optional: false
36013
+ }],
36014
+ "mediaPlayer.setVolume": [{
36015
+ name: "deviceId",
36016
+ form: "single",
36017
+ optional: false
36018
+ }],
36019
+ "mediaPlayer.stop": [{
36020
+ name: "deviceId",
36021
+ form: "single",
36022
+ optional: false
36023
+ }],
36024
+ "motion.isDetected": [{
36025
+ name: "deviceId",
36026
+ form: "single",
36027
+ optional: false
36028
+ }],
36029
+ "motionDetection.analyze": [{
36030
+ name: "deviceId",
36031
+ form: "single",
36032
+ optional: false
36033
+ }],
36034
+ "motionDetection.removeCamera": [{
36035
+ name: "deviceId",
36036
+ form: "single",
36037
+ optional: false
36038
+ }],
36039
+ "motionTrigger.setMotionTrigger": [{
36040
+ name: "deviceId",
36041
+ form: "single",
36042
+ optional: false
36043
+ }],
36044
+ "motionZones.getOptions": [{
36045
+ name: "deviceId",
36046
+ form: "single",
36047
+ optional: false
36048
+ }],
36049
+ "motionZones.setZone": [{
36050
+ name: "deviceId",
36051
+ form: "single",
36052
+ optional: false
36053
+ }],
36054
+ "nativeObjectDetection.setEnabled": [{
36055
+ name: "deviceId",
36056
+ form: "single",
36057
+ optional: false
36058
+ }],
36059
+ "networkQuality.getDeviceStats": [{
36060
+ name: "deviceId",
36061
+ form: "single",
36062
+ optional: false
36063
+ }],
36064
+ "networkQuality.reportClientStats": [{
36065
+ name: "deviceId",
36066
+ form: "single",
36067
+ optional: false
36068
+ }],
36069
+ "notificationRules.setDeviceMuted": [{
36070
+ name: "deviceId",
36071
+ form: "single",
36072
+ optional: false
36073
+ }],
36074
+ "notifier.cancel": [{
36075
+ name: "deviceId",
36076
+ form: "single",
36077
+ optional: false
36078
+ }],
36079
+ "notifier.send": [{
36080
+ name: "deviceId",
36081
+ form: "single",
36082
+ optional: false
36083
+ }],
36084
+ "osd.setOverlay": [{
36085
+ name: "deviceId",
36086
+ form: "single",
36087
+ optional: false
36088
+ }],
36089
+ "osdManager.clearSlotBinding": [{
36090
+ name: "deviceId",
36091
+ form: "single",
36092
+ optional: false
36093
+ }],
36094
+ "osdManager.copyDeviceConfiguration": [{
36095
+ name: "sourceDeviceId",
36096
+ form: "single",
36097
+ optional: false
36098
+ }, {
36099
+ name: "targetDeviceId",
36100
+ form: "single",
36101
+ optional: false
36102
+ }],
36103
+ "osdManager.getDeviceOsd": [{
36104
+ name: "deviceId",
36105
+ form: "single",
36106
+ optional: false
36107
+ }],
36108
+ "osdManager.getSourceCatalog": [{
36109
+ name: "deviceId",
36110
+ form: "single",
36111
+ optional: false
36112
+ }],
36113
+ "osdManager.previewSlot": [{
36114
+ name: "deviceId",
36115
+ form: "single",
36116
+ optional: false
36117
+ }],
36118
+ "osdManager.renderDevice": [{
36119
+ name: "deviceId",
36120
+ form: "single",
36121
+ optional: false
36122
+ }],
36123
+ "osdManager.setSlotBinding": [{
36124
+ name: "deviceId",
36125
+ form: "single",
36126
+ optional: false
36127
+ }],
36128
+ "petFeeder.callPet": [{
36129
+ name: "deviceId",
36130
+ form: "single",
36131
+ optional: false
36132
+ }],
36133
+ "petFeeder.cancelFeed": [{
36134
+ name: "deviceId",
36135
+ form: "single",
36136
+ optional: false
36137
+ }],
36138
+ "petFeeder.feed": [{
36139
+ name: "deviceId",
36140
+ form: "single",
36141
+ optional: false
36142
+ }],
36143
+ "petFeeder.markFoodReplenished": [{
36144
+ name: "deviceId",
36145
+ form: "single",
36146
+ optional: false
36147
+ }],
36148
+ "petFeeder.playSound": [{
36149
+ name: "deviceId",
36150
+ form: "single",
36151
+ optional: false
36152
+ }],
36153
+ "petFeeder.resetDesiccant": [{
36154
+ name: "deviceId",
36155
+ form: "single",
36156
+ optional: false
36157
+ }],
36158
+ "petFeeder.setChildLock": [{
36159
+ name: "deviceId",
36160
+ form: "single",
36161
+ optional: false
36162
+ }],
36163
+ "petFeeder.setFeedSound": [{
36164
+ name: "deviceId",
36165
+ form: "single",
36166
+ optional: false
36167
+ }],
36168
+ "petFeeder.setIndicatorLight": [{
36169
+ name: "deviceId",
36170
+ form: "single",
36171
+ optional: false
36172
+ }],
36173
+ "petFeeder.setVolume": [{
36174
+ name: "deviceId",
36175
+ form: "single",
36176
+ optional: false
36177
+ }],
36178
+ "pipelineAnalytics.clearTracks": [{
36179
+ name: "deviceId",
36180
+ form: "single",
36181
+ optional: false
36182
+ }],
36183
+ "pipelineAnalytics.completeRetrainTrack": [{
36184
+ name: "deviceId",
36185
+ form: "single",
36186
+ optional: false
36187
+ }],
36188
+ "pipelineAnalytics.deleteDeviceEvents": [{
36189
+ name: "deviceId",
36190
+ form: "single",
36191
+ optional: false
36192
+ }],
36193
+ "pipelineAnalytics.deleteTracks": [{
36194
+ name: "deviceId",
36195
+ form: "single",
36196
+ optional: false
36197
+ }],
36198
+ "pipelineAnalytics.deselectRetrainFrame": [{
36199
+ name: "deviceId",
36200
+ form: "single",
36201
+ optional: false
36202
+ }],
36203
+ "pipelineAnalytics.getActiveTracks": [{
36204
+ name: "deviceId",
36205
+ form: "single",
36206
+ optional: false
36207
+ }],
36208
+ "pipelineAnalytics.getAudioEvents": [{
36209
+ name: "deviceId",
36210
+ form: "single",
36211
+ optional: false
36212
+ }],
36213
+ "pipelineAnalytics.getEventDensity": [{
36214
+ name: "deviceId",
36215
+ form: "single",
36216
+ optional: false
36217
+ }],
36218
+ "pipelineAnalytics.getEventMedia": [{
36219
+ name: "deviceId",
36220
+ form: "single",
36221
+ optional: false
36222
+ }],
36223
+ "pipelineAnalytics.getKeyEvents": [{
36224
+ name: "deviceId",
36225
+ form: "single",
36226
+ optional: false
36227
+ }],
36228
+ "pipelineAnalytics.getMotionEvents": [{
36229
+ name: "deviceId",
36230
+ form: "single",
36231
+ optional: false
36232
+ }],
36233
+ "pipelineAnalytics.getObjectEvents": [{
36234
+ name: "deviceId",
36235
+ form: "single",
36236
+ optional: false
36237
+ }],
36238
+ "pipelineAnalytics.getRetrainExportUrl": [{
36239
+ name: "deviceIds",
36240
+ form: "array",
36241
+ optional: true
36242
+ }],
36243
+ "pipelineAnalytics.getSensorEvents": [{
36244
+ name: "deviceId",
36245
+ form: "single",
36246
+ optional: false
36247
+ }],
36248
+ "pipelineAnalytics.getTrack": [{
36249
+ name: "deviceId",
36250
+ form: "single",
36251
+ optional: false
36252
+ }],
36253
+ "pipelineAnalytics.getTrackMedia": [{
36254
+ name: "deviceId",
36255
+ form: "single",
36256
+ optional: false
36257
+ }],
36258
+ "pipelineAnalytics.getTrainingExportSummary": [{
36259
+ name: "deviceIds",
36260
+ form: "array",
36261
+ optional: true
36262
+ }],
36263
+ "pipelineAnalytics.getTrainingExportUrl": [{
36264
+ name: "deviceIds",
36265
+ form: "array",
36266
+ optional: true
36267
+ }],
36268
+ "pipelineAnalytics.listEventKinds": [{
36269
+ name: "deviceId",
36270
+ form: "single",
36271
+ optional: false
36272
+ }],
36273
+ "pipelineAnalytics.listEventKindsBatch": [{
36274
+ name: "deviceIds",
36275
+ form: "array",
36276
+ optional: false
36277
+ }],
36278
+ "pipelineAnalytics.listOpsLog": [{
36279
+ name: "deviceId",
36280
+ form: "single",
36281
+ optional: true
36282
+ }],
36283
+ "pipelineAnalytics.listRecentTracks": [{
36284
+ name: "deviceIds",
36285
+ form: "array",
36286
+ optional: false
36287
+ }],
36288
+ "pipelineAnalytics.listRetrainStaging": [{
36289
+ name: "deviceIds",
36290
+ form: "array",
36291
+ optional: true
36292
+ }],
36293
+ "pipelineAnalytics.listTrackMedia": [{
36294
+ name: "deviceId",
36295
+ form: "single",
36296
+ optional: false
36297
+ }],
36298
+ "pipelineAnalytics.listTracks": [{
36299
+ name: "deviceId",
36300
+ form: "single",
36301
+ optional: false
36302
+ }],
36303
+ "pipelineAnalytics.proposeRetrainAnnotations": [{
36304
+ name: "deviceId",
36305
+ form: "single",
36306
+ optional: false
36307
+ }],
36308
+ "pipelineAnalytics.pruneEventsBefore": [{
36309
+ name: "deviceId",
36310
+ form: "single",
36311
+ optional: false
36312
+ }],
36313
+ "pipelineAnalytics.pruneTracksBefore": [{
36314
+ name: "deviceId",
36315
+ form: "single",
36316
+ optional: false
36317
+ }],
36318
+ "pipelineAnalytics.rebuildObjectEmbeddings": [{
36319
+ name: "deviceId",
36320
+ form: "single",
36321
+ optional: true
36322
+ }],
36323
+ "pipelineAnalytics.restageRetrainTrack": [{
36324
+ name: "deviceId",
36325
+ form: "single",
36326
+ optional: false
36327
+ }],
36328
+ "pipelineAnalytics.saveRetrainAnnotations": [{
36329
+ name: "deviceId",
36330
+ form: "single",
36331
+ optional: false
36332
+ }],
36333
+ "pipelineAnalytics.searchObjectEvents": [{
36334
+ name: "deviceId",
36335
+ form: "single",
36336
+ optional: true
36337
+ }],
36338
+ "pipelineAnalytics.selectRetrainFrames": [{
36339
+ name: "deviceId",
36340
+ form: "single",
36341
+ optional: false
36342
+ }],
36343
+ "pipelineAnalytics.setTrackFlags": [{
36344
+ name: "deviceId",
36345
+ form: "single",
36346
+ optional: false
36347
+ }],
36348
+ "pipelineAnalytics.wipeAllAnalytics": [{
36349
+ name: "deviceId",
36350
+ form: "single",
36351
+ optional: false
36352
+ }],
36353
+ "pipelineExecutor.runPipeline": [{
36354
+ name: "deviceId",
36355
+ form: "single",
36356
+ optional: true
36357
+ }],
36358
+ "pipelineExecutor.runPipelineBatch": [{
36359
+ name: "deviceId",
36360
+ form: "single",
36361
+ optional: true
36362
+ }],
36363
+ "pipelineOrchestrator.assignAudio": [{
36364
+ name: "deviceId",
36365
+ form: "single",
36366
+ optional: false
36367
+ }],
36368
+ "pipelineOrchestrator.assignPipeline": [{
36369
+ name: "deviceId",
36370
+ form: "single",
36371
+ optional: false
36372
+ }],
36373
+ "pipelineOrchestrator.getAudioAssignment": [{
36374
+ name: "deviceId",
36375
+ form: "single",
36376
+ optional: false
36377
+ }],
36378
+ "pipelineOrchestrator.getCameraMetrics": [{
36379
+ name: "deviceId",
36380
+ form: "single",
36381
+ optional: false
36382
+ }],
36383
+ "pipelineOrchestrator.getCameraSettings": [{
36384
+ name: "deviceId",
36385
+ form: "single",
36386
+ optional: false
36387
+ }],
36388
+ "pipelineOrchestrator.getCameraStatus": [{
36389
+ name: "deviceId",
36390
+ form: "single",
36391
+ optional: false
36392
+ }],
36393
+ "pipelineOrchestrator.getCameraStatuses": [{
36394
+ name: "deviceIds",
36395
+ form: "array",
36396
+ optional: true
36397
+ }],
36398
+ "pipelineOrchestrator.getCameraStepOverrides": [{
36399
+ name: "deviceId",
36400
+ form: "single",
36401
+ optional: false
36402
+ }],
36403
+ "pipelineOrchestrator.getCameraSwitches": [{
36404
+ name: "deviceId",
36405
+ form: "single",
36406
+ optional: false
36407
+ }],
36408
+ "pipelineOrchestrator.getPipelineAssignment": [{
36409
+ name: "deviceId",
36410
+ form: "single",
36411
+ optional: false
36412
+ }],
36413
+ "pipelineOrchestrator.getPipelineDevicePin": [{
36414
+ name: "deviceId",
36415
+ form: "single",
36416
+ optional: false
36417
+ }],
36418
+ "pipelineOrchestrator.resolvePipeline": [{
36419
+ name: "deviceId",
36420
+ form: "single",
36421
+ optional: false
36422
+ }],
36423
+ "pipelineOrchestrator.setCameraPipelineForAgent": [{
36424
+ name: "deviceId",
36425
+ form: "single",
36426
+ optional: false
36427
+ }],
36428
+ "pipelineOrchestrator.setCameraStepOverride": [{
36429
+ name: "deviceId",
36430
+ form: "single",
36431
+ optional: false
36432
+ }],
36433
+ "pipelineOrchestrator.setCameraStepToggle": [{
36434
+ name: "deviceId",
36435
+ form: "single",
36436
+ optional: false
36437
+ }],
36438
+ "pipelineOrchestrator.setCameraSwitch": [{
36439
+ name: "deviceId",
36440
+ form: "single",
36441
+ optional: false
36442
+ }],
36443
+ "pipelineOrchestrator.setPipelineDevicePin": [{
36444
+ name: "deviceId",
36445
+ form: "single",
36446
+ optional: false
36447
+ }],
36448
+ "pipelineOrchestrator.unassignAudio": [{
36449
+ name: "deviceId",
36450
+ form: "single",
36451
+ optional: false
36452
+ }],
36453
+ "pipelineOrchestrator.unassignPipeline": [{
36454
+ name: "deviceId",
36455
+ form: "single",
36456
+ optional: false
36457
+ }],
36458
+ "pipelineRunner.attachCamera": [{
36459
+ name: "deviceId",
36460
+ form: "single",
36461
+ optional: false
36462
+ }],
36463
+ "pipelineRunner.detachCamera": [{
36464
+ name: "deviceId",
36465
+ form: "single",
36466
+ optional: false
36467
+ }],
36468
+ "pipelineRunner.getCameraMetrics": [{
36469
+ name: "deviceId",
36470
+ form: "single",
36471
+ optional: false
36472
+ }],
36473
+ "pipelineRunner.reportMotion": [{
36474
+ name: "deviceId",
36475
+ form: "single",
36476
+ optional: false
36477
+ }],
36478
+ "pipelineRunner.runDetailSubtree": [{
36479
+ name: "deviceId",
36480
+ form: "single",
36481
+ optional: false
36482
+ }],
36483
+ "pipelineRunner.runStatelessStep": [{
36484
+ name: "sourceDeviceId",
36485
+ form: "single",
36486
+ optional: false
36487
+ }],
36488
+ "plateGallery.getPlateByTrack": [{
36489
+ name: "deviceId",
36490
+ form: "single",
36491
+ optional: false
36492
+ }],
36493
+ "plateGallery.listPlates": [{
36494
+ name: "deviceId",
36495
+ form: "single",
36496
+ optional: true
36497
+ }],
36498
+ "privacyMask.getOptions": [{
36499
+ name: "deviceId",
36500
+ form: "single",
36501
+ optional: false
36502
+ }],
36503
+ "privacyMask.setAudioEnabled": [{
36504
+ name: "deviceId",
36505
+ form: "single",
36506
+ optional: false
36507
+ }],
36508
+ "privacyMask.setMask": [{
36509
+ name: "deviceId",
36510
+ form: "single",
36511
+ optional: false
36512
+ }],
36513
+ "ptz.continuousMove": [{
36514
+ name: "deviceId",
36515
+ form: "single",
36516
+ optional: false
36517
+ }],
36518
+ "ptz.deletePreset": [{
36519
+ name: "deviceId",
36520
+ form: "single",
36521
+ optional: false
36522
+ }],
36523
+ "ptz.getOptions": [{
36524
+ name: "deviceId",
36525
+ form: "single",
36526
+ optional: false
36527
+ }],
36528
+ "ptz.getPosition": [{
36529
+ name: "deviceId",
36530
+ form: "single",
36531
+ optional: false
36532
+ }],
36533
+ "ptz.getPresets": [{
36534
+ name: "deviceId",
36535
+ form: "single",
36536
+ optional: false
36537
+ }],
36538
+ "ptz.goHome": [{
36539
+ name: "deviceId",
36540
+ form: "single",
36541
+ optional: false
36542
+ }],
36543
+ "ptz.goToPreset": [{
36544
+ name: "deviceId",
36545
+ form: "single",
36546
+ optional: false
36547
+ }],
36548
+ "ptz.move": [{
36549
+ name: "deviceId",
36550
+ form: "single",
36551
+ optional: false
36552
+ }],
36553
+ "ptz.savePreset": [{
36554
+ name: "deviceId",
36555
+ form: "single",
36556
+ optional: false
36557
+ }],
36558
+ "ptz.setAutofocus": [{
36559
+ name: "deviceId",
36560
+ form: "single",
36561
+ optional: false
36562
+ }],
36563
+ "ptz.stop": [{
36564
+ name: "deviceId",
36565
+ form: "single",
36566
+ optional: false
36567
+ }],
36568
+ "ptzAutotrack.getSettings": [{
36569
+ name: "deviceId",
36570
+ form: "single",
36571
+ optional: false
36572
+ }],
36573
+ "ptzAutotrack.getStatus": [{
36574
+ name: "deviceId",
36575
+ form: "single",
36576
+ optional: false
36577
+ }],
36578
+ "ptzAutotrack.setEnabled": [{
36579
+ name: "deviceId",
36580
+ form: "single",
36581
+ optional: false
36582
+ }],
36583
+ "ptzAutotrack.setSettings": [{
36584
+ name: "deviceId",
36585
+ form: "single",
36586
+ optional: false
36587
+ }],
36588
+ "reboot.reboot": [{
36589
+ name: "deviceId",
36590
+ form: "single",
36591
+ optional: false
36592
+ }],
36593
+ "recording.deleteFootprint": [{
36594
+ name: "deviceId",
36595
+ form: "single",
36596
+ optional: false
36597
+ }],
36598
+ "recording.getAvailability": [{
36599
+ name: "deviceId",
36600
+ form: "single",
36601
+ optional: false
36602
+ }],
36603
+ "recording.getDaysWithRecordings": [{
36604
+ name: "deviceId",
36605
+ form: "single",
36606
+ optional: false
36607
+ }],
36608
+ "recording.getDeviceConfig": [{
36609
+ name: "deviceId",
36610
+ form: "single",
36611
+ optional: false
36612
+ }],
36613
+ "recording.getPlaybackManifest": [{
36614
+ name: "deviceId",
36615
+ form: "single",
36616
+ optional: false
36617
+ }],
36618
+ "recording.listOpsLog": [{
36619
+ name: "deviceId",
36620
+ form: "single",
36621
+ optional: true
36622
+ }],
36623
+ "recording.locateSegment": [{
36624
+ name: "deviceId",
36625
+ form: "single",
36626
+ optional: false
36627
+ }],
36628
+ "recording.pruneFootage": [{
36629
+ name: "deviceId",
36630
+ form: "single",
36631
+ optional: false
36632
+ }],
36633
+ "recording.readGopBytes": [{
36634
+ name: "deviceId",
36635
+ form: "single",
36636
+ optional: false
36637
+ }],
36638
+ "recording.readSegmentBytes": [{
36639
+ name: "deviceId",
36640
+ form: "single",
36641
+ optional: false
36642
+ }],
36643
+ "recording.relocateFootage": [{
36644
+ name: "deviceId",
36645
+ form: "single",
36646
+ optional: true
36647
+ }],
36648
+ "recording.renderClip": [{
36649
+ name: "deviceId",
36650
+ form: "single",
36651
+ optional: false
36652
+ }],
36653
+ "recording.renderGif": [{
36654
+ name: "deviceId",
36655
+ form: "single",
36656
+ optional: false
36657
+ }],
36658
+ "recording.rescanStorage": [{
36659
+ name: "deviceId",
36660
+ form: "single",
36661
+ optional: false
36662
+ }],
36663
+ "recording.setDeviceConfig": [{
36664
+ name: "deviceId",
36665
+ form: "single",
36666
+ optional: false
36667
+ }],
36668
+ "recording.startStorageMigrationMove": [{
36669
+ name: "deviceId",
36670
+ form: "single",
36671
+ optional: true
36672
+ }],
36673
+ "recordingExport.createExport": [{
36674
+ name: "deviceId",
36675
+ form: "single",
36676
+ optional: false
36677
+ }],
36678
+ "recordingExport.listExports": [{
36679
+ name: "deviceId",
36680
+ form: "single",
36681
+ optional: true
36682
+ }],
36683
+ "sceneMonitor.captureReference": [{
36684
+ name: "deviceId",
36685
+ form: "single",
36686
+ optional: false
36687
+ }],
36688
+ "sceneMonitor.createScene": [{
36689
+ name: "deviceId",
36690
+ form: "single",
36691
+ optional: false
36692
+ }],
36693
+ "sceneMonitor.deleteReference": [{
36694
+ name: "deviceId",
36695
+ form: "single",
36696
+ optional: false
36697
+ }],
36698
+ "sceneMonitor.deleteScene": [{
36699
+ name: "deviceId",
36700
+ form: "single",
36701
+ optional: false
36702
+ }],
36703
+ "sceneMonitor.listScenes": [{
36704
+ name: "deviceId",
36705
+ form: "single",
36706
+ optional: false
36707
+ }],
36708
+ "sceneMonitor.recheckNow": [{
36709
+ name: "deviceId",
36710
+ form: "single",
36711
+ optional: false
36712
+ }],
36713
+ "sceneMonitor.resetScene": [{
36714
+ name: "deviceId",
36715
+ form: "single",
36716
+ optional: false
36717
+ }],
36718
+ "sceneMonitor.updateScene": [{
36719
+ name: "deviceId",
36720
+ form: "single",
36721
+ optional: false
36722
+ }],
36723
+ "scriptRunner.run": [{
36724
+ name: "deviceId",
36725
+ form: "single",
36726
+ optional: false
36727
+ }],
36728
+ "scriptRunner.stop": [{
36729
+ name: "deviceId",
36730
+ form: "single",
36731
+ optional: false
36732
+ }],
36733
+ "snapshot.getSnapshot": [{
36734
+ name: "deviceId",
36735
+ form: "single",
36736
+ optional: false
36737
+ }],
36738
+ "snapshot.getSnapshotLinks": [{
36739
+ name: "targets",
36740
+ form: "object-array",
36741
+ optional: false,
36742
+ itemField: "deviceId"
36743
+ }],
36744
+ "snapshot.getSnapshotOverview": [{
36745
+ name: "deviceIds",
36746
+ form: "array",
36747
+ optional: false
36748
+ }],
36749
+ "snapshot.invalidateCache": [{
36750
+ name: "deviceId",
36751
+ form: "single",
36752
+ optional: false
36753
+ }],
36754
+ "streamBroker.acquireEgressTranscode": [{
36755
+ name: "deviceId",
36756
+ form: "single",
36757
+ optional: false
36758
+ }],
36759
+ "streamBroker.assignProfile": [{
36760
+ name: "deviceId",
36761
+ form: "single",
36762
+ optional: false
36763
+ }],
36764
+ "streamBroker.getDeviceAudioMute": [{
36765
+ name: "deviceId",
36766
+ form: "single",
36767
+ optional: false
36768
+ }],
36769
+ "streamBroker.getStreamWithCodec": [{
36770
+ name: "deviceId",
36771
+ form: "single",
36772
+ optional: false
36773
+ }],
36774
+ "streamBroker.produceEventMedia": [{
36775
+ name: "deviceId",
36776
+ form: "single",
36777
+ optional: false
36778
+ }],
36779
+ "streamBroker.publishCameraStream": [{
36780
+ name: "deviceId",
36781
+ form: "single",
36782
+ optional: false
36783
+ }],
36784
+ "streamBroker.renderPreBufferClip": [{
36785
+ name: "deviceId",
36786
+ form: "single",
36787
+ optional: false
36788
+ }],
36789
+ "streamBroker.restartProfile": [{
36790
+ name: "deviceId",
36791
+ form: "single",
36792
+ optional: false
36793
+ }],
36794
+ "streamBroker.retractCameraStream": [{
36795
+ name: "deviceId",
36796
+ form: "single",
36797
+ optional: false
36798
+ }],
36799
+ "streamBroker.setDeviceAudioMute": [{
36800
+ name: "deviceId",
36801
+ form: "single",
36802
+ optional: false
36803
+ }],
36804
+ "streamBroker.unassignProfile": [{
36805
+ name: "deviceId",
36806
+ form: "single",
36807
+ optional: false
36808
+ }],
36809
+ "streamCatalog.getCatalog": [{
36810
+ name: "deviceId",
36811
+ form: "single",
36812
+ optional: false
36813
+ }],
36814
+ "streamParams.getConfigSchema": [{
36815
+ name: "deviceId",
36816
+ form: "single",
36817
+ optional: false
36818
+ }],
36819
+ "streamParams.getOptions": [{
36820
+ name: "deviceId",
36821
+ form: "single",
36822
+ optional: false
36823
+ }],
36824
+ "streamParams.setProfile": [{
36825
+ name: "deviceId",
36826
+ form: "single",
36827
+ optional: false
36828
+ }],
36829
+ "switch.setState": [{
36830
+ name: "deviceId",
36831
+ form: "single",
36832
+ optional: false
36833
+ }],
36834
+ "vacuumControl.locate": [{
36835
+ name: "deviceId",
36836
+ form: "single",
36837
+ optional: false
36838
+ }],
36839
+ "vacuumControl.pause": [{
36840
+ name: "deviceId",
36841
+ form: "single",
36842
+ optional: false
36843
+ }],
36844
+ "vacuumControl.returnToBase": [{
36845
+ name: "deviceId",
36846
+ form: "single",
36847
+ optional: false
36848
+ }],
36849
+ "vacuumControl.setFanSpeed": [{
36850
+ name: "deviceId",
36851
+ form: "single",
36852
+ optional: false
36853
+ }],
36854
+ "vacuumControl.start": [{
36855
+ name: "deviceId",
36856
+ form: "single",
36857
+ optional: false
36858
+ }],
36859
+ "vacuumControl.stop": [{
36860
+ name: "deviceId",
36861
+ form: "single",
36862
+ optional: false
36863
+ }],
36864
+ "valve.close": [{
36865
+ name: "deviceId",
36866
+ form: "single",
36867
+ optional: false
36868
+ }],
36869
+ "valve.open": [{
36870
+ name: "deviceId",
36871
+ form: "single",
36872
+ optional: false
36873
+ }],
36874
+ "valve.setPosition": [{
36875
+ name: "deviceId",
36876
+ form: "single",
36877
+ optional: false
36878
+ }],
36879
+ "valve.stop": [{
36880
+ name: "deviceId",
36881
+ form: "single",
36882
+ optional: false
36883
+ }],
36884
+ "videoclips.getClipPlayback": [{
36885
+ name: "deviceId",
36886
+ form: "single",
36887
+ optional: false
36888
+ }],
36889
+ "videoclips.listClips": [{
36890
+ name: "deviceId",
36891
+ form: "single",
36892
+ optional: false
36893
+ }],
36894
+ "waterHeater.setAway": [{
36895
+ name: "deviceId",
36896
+ form: "single",
36897
+ optional: false
36898
+ }],
36899
+ "waterHeater.setOperationMode": [{
36900
+ name: "deviceId",
36901
+ form: "single",
36902
+ optional: false
36903
+ }],
36904
+ "waterHeater.setTargetTemp": [{
36905
+ name: "deviceId",
36906
+ form: "single",
36907
+ optional: false
36908
+ }],
36909
+ "webrtcSession.addIceCandidate": [{
36910
+ name: "deviceId",
36911
+ form: "single",
36912
+ optional: false
36913
+ }],
36914
+ "webrtcSession.closeSession": [{
36915
+ name: "deviceId",
36916
+ form: "single",
36917
+ optional: false
36918
+ }],
36919
+ "webrtcSession.createSession": [{
36920
+ name: "deviceId",
36921
+ form: "single",
36922
+ optional: false
36923
+ }],
36924
+ "webrtcSession.getIceCandidates": [{
36925
+ name: "deviceId",
36926
+ form: "single",
36927
+ optional: false
36928
+ }],
36929
+ "webrtcSession.getSessionState": [{
36930
+ name: "deviceId",
36931
+ form: "single",
36932
+ optional: false
36933
+ }],
36934
+ "webrtcSession.handleAnswer": [{
36935
+ name: "deviceId",
36936
+ form: "single",
36937
+ optional: false
36938
+ }],
36939
+ "webrtcSession.handleOffer": [{
36940
+ name: "deviceId",
36941
+ form: "single",
36942
+ optional: false
36943
+ }],
36944
+ "webrtcSession.hasAdaptiveBitrate": [{
36945
+ name: "deviceId",
36946
+ form: "single",
36947
+ optional: false
36948
+ }],
36949
+ "webrtcSession.listStreams": [{
36950
+ name: "deviceId",
36951
+ form: "single",
36952
+ optional: false
36953
+ }],
36954
+ "zoneAnalytics.getCameraHistory": [{
36955
+ name: "deviceId",
36956
+ form: "single",
36957
+ optional: false
36958
+ }],
36959
+ "zoneAnalytics.getCurrentSnapshot": [{
36960
+ name: "deviceId",
36961
+ form: "single",
36962
+ optional: false
36963
+ }],
36964
+ "zoneAnalytics.getUnzonedHistory": [{
36965
+ name: "deviceId",
36966
+ form: "single",
36967
+ optional: false
36968
+ }],
36969
+ "zoneAnalytics.getZoneHistory": [{
36970
+ name: "deviceId",
36971
+ form: "single",
36972
+ optional: false
36973
+ }],
36974
+ "zoneRules.listRules": [{
36975
+ name: "deviceId",
36976
+ form: "single",
36977
+ optional: false
36978
+ }],
36979
+ "zoneRules.setRules": [{
36980
+ name: "deviceId",
36981
+ form: "single",
36982
+ optional: false
36983
+ }],
36984
+ "zones.addZone": [{
36985
+ name: "deviceId",
36986
+ form: "single",
36987
+ optional: false
36988
+ }],
36989
+ "zones.listZones": [{
36990
+ name: "deviceId",
36991
+ form: "single",
36992
+ optional: false
36993
+ }],
36994
+ "zones.removeZone": [{
36995
+ name: "deviceId",
36996
+ form: "single",
36997
+ optional: false
36998
+ }],
36999
+ "zones.updateZone": [{
37000
+ name: "deviceId",
37001
+ form: "single",
37002
+ optional: false
37003
+ }]
37004
+ });
34336
37005
  Object.freeze({
34337
37006
  "broker": "broker",
34338
37007
  "device-export": "device-export",