@camstack/addon-provider-dreo 0.2.16 → 0.2.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/addon.js +2951 -150
  2. package/dist/addon.mjs +2951 -150
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -35,7 +35,7 @@ var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["modu
35
35
  //#endregion
36
36
  let crypto$1 = require("crypto");
37
37
  let events = require("events");
38
- //#region ../types/dist/event-category-Cv9dO26A.mjs
38
+ //#region ../types/dist/event-category-Bxo5yJjt.mjs
39
39
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
40
40
  EventCategory["SystemBoot"] = "system.boot";
41
41
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -242,6 +242,33 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
242
242
  EventCategory["PipelineCameraAssigned"] = "pipeline.camera-assigned";
243
243
  EventCategory["PipelineCameraUnassigned"] = "pipeline.camera-unassigned";
244
244
  /**
245
+ * A node the orchestrator would otherwise place cameras on has NO usable
246
+ * inference device: the operator enabled one or more accelerators there and
247
+ * the live probe reports every one of them unavailable. Emitted once per
248
+ * TRANSITION into that state (never per dispatch), and the node is dropped
249
+ * from the placement candidate set for as long as it holds.
250
+ *
251
+ * This exists because the state was previously invisible: little-unraid
252
+ * absorbed 283k inference errors in a day while still being handed cameras,
253
+ * and nothing in the system said so.
254
+ *
255
+ * A node with no accelerators configured at all is NOT this — its devices
256
+ * are `disabled`, not `unavailable`, and the runner's default CPU pool
257
+ * serves it exactly as before.
258
+ */
259
+ EventCategory["PipelineNodeInferenceUnavailable"] = "pipeline.node-inference-unavailable";
260
+ /**
261
+ * A camera has an OPEN detection session and has produced no detection at
262
+ * all for longer than the blind threshold — the camera is being decoded and
263
+ * inferred and is returning nothing. Emitted once per transition into blind,
264
+ * per camera.
265
+ *
266
+ * The failure it reports: a 1h43 detection blackout on the entrance camera
267
+ * that nobody noticed, because "a camera that detects nothing" and "a quiet
268
+ * camera" produce byte-identical silence.
269
+ */
270
+ EventCategory["PipelineDetectionBlind"] = "pipeline.detection-blind";
271
+ /**
245
272
  * Per-camera pipeline config was mutated by the orchestrator
246
273
  * (3-level settings change via `setAgentAddonDefaults` /
247
274
  * `setCameraStepToggle` / `setCameraPipelineForAgent` or a
@@ -3033,6 +3060,9 @@ function handlePipeResult(left, next, ctx) {
3033
3060
  fallback: left.fallback
3034
3061
  }, ctx);
3035
3062
  }
3063
+ var $ZodPreprocess = /*@__PURE__*/ $constructor("$ZodPreprocess", (inst, def) => {
3064
+ $ZodPipe.init(inst, def);
3065
+ });
3036
3066
  var $ZodReadonly = /*@__PURE__*/ $constructor("$ZodReadonly", (inst, def) => {
3037
3067
  $ZodType.init(inst, def);
3038
3068
  defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
@@ -5218,6 +5248,10 @@ function pipe(in_, out) {
5218
5248
  out
5219
5249
  });
5220
5250
  }
5251
+ var ZodPreprocess = /*@__PURE__*/ $constructor("ZodPreprocess", (inst, def) => {
5252
+ ZodPipe.init(inst, def);
5253
+ $ZodPreprocess.init(inst, def);
5254
+ });
5221
5255
  var ZodReadonly = /*@__PURE__*/ $constructor("ZodReadonly", (inst, def) => {
5222
5256
  $ZodReadonly.init(inst, def);
5223
5257
  ZodType.init(inst, def);
@@ -5276,6 +5310,13 @@ function _instanceof(cls, params = {}) {
5276
5310
  };
5277
5311
  return inst;
5278
5312
  }
5313
+ function preprocess(fn, schema) {
5314
+ return new ZodPreprocess({
5315
+ type: "pipe",
5316
+ in: transform(fn),
5317
+ out: schema
5318
+ });
5319
+ }
5279
5320
  //#endregion
5280
5321
  //#region ../../node_modules/zod/v4/classic/compat.js
5281
5322
  /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
@@ -10912,6 +10953,8 @@ var QueryFilterSchema = object({
10912
10953
  where: record(string(), unknown()).optional(),
10913
10954
  whereIn: record(string(), array(unknown())).optional(),
10914
10955
  whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
10956
+ /** NULL-safe exclusion: matches rows whose field is NULL OR != the value. */
10957
+ whereNot: record(string(), unknown()).optional(),
10915
10958
  orderBy: object({
10916
10959
  field: string(),
10917
10960
  direction: _enum(["asc", "desc"])
@@ -10931,7 +10974,8 @@ var QueryFilterSchema = object({
10931
10974
  var MutationFilterSchema = object({
10932
10975
  where: record(string(), unknown()).optional(),
10933
10976
  whereIn: record(string(), array(unknown())).optional(),
10934
- whereBetween: record(string(), tuple([unknown(), unknown()])).optional()
10977
+ whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
10978
+ whereNot: record(string(), unknown()).optional()
10935
10979
  });
10936
10980
  /** A single stored record: `{ id, data }`. */
10937
10981
  var SettingsRecordSchema = object({
@@ -12467,6 +12511,17 @@ var LlmImageSchema = object({
12467
12511
  bytes: _instanceof(Uint8Array),
12468
12512
  mimeType: string()
12469
12513
  });
12514
+ /**
12515
+ * Retry policy. `enabled: false` is NOT the same as `maxAttempts: 1` in intent —
12516
+ * the flag is what a consumer table flips, the count is what the operator tunes.
12517
+ * A retry doubles the wall time of a call, so the two gates that run inside a
12518
+ * notification's budget keep it off (see `CONSUMER_RETRY_POLICY` in addon-ai).
12519
+ */
12520
+ var LlmRetryPolicySchema = object({
12521
+ enabled: boolean().default(false),
12522
+ /** Total attempts INCLUDING the first. 1 = no retry. */
12523
+ maxAttempts: number().int().min(1).max(5).default(1)
12524
+ });
12470
12525
  var LlmGenerateBaseInputSchema = object({
12471
12526
  /** Collection routing (the notification-output posture). */
12472
12527
  addonId: string().optional(),
@@ -12481,7 +12536,28 @@ var LlmGenerateBaseInputSchema = object({
12481
12536
  jsonSchema: record(string(), unknown()).optional(),
12482
12537
  /** Per-call override of the profile default. */
12483
12538
  maxTokens: number().int().positive().optional(),
12484
- temperature: number().optional()
12539
+ temperature: number().optional(),
12540
+ /** Per-call override of the profile default (nucleus sampling). */
12541
+ topP: number().min(0).max(1).optional(),
12542
+ /** Per-call override of the profile default (top-k sampling). */
12543
+ topK: number().int().positive().optional(),
12544
+ /** Per-call override of `profile.timeoutMs` — the total generation bound. */
12545
+ timeoutMs: number().int().positive().optional(),
12546
+ /** Per-call override; beats both the consumer table and the profile. */
12547
+ retry: LlmRetryPolicySchema.optional(),
12548
+ /**
12549
+ * Caller-minted id that makes this generation CANCELLABLE.
12550
+ *
12551
+ * Without it a caller that stops waiting cannot stop the work: the gates race
12552
+ * the call against 8 s and free their own slot when the timer wins, while the
12553
+ * generation upstream keeps running to `profile.timeoutMs` — 60 s by default,
12554
+ * on a single-threaded local model. The per-camera bound then counts WAITS,
12555
+ * not generations, and the real load is unbounded.
12556
+ *
12557
+ * `AbortSignal` cannot cross a process boundary; an id can. Pass one here and
12558
+ * `llm.cancel({ requestId })` tears the socket down.
12559
+ */
12560
+ requestId: string().optional()
12485
12561
  });
12486
12562
  /**
12487
12563
  * `llm-runtime` — node-side managed llama.cpp executor (spec §4). Registered
@@ -12494,6 +12570,18 @@ var LlmGenerateBaseInputSchema = object({
12494
12570
  * Resource ceiling = llama-server flags + idleStopMinutes ONLY (no RSS
12495
12571
  * watchdog — operator decision #3).
12496
12572
  */
12573
+ /**
12574
+ * A companion artifact that MUST land beside the main GGUF: the `mmproj`
12575
+ * projector of a vision model, or shards 2..N of a split GGUF. Carried on the
12576
+ * REF rather than looked up at install time, so what the operator approved in
12577
+ * the preview is exactly what the node downloads.
12578
+ */
12579
+ var ManagedModelExtraFileSchema = object({
12580
+ url: string(),
12581
+ filename: string(),
12582
+ sizeBytes: number(),
12583
+ sha256: string().optional()
12584
+ });
12497
12585
  var ManagedModelRefSchema = discriminatedUnion("kind", [
12498
12586
  object({
12499
12587
  kind: literal("catalog"),
@@ -12502,7 +12590,11 @@ var ManagedModelRefSchema = discriminatedUnion("kind", [
12502
12590
  object({
12503
12591
  kind: literal("url"),
12504
12592
  url: string(),
12505
- sha256: string().optional()
12593
+ sha256: string().optional(),
12594
+ /** Picker/status label; the file basename when absent. */
12595
+ label: string().optional(),
12596
+ sizeBytes: number().optional(),
12597
+ extraFiles: array(ManagedModelExtraFileSchema).optional()
12506
12598
  }),
12507
12599
  object({
12508
12600
  kind: literal("path"),
@@ -12520,13 +12612,82 @@ var ManagedRuntimeConfigSchema = object({
12520
12612
  gpuLayers: number().int().default(0),
12521
12613
  /** Default: cpus-2, clamped ≥1 (resolved node-side). */
12522
12614
  threads: number().int().optional(),
12523
- /** Concurrent slots. */
12615
+ /** Concurrent slots (`--parallel`). */
12524
12616
  parallel: number().int().default(1),
12617
+ /** Logical batch size (`-b`). Larger = faster prompt ingest, more RAM. */
12618
+ batchSize: number().int().positive().optional(),
12619
+ /** Physical batch / micro-batch (`-ub`). */
12620
+ ubatchSize: number().int().positive().optional(),
12621
+ /**
12622
+ * `--flash-attn`. Cuts KV-cache memory on the backends that implement it and
12623
+ * is a no-op elsewhere, so it is offered rather than assumed.
12624
+ */
12625
+ flashAttention: boolean().default(false),
12626
+ /**
12627
+ * `--mlock`. Pins the weights in RAM so the OS cannot page them out mid
12628
+ * inference. Costs the full model size in resident memory — which is exactly
12629
+ * what the RAM budget is counting.
12630
+ */
12631
+ mlock: boolean().default(false),
12632
+ /**
12633
+ * `--no-mmap`. Reads the whole GGUF up front instead of mapping it. Slower to
12634
+ * start, but avoids the page-fault stalls a network or spinning-disk model
12635
+ * store produces on every first token.
12636
+ */
12637
+ noMmap: boolean().default(false),
12638
+ /** `--cache-type-k` / `--cache-type-v` — quantising the KV cache is the
12639
+ * cheapest way to fit a longer context in the same RAM. */
12640
+ cacheTypeK: _enum([
12641
+ "f32",
12642
+ "f16",
12643
+ "q8_0",
12644
+ "q5_1",
12645
+ "q5_0",
12646
+ "q4_1",
12647
+ "q4_0"
12648
+ ]).optional(),
12649
+ cacheTypeV: _enum([
12650
+ "f32",
12651
+ "f16",
12652
+ "q8_0",
12653
+ "q5_1",
12654
+ "q5_0",
12655
+ "q4_1",
12656
+ "q4_0"
12657
+ ]).optional(),
12658
+ /**
12659
+ * Escape hatch for llama-server flags this schema does NOT model — `--jinja`
12660
+ * (which most vision chat templates need and some language-only models
12661
+ * dislike), `--cont-batching`, `--rope-scaling`, …
12662
+ *
12663
+ * It is NOT a second place to set the flags above. A token that collides
12664
+ * with a typed field is REJECTED at start, naming the field that owns it
12665
+ * (`assertNoOwnedFlags`), because two knobs writing the same argv is exactly
12666
+ * the "two switches that disagree" failure this repo has already shipped
12667
+ * twice (D62).
12668
+ */
12669
+ extraArgs: array(string()).default([]),
12525
12670
  /** Else lazy: first generate boots it. */
12526
12671
  autoStart: boolean().default(false),
12527
12672
  /** 0 = never; frees RAM after quiet periods. */
12528
12673
  idleStopMinutes: number().int().default(30)
12529
12674
  });
12675
+ /**
12676
+ * Where a multi-GB install currently is. A single 0..1 fraction cannot answer
12677
+ * "is it stuck?" for an install that is three files (shards + mmproj) followed
12678
+ * by a sha256 pass over 22 GB — during which the fraction sat at 1.0 and the
12679
+ * node looked hung. Phase + file + bytes is the smallest shape that does.
12680
+ */
12681
+ var LlmDownloadProgressSchema = object({
12682
+ phase: _enum(["downloading", "verifying"]),
12683
+ /** The artifact currently moving, e.g. `mmproj-F16.gguf`. */
12684
+ file: string(),
12685
+ fileIndex: number().int(),
12686
+ fileCount: number().int(),
12687
+ /** Across the WHOLE install, not the current file. */
12688
+ downloadedBytes: number(),
12689
+ totalBytes: number().optional()
12690
+ });
12530
12691
  var LlmRuntimeStatusSchema = object({
12531
12692
  /** Status is ALWAYS node-qualified. */
12532
12693
  nodeId: string(),
@@ -12543,6 +12704,8 @@ var LlmRuntimeStatusSchema = object({
12543
12704
  modelPath: string().optional(),
12544
12705
  modelId: string().optional(),
12545
12706
  downloadProgress: number().min(0).max(1).optional(),
12707
+ /** Detail behind `downloadProgress`; present for the same lifetime. */
12708
+ download: LlmDownloadProgressSchema.optional(),
12546
12709
  lastError: string().optional(),
12547
12710
  crashesInWindow: number(),
12548
12711
  /** Child RSS (sampled best-effort). */
@@ -12553,7 +12716,14 @@ var LlmNodeModelSchema = object({
12553
12716
  file: string(),
12554
12717
  sizeBytes: number(),
12555
12718
  catalogId: string().optional(),
12556
- installedAt: number().optional()
12719
+ installedAt: number().optional(),
12720
+ /**
12721
+ * Absolute path on the node. Present so a file that is on disk but matches
12722
+ * no catalog entry — a custom Hugging Face install, or a GGUF the operator
12723
+ * copied in by hand — is still SELECTABLE, as a `{kind:'path'}` ref. Without
12724
+ * it the picker could list such a file and do nothing with it.
12725
+ */
12726
+ path: string().optional()
12557
12727
  });
12558
12728
  var LlmRuntimeDiskUsageSchema = object({
12559
12729
  nodeId: string(),
@@ -12609,10 +12779,47 @@ var LlmProfileSchema = object({
12609
12779
  baseUrl: string().optional(),
12610
12780
  /** ConfigUISchema type:'password' — never round-trips (spec §5). */
12611
12781
  apiKey: string().optional(),
12782
+ /** Vision on/off. A vision call against a `false` profile is REFUSED, never
12783
+ * degraded to text — that shipped once and produced a confident answer to a
12784
+ * question about a picture nobody sent. */
12612
12785
  supportsVision: boolean(),
12613
12786
  temperature: number().min(0).max(2).optional(),
12787
+ /** Nucleus sampling. Every wire we speak has it. */
12788
+ topP: number().min(0).max(1).optional(),
12789
+ /** Top-k sampling. Carried only by the wires that have it — NEITHER OpenAI
12790
+ * wire does, and the client drops it there (measured: the request body gets
12791
+ * `top_p` and no `top_k`). The profile editor hides the field wherever it
12792
+ * would change nothing; `KINDS_WITH_TOP_K` is the single owner of that list. */
12793
+ topK: number().int().positive().optional(),
12614
12794
  maxTokens: number().int().positive().optional(),
12795
+ /** Prompt context window. Advisory for cloud kinds (they enforce their own);
12796
+ * for `managed-local` it is the llama.cpp `--ctx-size` the runtime starts
12797
+ * the model with, so it is the one field that changes a PROCESS. */
12798
+ contextLength: number().int().positive().optional(),
12799
+ /** Default system prompt. A caller's `system` REPLACES it (never appends —
12800
+ * two system prompts fighting is worse than either alone). */
12801
+ systemPrompt: string().optional(),
12802
+ /** Total generation bound — the only one a unary call has. */
12615
12803
  timeoutMs: number().int().positive().default(6e4),
12804
+ /** The TCP handshake only — "is the port even open". NOT the wait for
12805
+ * response headers: on the LM Studio / llama-server wire those are written
12806
+ * once the model has finished loading, so they belong to the bound below. */
12807
+ connectTimeoutMs: number().int().positive().default(1e4),
12808
+ /** Accepted, but no output yet — response headers included, because a cold
12809
+ * GPU load is exactly what happens before them. */
12810
+ firstTokenTimeoutMs: number().int().positive().default(12e4),
12811
+ /** Output started then stopped. */
12812
+ idleTimeoutMs: number().int().positive().default(6e4),
12813
+ /** Profile-level default. The per-consumer table and a per-call override
12814
+ * both beat it — see `resolveRetryPolicy`. */
12815
+ retry: LlmRetryPolicySchema.default({
12816
+ enabled: false,
12817
+ maxAttempts: 1
12818
+ }),
12819
+ /** Whether this profile may use tools. The tool-call plumbing rides the
12820
+ * library; the REGISTRY of callable tools is ours and is empty in v1, so a
12821
+ * `true` here buys the wiring, not behaviour, until tools are registered. */
12822
+ toolsEnabled: boolean().default(false),
12616
12823
  extraHeaders: record(string(), string()).optional(),
12617
12824
  /** kind === 'managed-local' only (spec §4). */
12618
12825
  runtime: ManagedRuntimeConfigSchema.optional()
@@ -12662,6 +12869,36 @@ var ManagedModelCatalogEntrySchema = object({
12662
12869
  /** Vision models: companion projector file. */
12663
12870
  mmprojUrl: string().optional()
12664
12871
  });
12872
+ /**
12873
+ * The outcome of turning one operator-typed Hugging Face reference into a
12874
+ * download plan. A RESULT, never a throw: "this repo has 24 quantizations and
12875
+ * I will not pick for you" is a normal answer the UI has to render, not an
12876
+ * exception.
12877
+ *
12878
+ * `candidates` is the whole reason the refusal is usable — every string in it
12879
+ * is a tag that resolves when pasted back as `<org>/<repo>:<TAG>`.
12880
+ */
12881
+ var HfModelResolutionSchema = discriminatedUnion("ok", [object({
12882
+ ok: literal(true),
12883
+ /** Ready to hand to `installModel` unchanged. */
12884
+ model: ManagedModelRefSchema,
12885
+ label: string(),
12886
+ repo: string(),
12887
+ quantization: string(),
12888
+ purpose: _enum(["text", "vision"]),
12889
+ totalBytes: number(),
12890
+ /** mmproj + shards, for the preview: an operator approving 23 GB should
12891
+ * see that 0.9 GB of it is a projector they did not name. */
12892
+ extraFilenames: array(string())
12893
+ }), object({
12894
+ ok: literal(false),
12895
+ code: string(),
12896
+ message: string(),
12897
+ candidates: array(string()).optional(),
12898
+ /** Set when the refusal was only the ceiling: re-calling with
12899
+ * `maxBytes: requiredBytes` is the operator's explicit override. */
12900
+ requiredBytes: number().optional()
12901
+ })]);
12665
12902
  var LlmRuntimeNodeSchema = object({
12666
12903
  nodeId: string(),
12667
12904
  reachable: boolean(),
@@ -12674,7 +12911,10 @@ var ProfileRefInputSchema = object({
12674
12911
  addonId: string(),
12675
12912
  profileId: string()
12676
12913
  });
12677
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
12914
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
12915
+ addonId: string().optional(),
12916
+ requestId: string()
12917
+ }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
12678
12918
  kind: "mutation",
12679
12919
  auth: "admin"
12680
12920
  }), method(ProfileRefInputSchema, _void(), {
@@ -12695,6 +12935,15 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
12695
12935
  consumer: string().optional(),
12696
12936
  profileId: string().optional()
12697
12937
  }), array(LlmUsageRollupSchema)), method(object({}), array(ManagedModelCatalogEntrySchema)), method(object({}), array(LlmRuntimeNodeSchema)), method(object({ nodeId: string() }), array(LlmNodeModelSchema)), method(object({
12938
+ /** `https://huggingface.co/<org>/<repo>/resolve/main/<f>.gguf`,
12939
+ * `<org>/<repo>/<f>.gguf`, `<org>/<repo>` or `<org>/<repo>:<QUANT>`. */
12940
+ ref: string(),
12941
+ /** Explicit ceiling override, in bytes. Absent = the built-in ceiling. */
12942
+ maxBytes: number().positive().optional()
12943
+ }), HfModelResolutionSchema, {
12944
+ kind: "mutation",
12945
+ auth: "admin"
12946
+ }), method(object({
12698
12947
  nodeId: string(),
12699
12948
  model: ManagedModelRefSchema
12700
12949
  }), _void(), {
@@ -13254,11 +13503,33 @@ var NotificationFormatSchema = _enum([
13254
13503
  * Named by INTENT, never by glyph. "check" would tie the vocabulary to one
13255
13504
  * renderer's icon set; "acknowledge" survives an adapter that draws it
13256
13505
  * differently.
13506
+ *
13507
+ * ── A TOKEN IS NOT A WIRE VALUE ─────────────────────────────────────
13508
+ *
13509
+ * These names are for US. **No adapter may forward one verbatim.** Each maps
13510
+ * the whole set onto its own renderer's vocabulary through a
13511
+ * `Record<NotificationActionIcon, string>` — a Record, never a lookup with a
13512
+ * fallback, so adding a member here fails every adapter's build until someone
13513
+ * decides its glyph, which is the only place that decision can be made
13514
+ * honestly.
13515
+ *
13516
+ * This paragraph is the bug. Zentik declared `actionIcons: true` and passed
13517
+ * `disarm` straight through; iOS feeds that string to
13518
+ * `UNNotificationActionIcon(systemImageName:)`, `disarm` is not an SF Symbol,
13519
+ * and every snooze and alarm button arrived BLANK. A pass-through is not a
13520
+ * mapping, and "the field is documented" is not "the value renders".
13521
+ *
13522
+ * Adding a member is TRAIN-BOUND. The enum lives in the published
13523
+ * `@camstack/server` closure and the cap seam validates against the HUB's copy,
13524
+ * so an addon that emits a token the running hub does not know does not lose an
13525
+ * icon — its whole `send` fails Zod validation and the notification never
13526
+ * arrives. Never emit a new token from an addon before the train carrying it.
13257
13527
  */
13258
13528
  var NotificationActionIconSchema = _enum([
13259
13529
  "acknowledge",
13260
13530
  "dismiss",
13261
13531
  "silence",
13532
+ "snooze",
13262
13533
  "view",
13263
13534
  "play",
13264
13535
  "open",
@@ -13266,9 +13537,13 @@ var NotificationActionIconSchema = _enum([
13266
13537
  "lock",
13267
13538
  "unlock",
13268
13539
  "arm",
13540
+ "arm-home",
13541
+ "arm-away",
13542
+ "arm-night",
13269
13543
  "disarm",
13270
13544
  "light",
13271
- "alert"
13545
+ "alert",
13546
+ "camera"
13272
13547
  ]);
13273
13548
  /** A single tap-through action button. */
13274
13549
  var NotificationActionSchema = object({
@@ -13468,6 +13743,24 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
13468
13743
  targetId: string(),
13469
13744
  enabled: boolean()
13470
13745
  }), _void(), { kind: "mutation" });
13746
+ new Set([
13747
+ {
13748
+ id: "person",
13749
+ name: "Person"
13750
+ },
13751
+ {
13752
+ id: "vehicle",
13753
+ name: "Vehicle"
13754
+ },
13755
+ {
13756
+ id: "animal",
13757
+ name: "Animal"
13758
+ },
13759
+ {
13760
+ id: "package",
13761
+ name: "Package"
13762
+ }
13763
+ ].map((l) => l.id));
13471
13764
  var COCO_TO_MACRO = {
13472
13765
  mapping: {
13473
13766
  person: "person",
@@ -14298,11 +14591,15 @@ var NcSystemEventKindSchema = _enum([
14298
14591
  "stream-offline",
14299
14592
  "node-online",
14300
14593
  "node-offline",
14594
+ "node-inference-unavailable",
14595
+ "detection-blind",
14301
14596
  "addon-update-available",
14302
14597
  "server-update-available",
14303
14598
  "alarm-triggered",
14304
14599
  "alarm-armed",
14305
14600
  "alarm-disarmed",
14601
+ "alarm-arming",
14602
+ "alarm-arm-refused",
14306
14603
  "camera-online",
14307
14604
  "camera-offline",
14308
14605
  "camera-disabled",
@@ -14357,7 +14654,16 @@ var NcScheduleSchema = object({
14357
14654
  });
14358
14655
  /** Fuzzy plate matcher — OCR noise makes exact match useless (spec row 12/13). */
14359
14656
  var NcPlateMatcherSchema = object({
14360
- values: array(string().min(1)).min(1),
14657
+ /**
14658
+ * Plate texts (or gallery vehicle names) to match. EMPTY = **any plate the
14659
+ * pipeline could read** — the plate half of "no selection = no narrowing",
14660
+ * and the switch that says this rule is about vehicles that were IDENTIFIED
14661
+ * rather than merely seen. A subject carrying no plate still fails.
14662
+ *
14663
+ * The `.min(1)` this used to carry made that state unauthorable; nothing has
14664
+ * ever persisted an empty list, so widening it cannot change an existing rule.
14665
+ */
14666
+ values: array(string().min(1)),
14361
14667
  /** Max Levenshtein distance after normalization (uppercase alphanumeric). */
14362
14668
  maxDistance: number().int().min(0).max(3).default(1)
14363
14669
  });
@@ -14391,28 +14697,36 @@ var NcOccupancyConditionSchema = object({
14391
14697
  /**
14392
14698
  * Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
14393
14699
  *
14394
- * Operator-approved vocabulary (2026-08-12, option A — the same one the
14395
- * reference notifier uses, so an operator moving between them re-uses what
14396
- * they already know): a rule matches when, over a sampling window of
14397
- * `samplingSeconds`, at least `hitPercent`% of the audio samples in that
14398
- * window are HITS. A sample is a hit when it satisfies BOTH present filters:
14399
- *
14400
- * - `dbThreshold` its level is at or above this many dBFS (see
14401
- * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
14402
- * - `labels` the classifier put at least one of these labels on it.
14403
- *
14404
- * Both are OPTIONAL and independent, which is the point of the shape: a
14405
- * loudness rule ("something loud at 3am") needs no model to be right, and a
14406
- * label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
14407
- * is given** a window in which every sample is trivially a hit would fire on
14408
- * silence, so the engine refuses such a condition rather than notifying on
14409
- * nothing (the schema cannot express "at least one of" without becoming a
14410
- * ZodEffects the cap path would have to special-case).
14411
- *
14412
- * `hitPercent` is over the samples the window actually HOLDS, and the window
14413
- * must be FULL before it can match a window that has been open for two
14414
- * seconds of its ten is 100% of nothing, and firing on it would make
14415
- * `samplingSeconds` decorative.
14700
+ * **TWO EXCLUSIVE MODES** (operator decision 2026-08-14, D157). Which one a
14701
+ * rule is in is not a stored field it is WHICH FILTER the rule carries, so
14702
+ * there is no second switch that can disagree with the first and every rule
14703
+ * authored before the decision migrates for free (`audioModeOf`):
14704
+ *
14705
+ * - **LABEL mode — `labels` present.** The rule fires on the FIRST frame the
14706
+ * classifier labels with one of them. No window, no percentage:
14707
+ * `hitPercent` and `samplingSeconds` are ignored, and the rule's own
14708
+ * `throttle` cooldown is the only brake. The per-label confidence floor is
14709
+ * the analyzer's (`classificationMinScore`, per device) — a label only
14710
+ * reaches this condition if the classifier was already confident enough.
14711
+ * - **LEVEL mode `dbThreshold` present, no labels.** The sampling window IS
14712
+ * the condition: at least `hitPercent`% of the samples over
14713
+ * `samplingSeconds` must be at or above `dbThreshold` dBFS (see
14714
+ * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale). The window
14715
+ * must be FULL before it can match a window open for two of its ten
14716
+ * seconds is 100% of nothing.
14717
+ *
14718
+ * **Why label mode has no window.** It had one, and it never fired: the
14719
+ * analyzer emits ~1 audio frame per second but YAMNet only LABELS one to three
14720
+ * of them per episode, even through continuous crying. The measured maximum
14721
+ * `hitPercent` over the whole live history was 40 — under the shipped default
14722
+ * of 60, so a label rule could not fire at all, ever. A percentage of frames is
14723
+ * the wrong question to ask of a sparse classifier.
14724
+ *
14725
+ * **Fail-closed when NEITHER is given** — every sample would be a trivial hit
14726
+ * and the rule would fire on silence. The schema cannot express "exactly one
14727
+ * of" without becoming a ZodEffects the cap path would have to special-case, so
14728
+ * the exclusivity is enforced where every editor writes (`patchAudio`) and a
14729
+ * legacy rule carrying both resolves to LABEL (the mode that fires).
14416
14730
  *
14417
14731
  * Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
14418
14732
  * `audio-*` ids). Both spellings are accepted — the matcher normalizes the
@@ -14420,13 +14734,13 @@ var NcOccupancyConditionSchema = object({
14420
14734
  * an operator who typed `dog` mean the same thing.
14421
14735
  */
14422
14736
  var NcAudioConditionSchema = object({
14423
- /** Audio macro labels; absent = any sound (level-only rule). */
14737
+ /** LABEL MODE: audio macro labels. Present fires on the first labelled frame. */
14424
14738
  labels: array(string().min(1)).min(1).optional(),
14425
- /** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
14739
+ /** LEVEL MODE: floor in dBFS (negative-going, `0` = full scale). */
14426
14740
  dbThreshold: number().min(-96).max(0).optional(),
14427
- /** Percentage of the window's samples that must be hits (1–100). */
14741
+ /** LEVEL MODE ONLY: percentage of the window's samples that must be hits (1–100). */
14428
14742
  hitPercent: number().int().min(1).max(100).default(60),
14429
- /** Length of the sampling window in seconds. */
14743
+ /** LEVEL MODE ONLY: length of the sampling window in seconds. */
14430
14744
  samplingSeconds: number().int().min(1).max(300).default(10)
14431
14745
  });
14432
14746
  /**
@@ -14564,13 +14878,81 @@ var NcRuleActionsSchema = object({
14564
14878
  */
14565
14879
  buttons: array(NcRuleNotificationButtonSchema).max(8).optional()
14566
14880
  });
14881
+ /**
14882
+ * "This rule applies only while `deviceId` is in one of `states`."
14883
+ *
14884
+ * The states are the DEVICE's own vocabulary — `AlarmState` for a panel,
14885
+ * `on`/`off` for a switch — not a normalised set, because normalising would
14886
+ * make the condition lie about devices whose states have no equivalent.
14887
+ *
14888
+ * An unreadable state does NOT match: see the engine's fail-closed gate. A
14889
+ * condition that fired on "I could not read it" would be worse than no gate.
14890
+ */
14891
+ var NcDeviceStateConditionSchema = object({
14892
+ deviceId: number().int(),
14893
+ /** Any of these matches. */
14894
+ states: array(string().min(1)).min(1)
14895
+ });
14896
+ /**
14897
+ * "This rule applies only while scene `sceneId` is `matched` / `diverged`."
14898
+ *
14899
+ * A GATE, not a trigger. `occupancy` and `audio` each DISCRIMINATE their rule —
14900
+ * carrying one makes the rule fire on that subject and nothing else. Scene is
14901
+ * the other shape entirely, the `deviceState` shape: it narrows a rule that
14902
+ * already has a trigger ("tell me about a person at the front door, but only
14903
+ * while the bin is still out"). That is why it composes with every delivery
14904
+ * instead of owning one, and why no new `NcDelivery` member and no new subject
14905
+ * kind exist for it — see D159.
14906
+ *
14907
+ * ── Identity ───────────────────────────────────────────────────────────────
14908
+ * `sceneId` is `SceneMonitor.id`, a `randomUUID()` minted by `createScene` —
14909
+ * globally unique, so it needs no device to disambiguate it. `deviceId` is
14910
+ * carried as a HINT for the editor and for the log line, never as part of the
14911
+ * lookup key: a rule whose hint drifted must still gate correctly.
14912
+ *
14913
+ * ── Which boolean ──────────────────────────────────────────────────────────
14914
+ * `latched` ABSENT means "whatever the scene itself says" — `SceneMonitor.emit`
14915
+ * already declares which boolean drives notification rules, and a second knob
14916
+ * that could disagree with it is exactly the D62 failure. Set it only to
14917
+ * override one rule against the scene's own default.
14918
+ *
14919
+ * - LIVE reading (`emit`/`latched` resolve to live): passes iff
14920
+ * `verdict === requiredState`. `unknown` — no reference for this light, view
14921
+ * shifted, no snapshot — passes NEITHER. A scene that cannot judge is not
14922
+ * evidence, in either direction.
14923
+ * - LATCHED reading: passes iff `latched === (requiredState === 'diverged')`.
14924
+ * The latch is a durable fact about the past ("it has diverged since I armed
14925
+ * it"), so a camera that has gone dark does not clear it — that is the whole
14926
+ * reason the operator asked for a latch.
14927
+ *
14928
+ * The gate reads an in-memory mirror (`NcSceneStateCache`) refreshed OFF the
14929
+ * event path, never the cap: D49. A mirror that has never loaded, or a scene it
14930
+ * does not carry, reads absent and the rule does NOT fire — fail closed, and
14931
+ * said out loud in the log rather than dropped in silence.
14932
+ */
14933
+ var NcSceneConditionSchema = object({
14934
+ /** `SceneMonitor.id` — the uuid the cap mints. The whole lookup key. */
14935
+ sceneId: string().min(1),
14936
+ /** The camera the scene lives on. A hint for the editor and the log line. */
14937
+ deviceId: number().int().optional(),
14938
+ /** The state the scene must be in for the rule to fire. */
14939
+ requiredState: _enum(["matched", "diverged"]),
14940
+ /**
14941
+ * Read the LATCH (`true`) or the LIVE verdict (`false`). Absent = follow the
14942
+ * scene's own `emit` field, which is the only place that decision belongs.
14943
+ */
14944
+ latched: boolean().optional()
14945
+ });
14567
14946
  var NcConditionsSchema = object({
14568
14947
  /** Gate on ANOTHER device's current state (the alarm armed, a switch on). */
14569
- deviceState: object({
14570
- deviceId: number().int(),
14571
- /** Any of these matches. */
14572
- states: array(string().min(1)).min(1)
14573
- }).optional(),
14948
+ deviceState: NcDeviceStateConditionSchema.optional(),
14949
+ /**
14950
+ * Gate on a SCENE's state — "only while the bin is still out". Composes with
14951
+ * every trigger (detection, occupancy, audio, sensor, package, track-end);
14952
+ * unlike `occupancy`/`audio` it discriminates nothing. See
14953
+ * {@link NcSceneCondition} and D159.
14954
+ */
14955
+ scene: NcSceneConditionSchema.optional(),
14574
14956
  /** Device scope — absent = all devices. */
14575
14957
  devices: array(number()).optional(),
14576
14958
  /** Detector class names (any overlap with the record's class set). */
@@ -14596,18 +14978,47 @@ var NcConditionsSchema = object({
14596
14978
  */
14597
14979
  labelEquals: array(string().min(1)).optional(),
14598
14980
  /**
14599
- * Identity matcher. P1 boundary: matched against the record's collapsed
14600
- * `label` (the identity display name propagated by the face pipeline) —
14601
- * identity-ID matching rides in P2 when identity ids reach the record.
14981
+ * KNOWN FACES the rule's identity scope, and the switch that says the rule
14982
+ * is about recognised people at all.
14983
+ *
14984
+ * Three states, and the empty one is the point:
14985
+ *
14986
+ * | value | meaning |
14987
+ * | --- | --- |
14988
+ * | absent | the rule does not care who it is; an unrecognised person matches |
14989
+ * | `[]` | **only known faces** — any identity in the gallery, nobody in particular |
14990
+ * | a list | only these identities |
14991
+ *
14992
+ * `[]` is the repo-wide "no selection = no narrowing" reading (an absent
14993
+ * `devices` list is every device), applied one level down: the operator has
14994
+ * turned the face scope ON and narrowed it to nothing, which is every known
14995
+ * face. No second field states the same thing — a switch that can disagree
14996
+ * with the list under it is worse than no switch (D62).
14997
+ *
14998
+ * MEMBERS ARE FACE-GALLERY `Identity.id`s (uuid), not display names. A name is
14999
+ * renameable, and a rule authored on "Gianluca" went silently dark the moment
15000
+ * the operator fixed the spelling. The id reaches the record on
15001
+ * `LabelAttribution.identityId`; the name is what the editor shows and what
15002
+ * `{{label}}` renders.
15003
+ *
15004
+ * Rules written before this carry NAMES, and are resolved to ids lazily at
15005
+ * load (`NcRuleStore.load`) against the live gallery — a name nothing answers
15006
+ * for is left as it stands and reported, never dropped. The engine also
15007
+ * accepts a display-name hit as a compatibility leg, so a rule whose
15008
+ * migration could not resolve keeps matching exactly what it matched before.
14602
15009
  */
14603
15010
  identities: array(string().min(1)).optional(),
14604
- /** Fuzzy plate matcher against the record's `label` (plate text). */
15011
+ /**
15012
+ * KNOWN PLATES / VEHICLES — the plate mirror of {@link identities}, including
15013
+ * the empty-list reading: `values: []` is "any plate the OCR could read",
15014
+ * a non-empty list is those plates (fuzzily). See {@link NcPlateMatcherSchema}.
15015
+ */
14605
15016
  plates: NcPlateMatcherSchema.optional(),
14606
15017
  /**
14607
- * Identity EXCLUDE — mirror of {@link identities} with `notIn` semantics.
14608
- * Same P1 boundary: matched against the record's collapsed `label` (the
14609
- * identity display name). A record with NO label passes (nothing to
14610
- * exclude), unlike the include variant which fails on an absent label.
15018
+ * Identity EXCLUDE — mirror of {@link identities} with `notIn` semantics, and
15019
+ * the same id members and the same lazy name→id migration. A record with NO
15020
+ * identity passes (nothing to exclude), unlike the include variant which
15021
+ * fails on an unrecognised subject. An EMPTY list excludes nobody.
14611
15022
  */
14612
15023
  identitiesExclude: array(string().min(1)).optional(),
14613
15024
  /**
@@ -14999,7 +15410,80 @@ var NcRuleInputSchema = object({
14999
15410
  * a rule that predates the gate must keep delivering byte-for-byte as it
15000
15411
  * did, and absent is the only way to say that without a migration.
15001
15412
  */
15002
- confirm: NcConfirmSchema.optional()
15413
+ confirm: NcConfirmSchema.optional(),
15414
+ /**
15415
+ * WAIT for face/plate recognition before saying anything.
15416
+ *
15417
+ * A notification's TEXT is frozen at enqueue and its media is re-resolved at
15418
+ * send; the identity is neither. A face is confirmed after `confirmFrames`
15419
+ * agreeing observations — p50 **11.4 s** after the track was first seen,
15420
+ * measured on this hub — and an `immediate` rule enqueues on the first object
15421
+ * event, seconds before that. So "Gianluca è arrivato" is unsayable on the
15422
+ * immediate path, and no amount of media re-resolution fixes a sentence.
15423
+ *
15424
+ * Only two honest answers exist, and this flag picks between them. It has
15425
+ * effect ONLY on a rule that declares a recognition scope
15426
+ * ({@link NcConditions.identities} or {@link NcConditions.plates}) — on any
15427
+ * other rule there is nothing to wait for and the flag is inert.
15428
+ *
15429
+ * | value | what happens |
15430
+ * | --- | --- |
15431
+ * | `true` | the rule stops firing on the object event and fires at TRACK CLOSE instead, once, with the name — later, and complete |
15432
+ * | 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) |
15433
+ *
15434
+ * `.optional()` and deliberately NOT `.default()`: a Zod default does not run
15435
+ * on the addon cap path, and absent has to keep meaning exactly what every
15436
+ * rule authored before this field meant.
15437
+ *
15438
+ * The cost of `true` is stated here because the editor states it too: a rule
15439
+ * that waits also inherits track-close SEMANTICS — its `zones` condition
15440
+ * tests every zone the track visited and a `crossing` condition can no longer
15441
+ * be satisfied, because a closed track carries no crossing.
15442
+ */
15443
+ waitForEnhancement: boolean().optional(),
15444
+ /**
15445
+ * GROUP a burst of subjects into ONE notification that grows.
15446
+ *
15447
+ * Seconds of quiet after the last matching subject before the burst is
15448
+ * considered over. While it is open, the first subject enqueues immediately —
15449
+ * **exactly as today, with no added latency** — and every real growth (a new
15450
+ * subject, or a name confirmed on one already in it) REPLACES that
15451
+ * notification with an updated one naming everybody. The push carries the
15452
+ * group's own coalescing tag, so the phone replaces rather than stacks.
15453
+ *
15454
+ * `0` / absent = off, and off is today's behaviour byte for byte.
15455
+ *
15456
+ * ### Why an idle cutoff and not a window
15457
+ *
15458
+ * The measured seven-person arrival on device 590 spans 110 s with every
15459
+ * internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
15460
+ * idle cutoff holds it as one and ends it when the arrival actually ends.
15461
+ * 30 is Frigate's shipped value for the same decision.
15462
+ *
15463
+ * ### What it replaces
15464
+ *
15465
+ * The blind cooldown, which collapses a burst by DISCARDING it. Measured on
15466
+ * device 615 / *Persona su Uscio* over six days: 116 qualifying tracks → 74
15467
+ * notifications, **44 (37.9%) suppressed outright**, 23 of them overlapping a
15468
+ * track that did fire and 7 carrying a confirmed identity nobody heard about.
15469
+ * A group collapses the same volume by MERGING, so the cooldown becomes a
15470
+ * budget over GROUPS — which is what it always meant — and a growth is never
15471
+ * throttled by the window its own first member spent.
15472
+ *
15473
+ * ### Interaction with {@link waitForEnhancement}
15474
+ *
15475
+ * They compose, and the order matters. `waitForEnhancement` defers the rule to
15476
+ * TRACK CLOSE, so with both set the group is opened by the first member to
15477
+ * CLOSE — already carrying its name — and grows as later members close. That
15478
+ * is later, and complete. With grouping alone the group opens on the first
15479
+ * object event and picks up names as they are confirmed, through the growth
15480
+ * path. Neither combination fires twice for one subject.
15481
+ *
15482
+ * `.optional()` and deliberately NOT `.default()`: a Zod default does not run
15483
+ * on the addon cap path, so absent must keep meaning what it meant before this
15484
+ * field existed.
15485
+ */
15486
+ groupIdleSec: number().int().min(0).max(600).optional()
15003
15487
  });
15004
15488
  /**
15005
15489
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -15106,6 +15590,7 @@ var NcConditionDescriptorSchema = object({
15106
15590
  "occupancy",
15107
15591
  "audio",
15108
15592
  "deviceState",
15593
+ "scene",
15109
15594
  "systemEvent"
15110
15595
  ]),
15111
15596
  operator: _enum([
@@ -15511,7 +15996,87 @@ var MethodAccessSchema = _enum([
15511
15996
  var AllowedProviderSchema = union([literal("*"), array(string())]);
15512
15997
  var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
15513
15998
  var CapScopeSchema = _enum(["device", "system"]);
15514
- var TokenScopeSchema = discriminatedUnion("type", [
15999
+ /**
16000
+ * DeviceSelector (scope model v3 — 2026-08-12).
16001
+ *
16002
+ * A `device` grant no longer carries a frozen list of deviceIds. It carries
16003
+ * a SELECTOR the matcher resolves against the live fleet, so the grant can be
16004
+ * DYNAMIC: a `types:['camera']` selector automatically covers a camera added
16005
+ * AFTER the grant was minted — no re-grant, no re-login.
16006
+ *
16007
+ * - `all` — every device in the deployment. The broad viewer/operator
16008
+ * lever without a `category` grant (a `category` grant also covers device
16009
+ * caps that carry no deviceId; `all` is specifically the device set).
16010
+ * - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
16011
+ * grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
16012
+ * is NOT covered until the grant is edited.
16013
+ * - `types` — every device of a `DeviceType` (e.g. every `camera`).
16014
+ * DYNAMIC. A device that changes type, or a new device of the type,
16015
+ * re-resolves on the next request.
16016
+ * - `locations` — every device whose operator-assigned `location` label is
16017
+ * in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
16018
+ * null/unset location matches NO `locations` selector.
16019
+ */
16020
+ var DeviceSelectorSchema = discriminatedUnion("kind", [
16021
+ object({ kind: literal("all") }),
16022
+ object({
16023
+ kind: literal("ids"),
16024
+ ids: array(number().int()).min(1)
16025
+ }),
16026
+ object({
16027
+ kind: literal("types"),
16028
+ types: array(_enum(DeviceType)).min(1)
16029
+ }),
16030
+ object({
16031
+ kind: literal("locations"),
16032
+ locations: array(string().min(1)).min(1)
16033
+ })
16034
+ ]);
16035
+ var DeviceTokenScopeSchema = object({
16036
+ type: literal("device"),
16037
+ /** The device SET this grant covers — resolved against the live fleet. */
16038
+ selector: DeviceSelectorSchema,
16039
+ access: array(MethodAccessSchema).min(1),
16040
+ /**
16041
+ * Whether a grant on a PARENT device transparently covers its accessory
16042
+ * CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
16043
+ * Direction is parent → children ONLY.
16044
+ *
16045
+ * Absent → the matcher DERIVES it from the access flavour: `view`
16046
+ * inherits (a camera viewer sees the camera's accessories), `create` /
16047
+ * `delete` do NOT (actuating/removing a child is an explicit act the
16048
+ * operator must grant on the child, not inherit from the parent). Set it
16049
+ * explicitly to override that default per grant.
16050
+ */
16051
+ includeLinked: boolean().optional()
16052
+ });
16053
+ /**
16054
+ * v2 → v3 lazy migration. A pre-v3 `device` grant carried
16055
+ * `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
16056
+ * `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
16057
+ * EVERY parse path — stored records AND the JWT-carried scope arrays
16058
+ * normalised at the request boundary ({@link normalizeTokenScopes} in
16059
+ * `device-selector.ts`). Chosen over a one-time DB migration because a
16060
+ * migration cannot reach a JWT already in a client's hands; parse-time
16061
+ * migration covers both without a flag day. No cast — the raw object is read
16062
+ * through `Reflect.get` (its static type is `unknown`).
16063
+ */
16064
+ function migrateLegacyTokenScope(raw) {
16065
+ if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
16066
+ if (Reflect.get(raw, "type") !== "device") return raw;
16067
+ if (Reflect.get(raw, "selector") !== void 0) return raw;
16068
+ const targets = Reflect.get(raw, "targets");
16069
+ if (!Array.isArray(targets)) return raw;
16070
+ return {
16071
+ type: "device",
16072
+ selector: {
16073
+ kind: "ids",
16074
+ ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
16075
+ },
16076
+ access: Reflect.get(raw, "access")
16077
+ };
16078
+ }
16079
+ var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
15515
16080
  object({
15516
16081
  type: literal("category"),
15517
16082
  target: CapScopeSchema,
@@ -15527,18 +16092,8 @@ var TokenScopeSchema = discriminatedUnion("type", [
15527
16092
  target: string(),
15528
16093
  access: array(MethodAccessSchema).min(1)
15529
16094
  }),
15530
- object({
15531
- type: literal("device"),
15532
- /**
15533
- * One or more deviceIds (serialised as strings for wire-format
15534
- * consistency with the rest of the union). Matcher accepts if
15535
- * `input.deviceId` ∈ `targets`. Array shape avoids the row-explosion
15536
- * of one scope-per-device when granting access to a set of cameras.
15537
- */
15538
- targets: array(string()).min(1),
15539
- access: array(MethodAccessSchema).min(1)
15540
- })
15541
- ]);
16095
+ DeviceTokenScopeSchema
16096
+ ]));
15542
16097
  object({
15543
16098
  id: string(),
15544
16099
  username: string(),
@@ -15855,7 +16410,7 @@ var TrackEnvelopeSchema = object({
15855
16410
  * `snapshots[]` references — megabytes across a page of tracks. `slim`
15856
16411
  * keeps every scalar the list surfaces actually render (ids, class(es),
15857
16412
  * label / audioLabels / importance enrichment, firstSeen/lastSeen, state,
15858
- * zonesVisited, bestEventId, envelope, hasFace) and returns `positions` /
16413
+ * zonesVisited, bestEventId, envelope, hasFace, hasRider) and returns `positions` /
15859
16414
  * `snapshots` as EMPTY arrays — detail views re-fetch the full row via
15860
16415
  * `getTrack`. Mirrors the event-store `projection` convention
15861
16416
  * (`getObjectEvents` et al.).
@@ -15991,7 +16546,21 @@ union([literal(1), literal(2)]);
15991
16546
  var LabelAttributionSchema = object({
15992
16547
  stepId: string(),
15993
16548
  modelId: string().optional(),
15994
- decidedAt: number()
16549
+ decidedAt: number(),
16550
+ /**
16551
+ * The GALLERY id behind a recognised tier-2 label — a face-gallery
16552
+ * `Identity.id` or a plate-gallery `Vehicle.id` (both `randomUUID`).
16553
+ *
16554
+ * The text alone is a DISPLAY NAME, and a display name is renameable: a
16555
+ * notification rule authored on "Gianluca" stopped matching the moment the
16556
+ * operator fixed the spelling in the gallery, and nothing said so. The id is
16557
+ * the thing that does not move, so it is what a rule matches on
16558
+ * (`NcConditions.identities`) and the text is what a human is shown.
16559
+ *
16560
+ * Absent when the label names no gallery row — a plate the OCR read but no
16561
+ * vehicle claims, a sub-class, a species, any tier-1 value.
16562
+ */
16563
+ identityId: string().optional()
15995
16564
  });
15996
16565
  /**
15997
16566
  * The TIERED label model (roadmap 4g), spread into `TrackSchema` and
@@ -16128,6 +16697,28 @@ var TrackSchema = object({
16128
16697
  * `=== true` and render nothing otherwise, never infer "no face".
16129
16698
  */
16130
16699
  hasFace: boolean().optional(),
16700
+ /**
16701
+ * This subject CONTAINS a folded rider — a person the rider-pairing step
16702
+ * ([D34](../decisions/adr-0034.md)) removed from the frame BEFORE the tracker,
16703
+ * so the passage is tracked once and as a VEHICLE.
16704
+ *
16705
+ * It exists because the fold's record was dishonest. D34 and the code both
16706
+ * said "the person is not lost — it is reported so both entities stay on the
16707
+ * record"; in fact the pair went into a per-processor RAM field behind an
16708
+ * accessor nobody called, and every durable surface said `vehicle`, full
16709
+ * stop. This is the composition note that makes the row true.
16710
+ *
16711
+ * A COMPOSITION, never a class and never a label. "This vehicle contains a
16712
+ * person" is not an answer to "what is this" — both label tiers would refuse
16713
+ * a macro token anyway (D89), and correctly. Nothing here changes what the
16714
+ * subject IS: a cyclist stays one vehicle track, occupancy still counts one,
16715
+ * and a `person` rule still does not fire for someone cycling past.
16716
+ *
16717
+ * **Absent ≠ false**, exactly like {@link hasFace}: every row written before
16718
+ * the column, and every hub that predates the field, omits it. Test
16719
+ * `=== true` and render nothing otherwise — never infer "no rider".
16720
+ */
16721
+ hasRider: boolean().optional(),
16131
16722
  ...TrackFlagFields,
16132
16723
  ...TrackRetrainFields
16133
16724
  });
@@ -16477,7 +17068,10 @@ var RecentTracksQueryInput = object({
16477
17068
  * Encodes the (lastSeen, trackId) sort position — treat as opaque. */
16478
17069
  cursor: string().optional(),
16479
17070
  /** See {@link TrackProjectionSchema}. Default `full`. */
16480
- projection: TrackProjectionSchema.optional()
17071
+ projection: TrackProjectionSchema.optional(),
17072
+ /** Include stationary-promoted rows (parked objects). Default false: the
17073
+ * feed lists passages; parking records live on the stationary registry. */
17074
+ includeStationary: boolean().optional()
16481
17075
  });
16482
17076
  var RecentTracksPageSchema = object({
16483
17077
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -16695,7 +17289,11 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16695
17289
  zone: TrackZoneFilterSchema.optional(),
16696
17290
  /** See {@link TrackProjectionSchema}. Default `full` (backward
16697
17291
  * compatible — omitting the field keeps today's exact behaviour). */
16698
- projection: TrackProjectionSchema.optional()
17292
+ projection: TrackProjectionSchema.optional(),
17293
+ /** Include stationary-promoted rows (parked objects handed to the
17294
+ * stationary registry). Default false: the timeline lists passages,
17295
+ * not parking records (operator decision, 2026-08-15). */
17296
+ includeStationary: boolean().optional()
16699
17297
  }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
16700
17298
  kind: "mutation",
16701
17299
  auth: "admin"
@@ -16859,11 +17457,16 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16859
17457
  auth: "admin"
16860
17458
  }), method(object({
16861
17459
  eventId: string(),
16862
- kind: MediaFileKindEnum.optional()
17460
+ kind: MediaFileKindEnum.optional(),
17461
+ deviceId: number()
17462
+ }), array(MediaFileSchema).readonly()), method(object({
17463
+ trackId: string(),
17464
+ kinds: array(MediaFileKindEnum).optional(),
17465
+ deviceId: number()
16863
17466
  }), array(MediaFileSchema).readonly()), method(object({
16864
17467
  trackId: string(),
16865
- kinds: array(MediaFileKindEnum).optional()
16866
- }), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
17468
+ deviceId: number()
17469
+ }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
16867
17470
  kind: "mutation",
16868
17471
  auth: "admin"
16869
17472
  }), method(RebuildObjectEmbeddingsInput, RebuildObjectEmbeddingsResultSchema, {
@@ -17563,6 +18166,17 @@ var maxSessionHoldMsField = {
17563
18166
  default: 12e4,
17564
18167
  step: 5e3
17565
18168
  };
18169
+ /**
18170
+ * Quiet period that closes an `audioMode: 'on-motion'` audio window. Floor of
18171
+ * 5s so a rearm can never degenerate into per-event stream churn; default 90s
18172
+ * comfortably outlives the gap between two PIR wakes on a battery camera.
18173
+ */
18174
+ var audioMotionWindowMsField = {
18175
+ min: 5e3,
18176
+ max: 6e5,
18177
+ default: 9e4,
18178
+ step: 5e3
18179
+ };
17566
18180
  var motionFpsField = {
17567
18181
  min: 1,
17568
18182
  max: 30,
@@ -17575,10 +18189,26 @@ var detectionFpsField = {
17575
18189
  default: 10,
17576
18190
  step: 1
17577
18191
  };
18192
+ /**
18193
+ * The occupancy re-check interval. DEFAULT 300 s (2026-08-13 — was 30 s).
18194
+ *
18195
+ * The recheck is now on by default (a parked car is invisible to occupancy
18196
+ * rules until the stationary registry has been rebuilt by motion, which after a
18197
+ * restart may be never on a quiet camera). Each cycle re-subscribes a detection
18198
+ * session — an RTSP re-dial — so the switch is only affordable at a WIDE
18199
+ * interval: 300 s is ~12 re-dials an hour per camera, against 120 at the old
18200
+ * 30 s. A parked car is therefore counted within 5 minutes of a restart.
18201
+ *
18202
+ * Why not wider: `max` is 300 and raising it is TRAIN-BOUND, not addon-bound —
18203
+ * the host validates `attachCamera` against ITS copy of this schema, so a
18204
+ * runner asked for 600 would be rejected by the hub until a `@camstack/server`
18205
+ * carrying the wider bound is installed everywhere. 300 is the widest value
18206
+ * that ships with an addon deploy.
18207
+ */
17578
18208
  var occupancyRecheckSecField = {
17579
18209
  min: 0,
17580
18210
  max: 300,
17581
- default: 30,
18211
+ default: 300,
17582
18212
  step: 5
17583
18213
  };
17584
18214
  var occupancyRecheckFramesField = {
@@ -17723,6 +18353,27 @@ var RunnerCameraConfigSchema = object({
17723
18353
  * resolved `CameraDetectionConfig`.
17724
18354
  */
17725
18355
  maxSessionHoldMs: number().min(maxSessionHoldMsField.min).max(maxSessionHoldMsField.max).optional(),
18356
+ /**
18357
+ * Orchestrator-side quiet period (ms) that closes an `audioMode:
18358
+ * 'on-motion'` audio window, measured from the LAST motion event.
18359
+ *
18360
+ * This exists because the falling edge cannot be relied on. Camera-native
18361
+ * providers emit motion as a RISING EDGE ONLY (Reolink's Baichuan push and
18362
+ * its email-push SMTP path both emit `detected: true` and never the
18363
+ * counterpart); only the frame-diff analyzer emits falls. So on an
18364
+ * onboard-only camera a window that closed only on `detected: false` never
18365
+ * closed at all, and `on-motion` silently behaved as `always-on` — on a
18366
+ * battery camera, the one failure mode the mode exists to prevent.
18367
+ *
18368
+ * Every motion event rearms this timer WITHOUT restarting the stream, so a
18369
+ * burst of re-fires costs nothing. A falling edge, when one does arrive,
18370
+ * still closes earlier via `motionCooldownMs` — whichever comes first wins.
18371
+ *
18372
+ * Not consumed by the runner: carried here so it shares the per-camera
18373
+ * device-settings surface with `motionCooldownMs`, exactly like
18374
+ * `maxSessionHoldMs`.
18375
+ */
18376
+ audioMotionWindowMs: number().min(audioMotionWindowMsField.min).max(audioMotionWindowMsField.max).optional(),
17726
18377
  motionFps: number().min(motionFpsField.min).max(motionFpsField.max).default(motionFpsField.default),
17727
18378
  detectionFps: number().min(detectionFpsField.min).max(detectionFpsField.max).default(detectionFpsField.default),
17728
18379
  motionStreamId: string(),
@@ -17776,15 +18427,21 @@ var RunnerCameraConfigSchema = object({
17776
18427
  */
17777
18428
  onboardMotionDrivesAnalyzer: boolean().default(true),
17778
18429
  /**
17779
- * Master toggle for the occupancy re-check. When `false` (DEFAULT) the runner
17780
- * never arms the periodic recheck timer, regardless of `occupancyRecheckSec`
17781
- * this is off by default because the recheck re-subscribes a detection session
17782
- * every N seconds while `watching`, a major source of pull-decoder re-dial
17783
- * churn (each cycle creates+tears a session → RTSP re-dial → latency). The
18430
+ * Master toggle for the occupancy re-check. When `false` the runner never arms
18431
+ * the periodic recheck timer, regardless of `occupancyRecheckSec`; the
17784
18432
  * `occupancyRecheckSec` / `occupancyRecheckFrames` sliders only take effect
17785
18433
  * (and only render) when this is enabled.
18434
+ *
18435
+ * DEFAULT `true` since 2026-08-13 (was `false`). It was off because the
18436
+ * recheck re-subscribes a detection session every N seconds while `watching`
18437
+ * — each cycle creates+tears a session ⇒ an RTSP re-dial ⇒ latency, a major
18438
+ * pull-decoder churn source. What that bought was a blind spot: a STATIONARY
18439
+ * object is counted only while the stationary registry holds it, and the
18440
+ * registry rebuilds from motion, so after a restart a parked car was invisible
18441
+ * to every occupancy rule until something moved in front of it. The churn is
18442
+ * now paid on the interval instead — see `occupancyRecheckSecField`.
17786
18443
  */
17787
- occupancyRecheckEnabled: boolean().default(false),
18444
+ occupancyRecheckEnabled: boolean().default(true),
17788
18445
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
17789
18446
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
17790
18447
  /**
@@ -17812,7 +18469,7 @@ var RunnerCameraConfigSchema = object({
17812
18469
  */
17813
18470
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
17814
18471
  });
17815
- 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;
18472
+ 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;
17816
18473
  /**
17817
18474
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
17818
18475
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -18828,7 +19485,16 @@ targets: array(object({
18828
19485
  /** A sleeping battery camera: the frame is deliberately stale and will
18829
19486
  * NOT refresh in the background. A surface should say so rather than
18830
19487
  * present it as current. */
18831
- sleeping: boolean()
19488
+ sleeping: boolean(),
19489
+ /** Current device state rendered over the cached frame. State images
19490
+ * remain authoritative even when their photographic background is
19491
+ * old; null means the link must carry a current camera frame. */
19492
+ stateReason: _enum([
19493
+ "disabled",
19494
+ "sleeping",
19495
+ "unreachable",
19496
+ "waking"
19497
+ ]).nullable()
18832
19498
  })));
18833
19499
  /**
18834
19500
  * `sso-bridge` — internal hub-only cap that lets SSO-style auth
@@ -20482,6 +21148,25 @@ var BatteryStatusSchema = object({
20482
21148
  /** Ms epoch of the last observation. Lets consumers reason about freshness. */
20483
21149
  lastUpdated: number(),
20484
21150
  /**
21151
+ * Ms epoch of the last time the device PROVED it was reachable — a
21152
+ * completed firmware round-trip, an observed wake, or an inbound push
21153
+ * (firmware event, email). `0`/absent = never since this slice was born.
21154
+ *
21155
+ * This is the ONLY input that separates "asleep" from "gone", and it is
21156
+ * fed exclusively by PASSIVE signals: nothing may write it by reaching
21157
+ * for the radio, because a poll that confirms reachability is the same
21158
+ * poll that drains the battery. See {@link deriveBatteryPresence} — the
21159
+ * single derivation every consumer must use; no surface computes its own.
21160
+ *
21161
+ * It is deliberately NOT a clock in the
21162
+ * `scripts/check-runtime-state-durability.ts` sense: it is the
21163
+ * observation itself, and it is the only thing a 30-hour silence is
21164
+ * visible in. Writers quantise it (see `CONTACT_WRITE_QUANTUM_MS` in the
21165
+ * Reolink provider) so a value that means "recently" cannot cost a
21166
+ * SQLite commit per round-trip.
21167
+ */
21168
+ lastContactAt: number().optional(),
21169
+ /**
20485
21170
  * True when the source is a BINARY low-battery indicator (HA
20486
21171
  * `binary_sensor` device_class=battery / `LOW_BAT`) that has no real
20487
21172
  * charge level — `percentage` is then a coarse stand-in (100 = normal,
@@ -22754,54 +23439,139 @@ var TalkAudioCodecSchema = _enum([
22754
23439
  "g711ulaw",
22755
23440
  "g711alaw"
22756
23441
  ]);
22757
- DeviceType.Camera, method(object({ deviceId: number() }), object({
22758
- sessionId: string(),
22759
- sdpOffer: string()
22760
- }), {
22761
- kind: "mutation",
22762
- auth: "admin"
22763
- }), method(object({
22764
- deviceId: number(),
22765
- sessionId: string(),
22766
- sdpAnswer: string()
22767
- }), _void(), {
22768
- kind: "mutation",
22769
- auth: "admin"
22770
- }), method(object({
22771
- deviceId: number(),
22772
- sessionId: string()
22773
- }), _void(), {
22774
- kind: "mutation",
22775
- auth: "admin"
22776
- }), method(object({ deviceId: number() }), object({ sessionId: string() }), {
22777
- kind: "mutation",
22778
- auth: "admin"
22779
- }), method(object({
22780
- deviceId: number(),
22781
- /** Audio bytes for ONE frame, base64-encoded so the payload
22782
- * survives tRPC JSON serialization. */
22783
- audioBase64: string(),
22784
- /** Wire codec of the payload. Omit to let the provider default
22785
- * to its native expected format (s16le @ provider-native rate,
22786
- * mono). See {@link TalkAudioCodecSchema} for the supported set. */
22787
- codec: TalkAudioCodecSchema.optional(),
22788
- /** Sample rate (Hz). REQUIRED for `s16le`; advisory for
22789
- * `opus` (encoder clock); ignored for `g711*` (implied 8000). */
22790
- sampleRate: number().int().positive().optional(),
22791
- /** Channel count. Default 1. */
22792
- channels: number().int().positive().optional(),
22793
- /** Sequence number for ordering / dropping out-of-order frames. */
22794
- sequenceNumber: number().int()
22795
- }), object({ accepted: boolean() }), {
22796
- kind: "mutation",
22797
- auth: "admin"
22798
- }), method(object({ deviceId: number() }), _void(), {
22799
- kind: "mutation",
22800
- auth: "admin"
22801
- }), object({
22802
- deviceId: number(),
22803
- status: IntercomStatusSchema
22804
- });
23442
+ var intercomCapability = {
23443
+ name: "intercom",
23444
+ scope: "device",
23445
+ deviceNative: true,
23446
+ mode: "singleton",
23447
+ deviceTypes: [DeviceType.Camera],
23448
+ methods: {
23449
+ /**
23450
+ * Open a server-side WebRTC audio-only session. Returns an SDP
23451
+ * offer with a single sendonly audio m-line the client answers
23452
+ * (client → server direction). The server wakes battery cams
23453
+ * transparently before opening the upstream talk channel.
23454
+ */
23455
+ startSession: method(object({ deviceId: number() }), object({
23456
+ sessionId: string(),
23457
+ sdpOffer: string()
23458
+ }), {
23459
+ kind: "mutation",
23460
+ auth: "admin"
23461
+ }),
23462
+ handleAnswer: method(object({
23463
+ deviceId: number(),
23464
+ sessionId: string(),
23465
+ sdpAnswer: string()
23466
+ }), _void(), {
23467
+ kind: "mutation",
23468
+ auth: "admin"
23469
+ }),
23470
+ /** Close explicitly. Server also auto-closes on 30s idle. */
23471
+ stopSession: method(object({
23472
+ deviceId: number(),
23473
+ sessionId: string()
23474
+ }), _void(), {
23475
+ kind: "mutation",
23476
+ auth: "admin"
23477
+ }),
23478
+ /**
23479
+ * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
23480
+ * non-WebRTC consumers (HomeKit export, Alexa raw audio, test
23481
+ * harnesses) that already have decoded PCM frames and just need a
23482
+ * direct path onto the camera's talk channel. Mutually exclusive
23483
+ * with `startSession` (an active WebRTC session must be stopped
23484
+ * before a raw-PCM session can be opened on the same device, and
23485
+ * vice versa).
23486
+ */
23487
+ startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
23488
+ kind: "mutation",
23489
+ auth: "admin"
23490
+ }),
23491
+ /**
23492
+ * Push one chunk of talk-back audio onto the active talk session.
23493
+ * The cap is codec-agnostic: the caller declares (or omits) the
23494
+ * wire format via `codec`; the provider decides between passthrough
23495
+ * (when the wire codec matches the camera's native talk channel),
23496
+ * transcoding via the `audio-codec` cap, or rejecting the call.
23497
+ *
23498
+ * Callers do NOT need to know the camera's wire format or sample
23499
+ * rate — that information lives entirely inside the provider.
23500
+ *
23501
+ * Sequence numbers MUST be monotonic per talk session; older frames
23502
+ * arriving after newer ones are dropped to avoid smearing the
23503
+ * downstream encoder state (G.711 is stateless but IMA ADPCM's
23504
+ * predictor would corrupt with re-ordering).
23505
+ */
23506
+ pushTalkAudio: method(object({
23507
+ deviceId: number(),
23508
+ /** Audio bytes for ONE frame, base64-encoded so the payload
23509
+ * survives tRPC JSON serialization. */
23510
+ audioBase64: string(),
23511
+ /** Wire codec of the payload. Omit to let the provider default
23512
+ * to its native expected format (s16le @ provider-native rate,
23513
+ * mono). See {@link TalkAudioCodecSchema} for the supported set. */
23514
+ codec: TalkAudioCodecSchema.optional(),
23515
+ /** Sample rate (Hz). REQUIRED for `s16le`; advisory for
23516
+ * `opus` (encoder clock); ignored for `g711*` (implied 8000). */
23517
+ sampleRate: number().int().positive().optional(),
23518
+ /** Channel count. Default 1. */
23519
+ channels: number().int().positive().optional(),
23520
+ /** Sequence number for ordering / dropping out-of-order frames. */
23521
+ sequenceNumber: number().int()
23522
+ }), object({ accepted: boolean() }), {
23523
+ kind: "mutation",
23524
+ auth: "admin"
23525
+ }),
23526
+ /** Close the raw-PCM talk session. Idempotent. */
23527
+ endTalkSession: method(object({ deviceId: number() }), _void(), {
23528
+ kind: "mutation",
23529
+ auth: "admin"
23530
+ })
23531
+ },
23532
+ events: { onStatusChanged: { data: object({
23533
+ deviceId: number(),
23534
+ status: IntercomStatusSchema
23535
+ }) } },
23536
+ status: {
23537
+ schema: IntercomStatusSchema,
23538
+ kind: "command-driven"
23539
+ },
23540
+ /**
23541
+ * Runtime-state slice — mirrored by the kernel.
23542
+ *
23543
+ * The cap declared `status` and nothing else, so the only two sources an
23544
+ * exporter has for a value — the `device.state-changed` slice event and the
23545
+ * `deviceState.getAllSnapshots` snapshot, both built from runtime state —
23546
+ * carried nothing for `intercom`. A talk-back entity in Home Assistant would
23547
+ * have been published and never received a value, which is the defect the
23548
+ * export's two classification tables exist to prevent (177 of them, once), so
23549
+ * `intercom` was excluded rather than exported.
23550
+ *
23551
+ * The shape is the status shape: there is exactly one truth about talk-back
23552
+ * and duplicating it into a second schema is how two halves of one capability
23553
+ * come to disagree. Providers write it through
23554
+ * `this.runtimeState.setCapState('intercom', …)` at the four points that open
23555
+ * and close a session, and seed it at registration so the slice exists before
23556
+ * the first session rather than after it.
23557
+ *
23558
+ * **Bound, named rather than hidden:** `talking` mirrors the provider's own
23559
+ * session handle, so a session torn down by a transport death that never
23560
+ * reaches `stopSession` / `endTalkSession` leaves it latched until the next
23561
+ * session or the next restart. That is why the slice is `session` and not
23562
+ * `restored` — a restart must never restore "talking".
23563
+ */
23564
+ runtimeState: IntercomStatusSchema,
23565
+ /**
23566
+ * Runtime-state durability: **session** — `talking` describes a live audio
23567
+ * session, which by definition does not survive the process that held it.
23568
+ * Restoring it would publish a camera as talking to nobody.
23569
+ *
23570
+ * See `RuntimeStateDurability`. Enforced by
23571
+ * `scripts/check-runtime-state-durability.ts`.
23572
+ */
23573
+ durability: "session"
23574
+ };
22805
23575
  /**
22806
23576
  * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
22807
23577
  * with a mowing lifecycle plus a dock action.
@@ -25498,7 +26268,7 @@ method(object({
25498
26268
  toMs: number()
25499
26269
  }), RecordingAvailabilitySchema, {
25500
26270
  kind: "query",
25501
- auth: "admin"
26271
+ auth: "protected"
25502
26272
  }), method(object({
25503
26273
  deviceId: number(),
25504
26274
  fromMs: number(),
@@ -25506,14 +26276,14 @@ method(object({
25506
26276
  tzOffsetMinutes: number()
25507
26277
  }), RecordingDaysSchema, {
25508
26278
  kind: "query",
25509
- auth: "admin"
26279
+ auth: "protected"
25510
26280
  }), method(object({
25511
26281
  deviceId: number(),
25512
26282
  fromMs: number(),
25513
26283
  toMs: number()
25514
26284
  }), RecordingManifestSchema, {
25515
26285
  kind: "query",
25516
- auth: "admin"
26286
+ auth: "protected"
25517
26287
  }), method(object({}), RecordingStorageUsageSchema, {
25518
26288
  kind: "query",
25519
26289
  auth: "admin"
@@ -25803,14 +26573,77 @@ method(object({
25803
26573
  * thing except the comparator: `similarity` (CLIP cosine at the same ROI coords
25804
26574
  * vs condition-tagged references) and `llm` (vision-LLM judgment over the crop).
25805
26575
  *
25806
- * D14 device-config archetype (`deviceConfig.ui.kind:'widget'`) the framework
25807
- * derives the device-detail contribution; the provider carries NO hand-written
25808
- * settings-contribution methods. `status.kind:'push'` the engine pushes on
25809
- * every hysteresis flip / availability change; consumers never poll.
25810
- */
25811
- /** Extensible condition tag. Seeded 'day' | 'night'; open by design so more can
25812
- * be added without a wire break (matching falls back to any-condition refs). */
26576
+ * **No `deviceConfig`, deliberately.** This shipped as the D14 widget archetype,
26577
+ * which put a "Scenes" tab on one camera's detail page. That is the wrong shape
26578
+ * for the thing: a scene is a standing question about the property ("is the bin
26579
+ * still out"), and the operator's question is "which of my scenes have tripped",
26580
+ * across every camera at once — not "what does camera 617 think". Buried one
26581
+ * camera deep it also could not be found. The surface is now a top-level admin
26582
+ * page (`/scenes`, `pages/Scenes.tsx`) that lists every scene on every camera and
26583
+ * picks the camera inside the create flow, the same shape Events and Faces have.
26584
+ *
26585
+ * The consequence to keep in mind: `host/scene-monitor-editor` is gone from
26586
+ * `HOST_WIDGETS` too. `scripts/check-host-widget-resolves.ts` asserts BOTH
26587
+ * directions, so a registration nobody declares fails exactly as loudly as a
26588
+ * declaration nobody registers. The editor is imported directly by the page.
26589
+ *
26590
+ * `status.kind:'push'` — the engine pushes on every hysteresis flip /
26591
+ * availability change; consumers never poll.
26592
+ */
26593
+ /** Extensible condition tag. Seeded 'day' | 'ir' (the two variants the operator
26594
+ * captures) plus 'night' | 'dawn' | 'dusk' from the resolver's sun-times band.
26595
+ * Open by design so more can be added without a wire break.
26596
+ *
26597
+ * Matching does NOT fall back across conditions: cross-condition cosines are
26598
+ * not comparable, so "I have never seen this scene in this light" is reported
26599
+ * as `unknown`, never guessed. A day reference scored against an IR frame
26600
+ * collapses the cosine and would latch a false alarm every single night. */
25813
26601
  var SceneConditionSchema = string();
26602
+ /**
26603
+ * What a scene does when the CURRENT light has no reference of its own.
26604
+ *
26605
+ * The lighting variants are not equally likely to exist. Almost every operator
26606
+ * captures daylight and then never stands outside at 22:00 to capture IR, and a
26607
+ * scene that is only ever going to be asked about a daytime question ("is the
26608
+ * bin still on the kerb at 08:00") does not need a night reference at all. The
26609
+ * night half must therefore be OPTIONAL, and optional means the scene keeps
26610
+ * working without it rather than degrading into a permanent complaint.
26611
+ *
26612
+ * - `skip` (default) — the check in that light is not made. Not a verdict, not
26613
+ * an alarm, not even an `unknown`: the live state simply stays whatever the
26614
+ * last covered light left it at, the latch is untouched, and the hysteresis
26615
+ * run is neither spent nor cleared. The scene resumes by itself at first
26616
+ * light. This is the only behaviour under which "I never captured IR" is a
26617
+ * configuration choice instead of a nightly fault.
26618
+ * - `judge-anyway` — score against the OTHER conditions' references. Available
26619
+ * for cameras whose IR frame is close enough to daylight (a floodlit
26620
+ * driveway, an always-white-light doorbell), and wrong for everything else:
26621
+ * cross-condition cosines are not comparable, so a day reference against a
26622
+ * true IR frame collapses and the scene reports a theft at 21:40.
26623
+ *
26624
+ * Never applies when the scene has NO comparable reference at all — that is
26625
+ * "not armed yet", it is reported as `no-reference-for-condition`, and silence
26626
+ * there would hide a scene the operator never finished setting up.
26627
+ */
26628
+ var SceneUncoveredPolicySchema = _enum(["skip", "judge-anyway"]);
26629
+ /** `matched` = the baseline is what we see; `diverged` = it demonstrably is not;
26630
+ * `unknown` = we cannot judge (no reference for this condition, encoder model
26631
+ * changed, view shifted, no snapshot). `unknown` is a real value, not a null,
26632
+ * and never counts toward hysteresis in either direction. */
26633
+ var SceneVerdictSchema = _enum([
26634
+ "matched",
26635
+ "diverged",
26636
+ "unknown"
26637
+ ]);
26638
+ /** Why a scene cannot judge. Named, because this feature's failure mode is
26639
+ * silence that reads as "nothing has happened". */
26640
+ var SceneUnavailableSchema = _enum([
26641
+ "no-reference-for-condition",
26642
+ "view-shifted",
26643
+ "no-vision-profile",
26644
+ "encoder-model-changed",
26645
+ "no-snapshot"
26646
+ ]);
25814
26647
  /** One captured reference — condition-tagged, model-version-gated. `embedding`
25815
26648
  * is `number[]` (Float32Array does NOT survive MsgPack/UDS). */
25816
26649
  var SceneReferenceSchema = object({
@@ -25818,7 +26651,14 @@ var SceneReferenceSchema = object({
25818
26651
  modelId: string(),
25819
26652
  condition: SceneConditionSchema,
25820
26653
  capturedAt: number(),
25821
- thumbnailMediaId: string().optional()
26654
+ thumbnailMediaId: string().optional(),
26655
+ /** Whole-frame (downscaled) embedding captured alongside the ROI crop. The
26656
+ * anti-view-shift anchor: a bumped camera, a PTZ preset or a re-aim makes the
26657
+ * normalized rect frame a different piece of world, and the scene would
26658
+ * diverge forever with a perfectly plausible cosine. Checked LAZILY, only
26659
+ * when hysteresis is about to flip — one extra encode per candidate
26660
+ * transition, not per poll. */
26661
+ anchorEmbedding: array(number()).optional()
25822
26662
  });
25823
26663
  var SceneMonitorStateSchema = object({
25824
26664
  id: string(),
@@ -25840,6 +26680,28 @@ var SceneCheckSchema = discriminatedUnion("mode", [object({
25840
26680
  profileId: string().optional(),
25841
26681
  hysteresisCount: number().int().positive()
25842
26682
  })]);
26683
+ var SCENE_DEFAULT_ANCHOR_THRESHOLD = .85;
26684
+ /** Night is OPTIONAL. A scene with only a daylight reference sits the IR hours
26685
+ * out in silence rather than reporting a fault every night. */
26686
+ var SCENE_DEFAULT_UNCOVERED_POLICY = "skip";
26687
+ /**
26688
+ * Vision-model adjudication of a candidate flip. Field names deliberately
26689
+ * mirror `NcConfirmSchema` so an operator meets one vocabulary, not two.
26690
+ *
26691
+ * `onTimeout` defaults to **'hold'**, the OPPOSITE of `NcConfirmGate`'s
26692
+ * fail-open: a notification suppressed is the worse error there, but a vision
26693
+ * model that timed out has not told us the bin is gone, and a latch is a
26694
+ * stateful claim that costs the operator a trip to reset.
26695
+ */
26696
+ var SceneConfirmSchema = object({
26697
+ enabled: boolean().default(false),
26698
+ prompt: string().min(1).max(1e3),
26699
+ profileId: string().optional(),
26700
+ timeoutMs: number().int().min(1e3).max(2e4).default(8e3),
26701
+ maxImagePx: number().int().min(64).max(2048).default(448),
26702
+ /** What a timeout / unavailable model means for the PENDING flip. */
26703
+ onTimeout: _enum(["flip", "hold"]).default("hold")
26704
+ });
25843
26705
  var SceneMonitorSchema = object({
25844
26706
  id: string(),
25845
26707
  label: string(),
@@ -25858,7 +26720,56 @@ var SceneMonitorSchema = object({
25858
26720
  lastConfidence: number().nullable(),
25859
26721
  currentCondition: SceneConditionSchema.nullable(),
25860
26722
  availability: _enum(["ok", "unavailable"]),
25861
- unavailableReason: string().nullable()
26723
+ unavailableReason: string().nullable(),
26724
+ /** Which state is "the initial screen". `null` until the first capture. */
26725
+ baselineStateId: string().nullable(),
26726
+ /** Which boolean drives notification rules and any export. */
26727
+ emit: _enum(["latched", "live"]).default("latched"),
26728
+ /** Live: does the region match the baseline RIGHT NOW. */
26729
+ verdict: SceneVerdictSchema,
26730
+ /** Has it been `diverged` at least once since `armedAt` — the operator's boolean. */
26731
+ latched: boolean(),
26732
+ /** Last reset (or creation). */
26733
+ armedAt: number(),
26734
+ divergedAt: number().nullable(),
26735
+ restoredAt: number().nullable(),
26736
+ /** A check is only COUNTED when the device has been quiet this long. Motion
26737
+ * during the window DISCARDS the observation — a car pulling up in front of
26738
+ * the bin must not be able to spend hysteresis credit. */
26739
+ quietSeconds: number().int().min(0).max(3600).default(60),
26740
+ /** An observation only advances the pending count when it is at least this
26741
+ * far from the previously counted one, so N agreeing checks span real time
26742
+ * rather than N adjacent polls inside one occlusion. */
26743
+ minObservationSpacingSec: number().int().min(0).max(3600).default(120),
26744
+ /** Vision-model adjudication of a candidate flip. Similarity primary only. */
26745
+ confirm: SceneConfirmSchema.optional(),
26746
+ /** Whole-frame anchor cosine below which a flip is REFUSED as `view-shifted`. */
26747
+ anchorThreshold: number().min(0).max(1).default(SCENE_DEFAULT_ANCHOR_THRESHOLD),
26748
+ /** Clear the latch on its own when the scene matches again? Default false —
26749
+ * `restoredAt` and the `scene-restored` edge are recorded regardless, so an
26750
+ * automation can react to the bin coming back without the operator's own
26751
+ * alarm silently clearing itself. */
26752
+ autoRestore: boolean().default(false),
26753
+ /** What to do when the current light has no reference of its own. See
26754
+ * {@link SceneUncoveredPolicySchema} — the default makes night OPTIONAL. */
26755
+ onUncoveredCondition: SceneUncoveredPolicySchema.default(SCENE_DEFAULT_UNCOVERED_POLICY),
26756
+ /**
26757
+ * The light whose checks are currently being SAT OUT under
26758
+ * `onUncoveredCondition: 'skip'` — `null` when the scene is checking normally.
26759
+ *
26760
+ * Engine-reported and advisory only: it moves no verdict, no latch and no
26761
+ * hysteresis. It exists so the card can say *"night (IR) — checks paused,
26762
+ * nothing captured in this light"* in the same calm voice as the coverage
26763
+ * line, because the alternative is a scene that silently stops answering
26764
+ * after sunset with nothing anywhere saying why. A skipped check must never
26765
+ * read as a broken one.
26766
+ */
26767
+ suspendedCondition: SceneConditionSchema.nullable().default(null),
26768
+ /** Named cause when `verdict === 'unknown'`. */
26769
+ unavailable: SceneUnavailableSchema.nullable(),
26770
+ /** Conditions that have at least one comparable reference — the coverage line
26771
+ * ("day ✓ · ir ✓ · dusk ✗") that turns a silent fallback into a visible fact. */
26772
+ coveredConditions: array(SceneConditionSchema)
25862
26773
  });
25863
26774
  var SceneMonitorStatusSchema = object({
25864
26775
  monitors: array(SceneMonitorSchema),
@@ -25871,12 +26782,6 @@ var sceneMonitorCapability = {
25871
26782
  kind: "wrapper",
25872
26783
  defaultActive: true,
25873
26784
  deviceTypes: [DeviceType.Camera],
25874
- deviceConfig: { ui: {
25875
- kind: "widget",
25876
- widgetId: "host/scene-monitor-editor",
25877
- tab: "scenes",
25878
- label: "Scenes"
25879
- } },
25880
26785
  methods: {
25881
26786
  listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
25882
26787
  createScene: method(object({
@@ -25907,7 +26812,15 @@ var sceneMonitorCapability = {
25907
26812
  "both"
25908
26813
  ]).optional(),
25909
26814
  checkIntervalSec: number().optional(),
25910
- check: SceneCheckSchema.optional()
26815
+ check: SceneCheckSchema.optional(),
26816
+ emit: _enum(["latched", "live"]).optional(),
26817
+ quietSeconds: number().int().min(0).max(3600).optional(),
26818
+ minObservationSpacingSec: number().int().min(0).max(3600).optional(),
26819
+ anchorThreshold: number().min(0).max(1).optional(),
26820
+ autoRestore: boolean().optional(),
26821
+ onUncoveredCondition: SceneUncoveredPolicySchema.optional(),
26822
+ /** `null` clears the vision-model adjudicator. */
26823
+ confirm: SceneConfirmSchema.nullable().optional()
25911
26824
  })
25912
26825
  }), _void(), {
25913
26826
  kind: "mutation",
@@ -25948,6 +26861,26 @@ var sceneMonitorCapability = {
25948
26861
  }), _void(), {
25949
26862
  kind: "mutation",
25950
26863
  auth: "admin"
26864
+ }),
26865
+ /**
26866
+ * Clear the latch, re-arm, and — by default — RE-CAPTURE the baseline for
26867
+ * the CURRENT condition. The bin never goes back in exactly the same spot;
26868
+ * "reset" in the operator's head means *this is the new normal*, and
26869
+ * re-capture is what makes the feature self-healing against slow drift
26870
+ * instead of failing silently weeks later.
26871
+ *
26872
+ * Reachable from three surfaces on this one mutation: the scene card, a
26873
+ * notification button (an `onTrigger` sequence with a `kind:'cap'` step —
26874
+ * no new Notification-Center code at all), and tRPC for scripts.
26875
+ */
26876
+ resetScene: method(object({
26877
+ deviceId: number(),
26878
+ monitorId: string(),
26879
+ /** Defaults to TRUE at the provider seam — see `SCENE_RESET_RECAPTURES`. */
26880
+ recapture: boolean().optional()
26881
+ }), _void(), {
26882
+ kind: "mutation",
26883
+ auth: "admin"
25951
26884
  })
25952
26885
  },
25953
26886
  status: {
@@ -26184,7 +27117,70 @@ var CamStreamDescriptorSchema = object({
26184
27117
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
26185
27118
  metadata: record(string(), unknown()).optional()
26186
27119
  });
26187
- DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), array(CamStreamDescriptorSchema).readonly());
27120
+ /**
27121
+ * `stream-catalog` — device-scoped, provider-implemented. The pull counterpart
27122
+ * of the removed `publishCameraStream` push: a camera provider returns the full
27123
+ * set of stream descriptors it can offer for the device, synchronously, so the
27124
+ * broker can reconcile its registry against the authoritative provider state.
27125
+ */
27126
+ /**
27127
+ * The catalog as a DURABLE fact rather than a live answer.
27128
+ *
27129
+ * A battery camera's descriptors are profile-stable — they change when the
27130
+ * operator rewrites an encoder profile, not minute to minute — but building
27131
+ * them costs a Baichuan login, which on a sleeping Argus IS a wake. So the
27132
+ * provider is allowed to build them exactly once per profile and must serve
27133
+ * every later pull from a cache.
27134
+ *
27135
+ * Holding that cache only in RAM is what turned a restart into an outage. The
27136
+ * runner comes back with the camera asleep, `buildStreamCatalogUncached`
27137
+ * correctly refuses to wake it, the pull answers `[]`, the broker has no
27138
+ * cam-stream entry to build a broker from, and `webrtcSession.handleOffer`
27139
+ * fails with a flat "No broker for stream" — for as long as the camera sleeps,
27140
+ * which on a battery cam is most of the day. The camera was fine. The stream
27141
+ * was unreachable because the process had forgotten what the camera offers.
27142
+ *
27143
+ * Declaring it here puts it in `device-runtime-state`, the kernel's canonical
27144
+ * declared collection, with the same `restored` durability `battery` uses for
27145
+ * the same reason: the last known value is the only value there is while the
27146
+ * device is asleep. The broker's brokers are therefore always DEFINABLE — it
27147
+ * is the DIAL that wakes a camera, never the catalog (D173).
27148
+ */
27149
+ var StreamCatalogStateSchema = object({
27150
+ /** The descriptors as last built from a real camera response. Never a guess:
27151
+ * a failed or refused build writes NOTHING, so a restored catalog is always
27152
+ * one the camera itself once produced. */
27153
+ descriptors: array(CamStreamDescriptorSchema),
27154
+ /** Ms epoch of the build that produced {@link descriptors}. Lets the wake
27155
+ * path decide whether the camera's own awake window is worth spending on a
27156
+ * re-read. */
27157
+ lastFetchedAt: number()
27158
+ });
27159
+ var streamCatalogCapability = {
27160
+ name: "stream-catalog",
27161
+ scope: "device",
27162
+ deviceNative: true,
27163
+ mode: "singleton",
27164
+ deviceTypes: [DeviceType.Camera],
27165
+ methods: { getCatalog: method(object({ deviceId: number().int().nonnegative() }), array(CamStreamDescriptorSchema).readonly()) },
27166
+ runtimeState: StreamCatalogStateSchema,
27167
+ /**
27168
+ * Runtime-state durability: **restored** — see the schema doc. A cold
27169
+ * catalog on a sleeping battery camera is not a slow first frame, it is a
27170
+ * camera that cannot be watched at all until it happens to wake.
27171
+ *
27172
+ * Churn is nil by construction: the slice is written only by a SUCCESSFUL
27173
+ * build, and a build only runs when there is no cached copy (or the copy is
27174
+ * a day old and the camera is awake anyway).
27175
+ *
27176
+ * See `RuntimeStateDurability`. Enforced by
27177
+ * `scripts/check-runtime-state-durability.ts`.
27178
+ */
27179
+ durability: "restored",
27180
+ /** Clock field: written, but excluded from the compare that decides whether
27181
+ * persisting is worth a SQLite commit — the descriptors are the value. */
27182
+ volatileStateFields: ["lastFetchedAt"]
27183
+ };
26188
27184
  /** One of the camera's stream profiles. */
26189
27185
  var StreamProfileSchema = _enum([
26190
27186
  "main",
@@ -26438,12 +27434,64 @@ var NetworkAddressSchema = object({
26438
27434
  family: string(),
26439
27435
  internal: boolean()
26440
27436
  });
27437
+ /**
27438
+ * Provenance of the site coordinates, and the whole reason this is not just two
27439
+ * numbers.
27440
+ *
27441
+ * - `operator-set` — a human typed it, or accepted a detection. Authoritative;
27442
+ * nothing overwrites it.
27443
+ * - `derived-from-ip` — the hub geolocated its own public IP once, because a
27444
+ * default that is right to a few kilometres beats the coarse UTC clock split
27445
+ * the sun-times consumers otherwise fall back to.
27446
+ *
27447
+ * The UI shows which one it is. An operator who cannot tell a guess from their
27448
+ * own input will eventually trust the guess.
27449
+ */
27450
+ var SiteLocationSourceSchema = _enum(["operator-set", "derived-from-ip"]);
27451
+ /**
27452
+ * The read shape: the location plus the honest state of the one-shot derivation.
27453
+ *
27454
+ * `derivationAttemptedAt` is what makes the "one call, ever" contract
27455
+ * inspectable. When it is set and `location` is null, the geo-IP lookup ran and
27456
+ * failed; the hub will NOT try again on its own — the fallback is declared
27457
+ * (consumers degrade to their own last resort) and the operator either types the
27458
+ * coordinates or presses detect.
27459
+ */
27460
+ var SiteLocationStatusSchema = object({
27461
+ location: object({
27462
+ /** WGS84 decimal degrees. */
27463
+ latitude: number().min(-90).max(90),
27464
+ longitude: number().min(-180).max(180),
27465
+ source: SiteLocationSourceSchema,
27466
+ /** Epoch ms the value was last written. */
27467
+ updatedAt: number(),
27468
+ /**
27469
+ * Human-readable place the geo-IP service reported ("Napoli, IT"). Display
27470
+ * only — never parsed, never matched on. Absent for an operator-typed value.
27471
+ */
27472
+ label: string().optional()
27473
+ }).nullable(),
27474
+ derivationAttemptedAt: number().nullable(),
27475
+ /** Why the last derivation failed, for the UI to show instead of a shrug. */
27476
+ derivationError: string().nullable()
27477
+ });
27478
+ /** `null` clears the location and re-arms nothing — the derivation stays spent. */
27479
+ var SetSiteLocationInputSchema = object({
27480
+ latitude: number().min(-90).max(90),
27481
+ longitude: number().min(-180).max(180)
27482
+ }).nullable();
26441
27483
  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(), {
26442
27484
  kind: "mutation",
26443
27485
  auth: "admin"
26444
27486
  }), method(_void(), _void(), {
26445
27487
  kind: "mutation",
26446
27488
  auth: "admin"
27489
+ }), method(_void(), SiteLocationStatusSchema), method(SetSiteLocationInputSchema, SiteLocationStatusSchema, {
27490
+ kind: "mutation",
27491
+ auth: "admin"
27492
+ }), method(_void(), SiteLocationStatusSchema, {
27493
+ kind: "mutation",
27494
+ auth: "admin"
26447
27495
  });
26448
27496
  /**
26449
27497
  * Tamper / case-open detection sensor. Drives Home Assistant
@@ -27763,6 +28811,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
27763
28811
  humiditySensor: humiditySensorCapability,
27764
28812
  image: imageCapability,
27765
28813
  imageSettings: imageSettingsCapability,
28814
+ intercom: intercomCapability,
27766
28815
  lawnMowerControl: lawnMowerControlCapability,
27767
28816
  lockControl: lockControlCapability,
27768
28817
  mediaPlayer: mediaPlayerCapability,
@@ -27781,6 +28830,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
27781
28830
  sceneMonitor: sceneMonitorCapability,
27782
28831
  scriptRunner: scriptRunnerCapability,
27783
28832
  smoke: smokeCapability,
28833
+ streamCatalog: streamCatalogCapability,
27784
28834
  streamParams: streamParamsCapability,
27785
28835
  switch: switchCapability,
27786
28836
  tamper: tamperCapability,
@@ -28434,6 +29484,15 @@ var BaseDeviceProvider = class extends BaseAddon {
28434
29484
  labels: ["probe not implemented"]
28435
29485
  };
28436
29486
  }
29487
+ /**
29488
+ * Top-level devices restored at once in {@link onRestoreDevices}.
29489
+ *
29490
+ * Four covers the fleets this ships to without turning a boot into a burst a
29491
+ * camera NVR answers with a refusal. A provider whose upstream is a single
29492
+ * session with a serial command channel (a Baichuan hub, an NVR that
29493
+ * serialises ISAPI) should lower it; nothing needs to raise it.
29494
+ */
29495
+ restoreConcurrency = 4;
28437
29496
  async restoreDevices(savedDevices) {
28438
29497
  await this.onRestoreDevices(savedDevices);
28439
29498
  if (savedDevices.length > 0) this.ctx.logger.info(`Restored ${savedDevices.length} ${this.providerName} device(s)`);
@@ -28465,15 +29524,15 @@ var BaseDeviceProvider = class extends BaseAddon {
28465
29524
  */
28466
29525
  async onRestoreDevices(savedDevices) {
28467
29526
  const restored = /* @__PURE__ */ new Set();
28468
- for (const saved of savedDevices) {
28469
- if (saved.parentDeviceId !== null) continue;
29527
+ const topLevel = savedDevices.filter((saved) => saved.parentDeviceId === null);
29528
+ const restoreOne = async (saved) => {
28470
29529
  const Class = this.deviceClasses[saved.type];
28471
29530
  if (!Class) {
28472
29531
  this.ctx.logger.warn("No device class registered for restored type — skipping", {
28473
29532
  tags: { stableId: saved.stableId },
28474
29533
  meta: { type: saved.type }
28475
29534
  });
28476
- continue;
29535
+ return;
28477
29536
  }
28478
29537
  try {
28479
29538
  await this.ctx.kernel.devices.create(saved.stableId, Class, {});
@@ -28487,7 +29546,15 @@ var BaseDeviceProvider = class extends BaseAddon {
28487
29546
  }
28488
29547
  });
28489
29548
  }
28490
- }
29549
+ };
29550
+ let nextTopLevel = 0;
29551
+ await Promise.all(Array.from({ length: Math.min(Math.max(1, this.restoreConcurrency), topLevel.length) }, async () => {
29552
+ for (;;) {
29553
+ const saved = topLevel[nextTopLevel++];
29554
+ if (saved === void 0) return;
29555
+ await restoreOne(saved);
29556
+ }
29557
+ }));
28491
29558
  const childRows = savedDevices.filter((s) => s.parentDeviceId !== null);
28492
29559
  for (const saved of childRows) {
28493
29560
  const Class = this.deviceClasses[saved.type];
@@ -30578,6 +31645,12 @@ Object.freeze({
30578
31645
  addonId: null,
30579
31646
  access: "create"
30580
31647
  },
31648
+ "llm.cancel": {
31649
+ capName: "llm",
31650
+ capScope: "system",
31651
+ addonId: null,
31652
+ access: "create"
31653
+ },
30581
31654
  "llm.deleteModel": {
30582
31655
  capName: "llm",
30583
31656
  capScope: "system",
@@ -30662,6 +31735,12 @@ Object.freeze({
30662
31735
  addonId: null,
30663
31736
  access: "view"
30664
31737
  },
31738
+ "llm.resolveModelRef": {
31739
+ capName: "llm",
31740
+ capScope: "system",
31741
+ addonId: null,
31742
+ access: "create"
31743
+ },
30665
31744
  "llm.setDefault": {
30666
31745
  capName: "llm",
30667
31746
  capScope: "system",
@@ -32828,6 +33907,12 @@ Object.freeze({
32828
33907
  addonId: null,
32829
33908
  access: "create"
32830
33909
  },
33910
+ "sceneMonitor.resetScene": {
33911
+ capName: "scene-monitor",
33912
+ capScope: "device",
33913
+ addonId: null,
33914
+ access: "delete"
33915
+ },
32831
33916
  "sceneMonitor.updateScene": {
32832
33917
  capName: "scene-monitor",
32833
33918
  capScope: "device",
@@ -33506,6 +34591,12 @@ Object.freeze({
33506
34591
  addonId: null,
33507
34592
  access: "create"
33508
34593
  },
34594
+ "system.detectSiteLocation": {
34595
+ capName: "system",
34596
+ capScope: "system",
34597
+ addonId: null,
34598
+ access: "create"
34599
+ },
33509
34600
  "system.featureFlags": {
33510
34601
  capName: "system",
33511
34602
  capScope: "system",
@@ -33524,6 +34615,12 @@ Object.freeze({
33524
34615
  addonId: null,
33525
34616
  access: "view"
33526
34617
  },
34618
+ "system.getSiteLocation": {
34619
+ capName: "system",
34620
+ capScope: "system",
34621
+ addonId: null,
34622
+ access: "view"
34623
+ },
33527
34624
  "system.health": {
33528
34625
  capName: "system",
33529
34626
  capScope: "system",
@@ -33548,6 +34645,12 @@ Object.freeze({
33548
34645
  addonId: null,
33549
34646
  access: "create"
33550
34647
  },
34648
+ "system.setSiteLocation": {
34649
+ capName: "system",
34650
+ capScope: "system",
34651
+ addonId: null,
34652
+ access: "create"
34653
+ },
33551
34654
  "terminalSession.adoptLegacyMonitor": {
33552
34655
  capName: "terminal-session",
33553
34656
  capScope: "system",
@@ -34119,6 +35222,1704 @@ Object.freeze({
34119
35222
  access: "create"
34120
35223
  }
34121
35224
  });
35225
+ Object.freeze({
35226
+ "accessories.setChildHidden": [{
35227
+ name: "childDeviceId",
35228
+ form: "single",
35229
+ optional: false
35230
+ }, {
35231
+ name: "deviceId",
35232
+ form: "single",
35233
+ optional: false
35234
+ }],
35235
+ "addonSettings.getDeviceSettings": [{
35236
+ name: "deviceId",
35237
+ form: "single",
35238
+ optional: false
35239
+ }],
35240
+ "addonSettings.updateDeviceSettings": [{
35241
+ name: "deviceId",
35242
+ form: "single",
35243
+ optional: false
35244
+ }],
35245
+ "alarmPanel.arm": [{
35246
+ name: "deviceId",
35247
+ form: "single",
35248
+ optional: false
35249
+ }],
35250
+ "alarmPanel.disarm": [{
35251
+ name: "deviceId",
35252
+ form: "single",
35253
+ optional: false
35254
+ }],
35255
+ "alarmPanel.trigger": [{
35256
+ name: "deviceId",
35257
+ form: "single",
35258
+ optional: false
35259
+ }],
35260
+ "audioAnalysis.resolveDeviceSettings": [{
35261
+ name: "deviceId",
35262
+ form: "single",
35263
+ optional: false
35264
+ }],
35265
+ "audioAnalyzer.classify": [{
35266
+ name: "deviceId",
35267
+ form: "single",
35268
+ optional: true
35269
+ }],
35270
+ "audioMetrics.getCurrentSnapshot": [{
35271
+ name: "deviceId",
35272
+ form: "single",
35273
+ optional: false
35274
+ }],
35275
+ "audioMetrics.getHistory": [{
35276
+ name: "deviceId",
35277
+ form: "single",
35278
+ optional: false
35279
+ }],
35280
+ "automationControl.disable": [{
35281
+ name: "deviceId",
35282
+ form: "single",
35283
+ optional: false
35284
+ }],
35285
+ "automationControl.enable": [{
35286
+ name: "deviceId",
35287
+ form: "single",
35288
+ optional: false
35289
+ }],
35290
+ "automationControl.trigger": [{
35291
+ name: "deviceId",
35292
+ form: "single",
35293
+ optional: false
35294
+ }],
35295
+ "battery.wakeForStream": [{
35296
+ name: "deviceId",
35297
+ form: "single",
35298
+ optional: false
35299
+ }],
35300
+ "brightness.setBrightness": [{
35301
+ name: "deviceId",
35302
+ form: "single",
35303
+ optional: false
35304
+ }],
35305
+ "button.press": [{
35306
+ name: "deviceId",
35307
+ form: "single",
35308
+ optional: false
35309
+ }],
35310
+ "cameraCredentials.getCredentials": [{
35311
+ name: "deviceId",
35312
+ form: "single",
35313
+ optional: false
35314
+ }],
35315
+ "cameraStreams.getBrokerStreams": [{
35316
+ name: "deviceId",
35317
+ form: "single",
35318
+ optional: false
35319
+ }],
35320
+ "cameraStreams.getCameraStreams": [{
35321
+ name: "deviceId",
35322
+ form: "single",
35323
+ optional: false
35324
+ }],
35325
+ "cameraStreams.getProfileRtspEntries": [{
35326
+ name: "deviceId",
35327
+ form: "single",
35328
+ optional: false
35329
+ }],
35330
+ "cameraStreams.getRtspEntries": [{
35331
+ name: "deviceId",
35332
+ form: "single",
35333
+ optional: false
35334
+ }],
35335
+ "cameraStreams.pickStream": [{
35336
+ name: "deviceId",
35337
+ form: "single",
35338
+ optional: false
35339
+ }],
35340
+ "climateControl.setFanMode": [{
35341
+ name: "deviceId",
35342
+ form: "single",
35343
+ optional: false
35344
+ }],
35345
+ "climateControl.setMode": [{
35346
+ name: "deviceId",
35347
+ form: "single",
35348
+ optional: false
35349
+ }],
35350
+ "climateControl.setPreset": [{
35351
+ name: "deviceId",
35352
+ form: "single",
35353
+ optional: false
35354
+ }],
35355
+ "climateControl.setSwingHorizontal": [{
35356
+ name: "deviceId",
35357
+ form: "single",
35358
+ optional: false
35359
+ }],
35360
+ "climateControl.setSwingVertical": [{
35361
+ name: "deviceId",
35362
+ form: "single",
35363
+ optional: false
35364
+ }],
35365
+ "climateControl.setTarget": [{
35366
+ name: "deviceId",
35367
+ form: "single",
35368
+ optional: false
35369
+ }],
35370
+ "climateControl.setTargetHumidity": [{
35371
+ name: "deviceId",
35372
+ form: "single",
35373
+ optional: false
35374
+ }],
35375
+ "climateControl.setTargetRange": [{
35376
+ name: "deviceId",
35377
+ form: "single",
35378
+ optional: false
35379
+ }],
35380
+ "color.setColor": [{
35381
+ name: "deviceId",
35382
+ form: "single",
35383
+ optional: false
35384
+ }],
35385
+ "consumables.reset": [{
35386
+ name: "deviceId",
35387
+ form: "single",
35388
+ optional: false
35389
+ }],
35390
+ "control.setValue": [{
35391
+ name: "deviceId",
35392
+ form: "single",
35393
+ optional: false
35394
+ }],
35395
+ "cover.close": [{
35396
+ name: "deviceId",
35397
+ form: "single",
35398
+ optional: false
35399
+ }],
35400
+ "cover.open": [{
35401
+ name: "deviceId",
35402
+ form: "single",
35403
+ optional: false
35404
+ }],
35405
+ "cover.setPosition": [{
35406
+ name: "deviceId",
35407
+ form: "single",
35408
+ optional: false
35409
+ }],
35410
+ "cover.setTiltPosition": [{
35411
+ name: "deviceId",
35412
+ form: "single",
35413
+ optional: false
35414
+ }],
35415
+ "cover.stop": [{
35416
+ name: "deviceId",
35417
+ form: "single",
35418
+ optional: false
35419
+ }],
35420
+ "dayNight.getOptions": [{
35421
+ name: "deviceId",
35422
+ form: "single",
35423
+ optional: false
35424
+ }],
35425
+ "dayNight.setSettings": [{
35426
+ name: "deviceId",
35427
+ form: "single",
35428
+ optional: false
35429
+ }],
35430
+ "decoder.createSession": [{
35431
+ name: "deviceId",
35432
+ form: "single",
35433
+ optional: true
35434
+ }],
35435
+ "deviceAdoption.release": [{
35436
+ name: "camDeviceId",
35437
+ form: "single",
35438
+ optional: false
35439
+ }],
35440
+ "deviceAdoption.resync": [{
35441
+ name: "camDeviceId",
35442
+ form: "single",
35443
+ optional: false
35444
+ }],
35445
+ "deviceDiscovery.adoptDevice": [{
35446
+ name: "deviceId",
35447
+ form: "single",
35448
+ optional: false
35449
+ }],
35450
+ "deviceDiscovery.listDiscovered": [{
35451
+ name: "deviceId",
35452
+ form: "single",
35453
+ optional: false
35454
+ }],
35455
+ "deviceDiscovery.refreshDiscovery": [{
35456
+ name: "deviceId",
35457
+ form: "single",
35458
+ optional: false
35459
+ }],
35460
+ "deviceDiscovery.releaseDevice": [{
35461
+ name: "childDeviceId",
35462
+ form: "single",
35463
+ optional: false
35464
+ }, {
35465
+ name: "deviceId",
35466
+ form: "single",
35467
+ optional: false
35468
+ }],
35469
+ "deviceManager.adoptionRelease": [{
35470
+ name: "camDeviceId",
35471
+ form: "single",
35472
+ optional: false
35473
+ }],
35474
+ "deviceManager.adoptionResync": [{
35475
+ name: "camDeviceId",
35476
+ form: "single",
35477
+ optional: false
35478
+ }],
35479
+ "deviceManager.applyInitialMeta": [{
35480
+ name: "deviceId",
35481
+ form: "single",
35482
+ optional: false
35483
+ }, {
35484
+ name: "linkDeviceId",
35485
+ form: "single",
35486
+ optional: true
35487
+ }],
35488
+ "deviceManager.disable": [{
35489
+ name: "deviceId",
35490
+ form: "single",
35491
+ optional: false
35492
+ }],
35493
+ "deviceManager.enable": [{
35494
+ name: "deviceId",
35495
+ form: "single",
35496
+ optional: false
35497
+ }],
35498
+ "deviceManager.getBindings": [{
35499
+ name: "deviceId",
35500
+ form: "single",
35501
+ optional: false
35502
+ }],
35503
+ "deviceManager.getChildren": [{
35504
+ name: "parentDeviceId",
35505
+ form: "single",
35506
+ optional: false
35507
+ }],
35508
+ "deviceManager.getConfigSchema": [{
35509
+ name: "deviceId",
35510
+ form: "single",
35511
+ optional: false
35512
+ }],
35513
+ "deviceManager.getDevice": [{
35514
+ name: "deviceId",
35515
+ form: "single",
35516
+ optional: false
35517
+ }],
35518
+ "deviceManager.getDeviceAggregate": [{
35519
+ name: "deviceId",
35520
+ form: "single",
35521
+ optional: false
35522
+ }],
35523
+ "deviceManager.getDeviceLiveInfoAggregate": [{
35524
+ name: "deviceId",
35525
+ form: "single",
35526
+ optional: false
35527
+ }],
35528
+ "deviceManager.getDeviceSettingsAggregate": [{
35529
+ name: "deviceId",
35530
+ form: "single",
35531
+ optional: false
35532
+ }],
35533
+ "deviceManager.getDeviceStatusAggregate": [{
35534
+ name: "deviceId",
35535
+ form: "single",
35536
+ optional: false
35537
+ }],
35538
+ "deviceManager.getDeviceStatusAggregateBatch": [{
35539
+ name: "deviceIds",
35540
+ form: "array",
35541
+ optional: false
35542
+ }],
35543
+ "deviceManager.getLinkedDevices": [{
35544
+ name: "deviceId",
35545
+ form: "single",
35546
+ optional: false
35547
+ }],
35548
+ "deviceManager.getSettingsSchema": [{
35549
+ name: "deviceId",
35550
+ form: "single",
35551
+ optional: false
35552
+ }],
35553
+ "deviceManager.getStreamProfileMap": [{
35554
+ name: "deviceId",
35555
+ form: "single",
35556
+ optional: false
35557
+ }],
35558
+ "deviceManager.getStreamSources": [{
35559
+ name: "deviceId",
35560
+ form: "single",
35561
+ optional: false
35562
+ }],
35563
+ "deviceManager.getWireableFields": [{
35564
+ name: "deviceId",
35565
+ form: "single",
35566
+ optional: false
35567
+ }],
35568
+ "deviceManager.loadConfig": [{
35569
+ name: "deviceId",
35570
+ form: "single",
35571
+ optional: false
35572
+ }],
35573
+ "deviceManager.loadMeta": [{
35574
+ name: "deviceId",
35575
+ form: "single",
35576
+ optional: false
35577
+ }],
35578
+ "deviceManager.loadRuntimeState": [{
35579
+ name: "deviceId",
35580
+ form: "single",
35581
+ optional: false
35582
+ }],
35583
+ "deviceManager.persistConfig": [{
35584
+ name: "deviceId",
35585
+ form: "single",
35586
+ optional: false
35587
+ }],
35588
+ "deviceManager.probeStreams": [{
35589
+ name: "deviceId",
35590
+ form: "single",
35591
+ optional: false
35592
+ }],
35593
+ "deviceManager.registerDevice": [{
35594
+ name: "parentDeviceId",
35595
+ form: "single",
35596
+ optional: true
35597
+ }],
35598
+ "deviceManager.remove": [{
35599
+ name: "deviceId",
35600
+ form: "single",
35601
+ optional: false
35602
+ }],
35603
+ "deviceManager.removeDevice": [{
35604
+ name: "deviceId",
35605
+ form: "single",
35606
+ optional: false
35607
+ }],
35608
+ "deviceManager.runDeviceAction": [{
35609
+ name: "deviceId",
35610
+ form: "single",
35611
+ optional: false
35612
+ }],
35613
+ "deviceManager.setChildLayout": [{
35614
+ name: "deviceId",
35615
+ form: "single",
35616
+ optional: false
35617
+ }],
35618
+ "deviceManager.setDisabled": [{
35619
+ name: "deviceId",
35620
+ form: "single",
35621
+ optional: false
35622
+ }],
35623
+ "deviceManager.setDisplay": [{
35624
+ name: "deviceId",
35625
+ form: "single",
35626
+ optional: false
35627
+ }],
35628
+ "deviceManager.setIntegrationId": [{
35629
+ name: "deviceId",
35630
+ form: "single",
35631
+ optional: false
35632
+ }],
35633
+ "deviceManager.setLinkDeviceId": [{
35634
+ name: "deviceId",
35635
+ form: "single",
35636
+ optional: false
35637
+ }, {
35638
+ name: "linkDeviceId",
35639
+ form: "single",
35640
+ optional: true
35641
+ }],
35642
+ "deviceManager.setLocation": [{
35643
+ name: "deviceId",
35644
+ form: "single",
35645
+ optional: false
35646
+ }],
35647
+ "deviceManager.setMetadata": [{
35648
+ name: "deviceId",
35649
+ form: "single",
35650
+ optional: false
35651
+ }],
35652
+ "deviceManager.setName": [{
35653
+ name: "deviceId",
35654
+ form: "single",
35655
+ optional: false
35656
+ }],
35657
+ "deviceManager.setPrimaryChildEntityId": [{
35658
+ name: "deviceId",
35659
+ form: "single",
35660
+ optional: false
35661
+ }],
35662
+ "deviceManager.setRole": [{
35663
+ name: "deviceId",
35664
+ form: "single",
35665
+ optional: false
35666
+ }],
35667
+ "deviceManager.setStreamProfileMap": [{
35668
+ name: "deviceId",
35669
+ form: "single",
35670
+ optional: false
35671
+ }],
35672
+ "deviceManager.setType": [{
35673
+ name: "deviceId",
35674
+ form: "single",
35675
+ optional: false
35676
+ }],
35677
+ "deviceManager.setWrapperActive": [{
35678
+ name: "deviceId",
35679
+ form: "single",
35680
+ optional: false
35681
+ }],
35682
+ "deviceManager.testField": [{
35683
+ name: "deviceId",
35684
+ form: "single",
35685
+ optional: false
35686
+ }],
35687
+ "deviceManager.updateConfig": [{
35688
+ name: "deviceId",
35689
+ form: "single",
35690
+ optional: false
35691
+ }],
35692
+ "deviceManager.updateDeviceField": [{
35693
+ name: "deviceId",
35694
+ form: "single",
35695
+ optional: false
35696
+ }],
35697
+ "deviceManager.updateDeviceFieldsBatch": [{
35698
+ name: "deviceId",
35699
+ form: "single",
35700
+ optional: false
35701
+ }],
35702
+ "deviceOps.getConfigEntries": [{
35703
+ name: "deviceId",
35704
+ form: "single",
35705
+ optional: false
35706
+ }],
35707
+ "deviceOps.getRawState": [{
35708
+ name: "deviceId",
35709
+ form: "single",
35710
+ optional: false
35711
+ }],
35712
+ "deviceOps.getSettingsSchema": [{
35713
+ name: "deviceId",
35714
+ form: "single",
35715
+ optional: false
35716
+ }],
35717
+ "deviceOps.getStreamSources": [{
35718
+ name: "deviceId",
35719
+ form: "single",
35720
+ optional: false
35721
+ }],
35722
+ "deviceOps.removeDevice": [{
35723
+ name: "deviceId",
35724
+ form: "single",
35725
+ optional: false
35726
+ }],
35727
+ "deviceOps.runAction": [{
35728
+ name: "deviceId",
35729
+ form: "single",
35730
+ optional: false
35731
+ }],
35732
+ "deviceOps.setConfig": [{
35733
+ name: "deviceId",
35734
+ form: "single",
35735
+ optional: false
35736
+ }],
35737
+ "deviceState.getCapSlice": [{
35738
+ name: "deviceId",
35739
+ form: "single",
35740
+ optional: false
35741
+ }],
35742
+ "deviceState.getSnapshot": [{
35743
+ name: "deviceId",
35744
+ form: "single",
35745
+ optional: false
35746
+ }],
35747
+ "deviceState.setCapSlice": [{
35748
+ name: "deviceId",
35749
+ form: "single",
35750
+ optional: false
35751
+ }],
35752
+ "events.getEventClipUrl": [{
35753
+ name: "deviceId",
35754
+ form: "single",
35755
+ optional: false
35756
+ }],
35757
+ "events.getEvents": [{
35758
+ name: "deviceId",
35759
+ form: "single",
35760
+ optional: false
35761
+ }],
35762
+ "events.getEventThumbnail": [{
35763
+ name: "deviceId",
35764
+ form: "single",
35765
+ optional: false
35766
+ }],
35767
+ "faceGallery.getFaceByTrack": [{
35768
+ name: "deviceId",
35769
+ form: "single",
35770
+ optional: false
35771
+ }],
35772
+ "faceGallery.listRecentFaces": [{
35773
+ name: "deviceId",
35774
+ form: "single",
35775
+ optional: true
35776
+ }],
35777
+ "fanControl.setDirection": [{
35778
+ name: "deviceId",
35779
+ form: "single",
35780
+ optional: false
35781
+ }],
35782
+ "fanControl.setOscillating": [{
35783
+ name: "deviceId",
35784
+ form: "single",
35785
+ optional: false
35786
+ }],
35787
+ "fanControl.setPercentage": [{
35788
+ name: "deviceId",
35789
+ form: "single",
35790
+ optional: false
35791
+ }],
35792
+ "fanControl.setPreset": [{
35793
+ name: "deviceId",
35794
+ form: "single",
35795
+ optional: false
35796
+ }],
35797
+ "humidifier.setMode": [{
35798
+ name: "deviceId",
35799
+ form: "single",
35800
+ optional: false
35801
+ }],
35802
+ "humidifier.setOn": [{
35803
+ name: "deviceId",
35804
+ form: "single",
35805
+ optional: false
35806
+ }],
35807
+ "humidifier.setTargetHumidity": [{
35808
+ name: "deviceId",
35809
+ form: "single",
35810
+ optional: false
35811
+ }],
35812
+ "imageSettings.getOptions": [{
35813
+ name: "deviceId",
35814
+ form: "single",
35815
+ optional: false
35816
+ }],
35817
+ "imageSettings.setSettings": [{
35818
+ name: "deviceId",
35819
+ form: "single",
35820
+ optional: false
35821
+ }],
35822
+ "intercom.endTalkSession": [{
35823
+ name: "deviceId",
35824
+ form: "single",
35825
+ optional: false
35826
+ }],
35827
+ "intercom.handleAnswer": [{
35828
+ name: "deviceId",
35829
+ form: "single",
35830
+ optional: false
35831
+ }],
35832
+ "intercom.pushTalkAudio": [{
35833
+ name: "deviceId",
35834
+ form: "single",
35835
+ optional: false
35836
+ }],
35837
+ "intercom.startSession": [{
35838
+ name: "deviceId",
35839
+ form: "single",
35840
+ optional: false
35841
+ }],
35842
+ "intercom.startTalkSession": [{
35843
+ name: "deviceId",
35844
+ form: "single",
35845
+ optional: false
35846
+ }],
35847
+ "intercom.stopSession": [{
35848
+ name: "deviceId",
35849
+ form: "single",
35850
+ optional: false
35851
+ }],
35852
+ "lawnMowerControl.dock": [{
35853
+ name: "deviceId",
35854
+ form: "single",
35855
+ optional: false
35856
+ }],
35857
+ "lawnMowerControl.pause": [{
35858
+ name: "deviceId",
35859
+ form: "single",
35860
+ optional: false
35861
+ }],
35862
+ "lawnMowerControl.startMowing": [{
35863
+ name: "deviceId",
35864
+ form: "single",
35865
+ optional: false
35866
+ }],
35867
+ "lockControl.lock": [{
35868
+ name: "deviceId",
35869
+ form: "single",
35870
+ optional: false
35871
+ }],
35872
+ "lockControl.open": [{
35873
+ name: "deviceId",
35874
+ form: "single",
35875
+ optional: false
35876
+ }],
35877
+ "lockControl.unlock": [{
35878
+ name: "deviceId",
35879
+ form: "single",
35880
+ optional: false
35881
+ }],
35882
+ "mediaPlayer.next": [{
35883
+ name: "deviceId",
35884
+ form: "single",
35885
+ optional: false
35886
+ }],
35887
+ "mediaPlayer.pause": [{
35888
+ name: "deviceId",
35889
+ form: "single",
35890
+ optional: false
35891
+ }],
35892
+ "mediaPlayer.play": [{
35893
+ name: "deviceId",
35894
+ form: "single",
35895
+ optional: false
35896
+ }],
35897
+ "mediaPlayer.playMedia": [{
35898
+ name: "deviceId",
35899
+ form: "single",
35900
+ optional: false
35901
+ }],
35902
+ "mediaPlayer.previous": [{
35903
+ name: "deviceId",
35904
+ form: "single",
35905
+ optional: false
35906
+ }],
35907
+ "mediaPlayer.seek": [{
35908
+ name: "deviceId",
35909
+ form: "single",
35910
+ optional: false
35911
+ }],
35912
+ "mediaPlayer.selectSource": [{
35913
+ name: "deviceId",
35914
+ form: "single",
35915
+ optional: false
35916
+ }],
35917
+ "mediaPlayer.setMute": [{
35918
+ name: "deviceId",
35919
+ form: "single",
35920
+ optional: false
35921
+ }],
35922
+ "mediaPlayer.setRepeat": [{
35923
+ name: "deviceId",
35924
+ form: "single",
35925
+ optional: false
35926
+ }],
35927
+ "mediaPlayer.setShuffle": [{
35928
+ name: "deviceId",
35929
+ form: "single",
35930
+ optional: false
35931
+ }],
35932
+ "mediaPlayer.setVolume": [{
35933
+ name: "deviceId",
35934
+ form: "single",
35935
+ optional: false
35936
+ }],
35937
+ "mediaPlayer.stop": [{
35938
+ name: "deviceId",
35939
+ form: "single",
35940
+ optional: false
35941
+ }],
35942
+ "motion.isDetected": [{
35943
+ name: "deviceId",
35944
+ form: "single",
35945
+ optional: false
35946
+ }],
35947
+ "motionDetection.analyze": [{
35948
+ name: "deviceId",
35949
+ form: "single",
35950
+ optional: false
35951
+ }],
35952
+ "motionDetection.removeCamera": [{
35953
+ name: "deviceId",
35954
+ form: "single",
35955
+ optional: false
35956
+ }],
35957
+ "motionTrigger.setMotionTrigger": [{
35958
+ name: "deviceId",
35959
+ form: "single",
35960
+ optional: false
35961
+ }],
35962
+ "motionZones.getOptions": [{
35963
+ name: "deviceId",
35964
+ form: "single",
35965
+ optional: false
35966
+ }],
35967
+ "motionZones.setZone": [{
35968
+ name: "deviceId",
35969
+ form: "single",
35970
+ optional: false
35971
+ }],
35972
+ "nativeObjectDetection.setEnabled": [{
35973
+ name: "deviceId",
35974
+ form: "single",
35975
+ optional: false
35976
+ }],
35977
+ "networkQuality.getDeviceStats": [{
35978
+ name: "deviceId",
35979
+ form: "single",
35980
+ optional: false
35981
+ }],
35982
+ "networkQuality.reportClientStats": [{
35983
+ name: "deviceId",
35984
+ form: "single",
35985
+ optional: false
35986
+ }],
35987
+ "notificationRules.setDeviceMuted": [{
35988
+ name: "deviceId",
35989
+ form: "single",
35990
+ optional: false
35991
+ }],
35992
+ "notifier.cancel": [{
35993
+ name: "deviceId",
35994
+ form: "single",
35995
+ optional: false
35996
+ }],
35997
+ "notifier.send": [{
35998
+ name: "deviceId",
35999
+ form: "single",
36000
+ optional: false
36001
+ }],
36002
+ "osd.setOverlay": [{
36003
+ name: "deviceId",
36004
+ form: "single",
36005
+ optional: false
36006
+ }],
36007
+ "osdManager.clearSlotBinding": [{
36008
+ name: "deviceId",
36009
+ form: "single",
36010
+ optional: false
36011
+ }],
36012
+ "osdManager.copyDeviceConfiguration": [{
36013
+ name: "sourceDeviceId",
36014
+ form: "single",
36015
+ optional: false
36016
+ }, {
36017
+ name: "targetDeviceId",
36018
+ form: "single",
36019
+ optional: false
36020
+ }],
36021
+ "osdManager.getDeviceOsd": [{
36022
+ name: "deviceId",
36023
+ form: "single",
36024
+ optional: false
36025
+ }],
36026
+ "osdManager.getSourceCatalog": [{
36027
+ name: "deviceId",
36028
+ form: "single",
36029
+ optional: false
36030
+ }],
36031
+ "osdManager.previewSlot": [{
36032
+ name: "deviceId",
36033
+ form: "single",
36034
+ optional: false
36035
+ }],
36036
+ "osdManager.renderDevice": [{
36037
+ name: "deviceId",
36038
+ form: "single",
36039
+ optional: false
36040
+ }],
36041
+ "osdManager.setSlotBinding": [{
36042
+ name: "deviceId",
36043
+ form: "single",
36044
+ optional: false
36045
+ }],
36046
+ "petFeeder.callPet": [{
36047
+ name: "deviceId",
36048
+ form: "single",
36049
+ optional: false
36050
+ }],
36051
+ "petFeeder.cancelFeed": [{
36052
+ name: "deviceId",
36053
+ form: "single",
36054
+ optional: false
36055
+ }],
36056
+ "petFeeder.feed": [{
36057
+ name: "deviceId",
36058
+ form: "single",
36059
+ optional: false
36060
+ }],
36061
+ "petFeeder.markFoodReplenished": [{
36062
+ name: "deviceId",
36063
+ form: "single",
36064
+ optional: false
36065
+ }],
36066
+ "petFeeder.playSound": [{
36067
+ name: "deviceId",
36068
+ form: "single",
36069
+ optional: false
36070
+ }],
36071
+ "petFeeder.resetDesiccant": [{
36072
+ name: "deviceId",
36073
+ form: "single",
36074
+ optional: false
36075
+ }],
36076
+ "petFeeder.setChildLock": [{
36077
+ name: "deviceId",
36078
+ form: "single",
36079
+ optional: false
36080
+ }],
36081
+ "petFeeder.setFeedSound": [{
36082
+ name: "deviceId",
36083
+ form: "single",
36084
+ optional: false
36085
+ }],
36086
+ "petFeeder.setIndicatorLight": [{
36087
+ name: "deviceId",
36088
+ form: "single",
36089
+ optional: false
36090
+ }],
36091
+ "petFeeder.setVolume": [{
36092
+ name: "deviceId",
36093
+ form: "single",
36094
+ optional: false
36095
+ }],
36096
+ "pipelineAnalytics.clearTracks": [{
36097
+ name: "deviceId",
36098
+ form: "single",
36099
+ optional: false
36100
+ }],
36101
+ "pipelineAnalytics.completeRetrainTrack": [{
36102
+ name: "deviceId",
36103
+ form: "single",
36104
+ optional: false
36105
+ }],
36106
+ "pipelineAnalytics.deleteDeviceEvents": [{
36107
+ name: "deviceId",
36108
+ form: "single",
36109
+ optional: false
36110
+ }],
36111
+ "pipelineAnalytics.deleteTracks": [{
36112
+ name: "deviceId",
36113
+ form: "single",
36114
+ optional: false
36115
+ }],
36116
+ "pipelineAnalytics.deselectRetrainFrame": [{
36117
+ name: "deviceId",
36118
+ form: "single",
36119
+ optional: false
36120
+ }],
36121
+ "pipelineAnalytics.getActiveTracks": [{
36122
+ name: "deviceId",
36123
+ form: "single",
36124
+ optional: false
36125
+ }],
36126
+ "pipelineAnalytics.getAudioEvents": [{
36127
+ name: "deviceId",
36128
+ form: "single",
36129
+ optional: false
36130
+ }],
36131
+ "pipelineAnalytics.getEventDensity": [{
36132
+ name: "deviceId",
36133
+ form: "single",
36134
+ optional: false
36135
+ }],
36136
+ "pipelineAnalytics.getEventMedia": [{
36137
+ name: "deviceId",
36138
+ form: "single",
36139
+ optional: false
36140
+ }],
36141
+ "pipelineAnalytics.getKeyEvents": [{
36142
+ name: "deviceId",
36143
+ form: "single",
36144
+ optional: false
36145
+ }],
36146
+ "pipelineAnalytics.getMotionEvents": [{
36147
+ name: "deviceId",
36148
+ form: "single",
36149
+ optional: false
36150
+ }],
36151
+ "pipelineAnalytics.getObjectEvents": [{
36152
+ name: "deviceId",
36153
+ form: "single",
36154
+ optional: false
36155
+ }],
36156
+ "pipelineAnalytics.getRetrainExportUrl": [{
36157
+ name: "deviceIds",
36158
+ form: "array",
36159
+ optional: true
36160
+ }],
36161
+ "pipelineAnalytics.getSensorEvents": [{
36162
+ name: "deviceId",
36163
+ form: "single",
36164
+ optional: false
36165
+ }],
36166
+ "pipelineAnalytics.getTrack": [{
36167
+ name: "deviceId",
36168
+ form: "single",
36169
+ optional: false
36170
+ }],
36171
+ "pipelineAnalytics.getTrackMedia": [{
36172
+ name: "deviceId",
36173
+ form: "single",
36174
+ optional: false
36175
+ }],
36176
+ "pipelineAnalytics.getTrainingExportSummary": [{
36177
+ name: "deviceIds",
36178
+ form: "array",
36179
+ optional: true
36180
+ }],
36181
+ "pipelineAnalytics.getTrainingExportUrl": [{
36182
+ name: "deviceIds",
36183
+ form: "array",
36184
+ optional: true
36185
+ }],
36186
+ "pipelineAnalytics.listEventKinds": [{
36187
+ name: "deviceId",
36188
+ form: "single",
36189
+ optional: false
36190
+ }],
36191
+ "pipelineAnalytics.listEventKindsBatch": [{
36192
+ name: "deviceIds",
36193
+ form: "array",
36194
+ optional: false
36195
+ }],
36196
+ "pipelineAnalytics.listOpsLog": [{
36197
+ name: "deviceId",
36198
+ form: "single",
36199
+ optional: true
36200
+ }],
36201
+ "pipelineAnalytics.listRecentTracks": [{
36202
+ name: "deviceIds",
36203
+ form: "array",
36204
+ optional: false
36205
+ }],
36206
+ "pipelineAnalytics.listRetrainStaging": [{
36207
+ name: "deviceIds",
36208
+ form: "array",
36209
+ optional: true
36210
+ }],
36211
+ "pipelineAnalytics.listTrackMedia": [{
36212
+ name: "deviceId",
36213
+ form: "single",
36214
+ optional: false
36215
+ }],
36216
+ "pipelineAnalytics.listTracks": [{
36217
+ name: "deviceId",
36218
+ form: "single",
36219
+ optional: false
36220
+ }],
36221
+ "pipelineAnalytics.proposeRetrainAnnotations": [{
36222
+ name: "deviceId",
36223
+ form: "single",
36224
+ optional: false
36225
+ }],
36226
+ "pipelineAnalytics.pruneEventsBefore": [{
36227
+ name: "deviceId",
36228
+ form: "single",
36229
+ optional: false
36230
+ }],
36231
+ "pipelineAnalytics.pruneTracksBefore": [{
36232
+ name: "deviceId",
36233
+ form: "single",
36234
+ optional: false
36235
+ }],
36236
+ "pipelineAnalytics.rebuildObjectEmbeddings": [{
36237
+ name: "deviceId",
36238
+ form: "single",
36239
+ optional: true
36240
+ }],
36241
+ "pipelineAnalytics.restageRetrainTrack": [{
36242
+ name: "deviceId",
36243
+ form: "single",
36244
+ optional: false
36245
+ }],
36246
+ "pipelineAnalytics.saveRetrainAnnotations": [{
36247
+ name: "deviceId",
36248
+ form: "single",
36249
+ optional: false
36250
+ }],
36251
+ "pipelineAnalytics.searchObjectEvents": [{
36252
+ name: "deviceId",
36253
+ form: "single",
36254
+ optional: true
36255
+ }],
36256
+ "pipelineAnalytics.selectRetrainFrames": [{
36257
+ name: "deviceId",
36258
+ form: "single",
36259
+ optional: false
36260
+ }],
36261
+ "pipelineAnalytics.setTrackFlags": [{
36262
+ name: "deviceId",
36263
+ form: "single",
36264
+ optional: false
36265
+ }],
36266
+ "pipelineAnalytics.wipeAllAnalytics": [{
36267
+ name: "deviceId",
36268
+ form: "single",
36269
+ optional: false
36270
+ }],
36271
+ "pipelineExecutor.runPipeline": [{
36272
+ name: "deviceId",
36273
+ form: "single",
36274
+ optional: true
36275
+ }],
36276
+ "pipelineExecutor.runPipelineBatch": [{
36277
+ name: "deviceId",
36278
+ form: "single",
36279
+ optional: true
36280
+ }],
36281
+ "pipelineOrchestrator.assignAudio": [{
36282
+ name: "deviceId",
36283
+ form: "single",
36284
+ optional: false
36285
+ }],
36286
+ "pipelineOrchestrator.assignPipeline": [{
36287
+ name: "deviceId",
36288
+ form: "single",
36289
+ optional: false
36290
+ }],
36291
+ "pipelineOrchestrator.getAudioAssignment": [{
36292
+ name: "deviceId",
36293
+ form: "single",
36294
+ optional: false
36295
+ }],
36296
+ "pipelineOrchestrator.getCameraMetrics": [{
36297
+ name: "deviceId",
36298
+ form: "single",
36299
+ optional: false
36300
+ }],
36301
+ "pipelineOrchestrator.getCameraSettings": [{
36302
+ name: "deviceId",
36303
+ form: "single",
36304
+ optional: false
36305
+ }],
36306
+ "pipelineOrchestrator.getCameraStatus": [{
36307
+ name: "deviceId",
36308
+ form: "single",
36309
+ optional: false
36310
+ }],
36311
+ "pipelineOrchestrator.getCameraStatuses": [{
36312
+ name: "deviceIds",
36313
+ form: "array",
36314
+ optional: true
36315
+ }],
36316
+ "pipelineOrchestrator.getCameraStepOverrides": [{
36317
+ name: "deviceId",
36318
+ form: "single",
36319
+ optional: false
36320
+ }],
36321
+ "pipelineOrchestrator.getCameraSwitches": [{
36322
+ name: "deviceId",
36323
+ form: "single",
36324
+ optional: false
36325
+ }],
36326
+ "pipelineOrchestrator.getPipelineAssignment": [{
36327
+ name: "deviceId",
36328
+ form: "single",
36329
+ optional: false
36330
+ }],
36331
+ "pipelineOrchestrator.getPipelineDevicePin": [{
36332
+ name: "deviceId",
36333
+ form: "single",
36334
+ optional: false
36335
+ }],
36336
+ "pipelineOrchestrator.resolvePipeline": [{
36337
+ name: "deviceId",
36338
+ form: "single",
36339
+ optional: false
36340
+ }],
36341
+ "pipelineOrchestrator.setCameraPipelineForAgent": [{
36342
+ name: "deviceId",
36343
+ form: "single",
36344
+ optional: false
36345
+ }],
36346
+ "pipelineOrchestrator.setCameraStepOverride": [{
36347
+ name: "deviceId",
36348
+ form: "single",
36349
+ optional: false
36350
+ }],
36351
+ "pipelineOrchestrator.setCameraStepToggle": [{
36352
+ name: "deviceId",
36353
+ form: "single",
36354
+ optional: false
36355
+ }],
36356
+ "pipelineOrchestrator.setCameraSwitch": [{
36357
+ name: "deviceId",
36358
+ form: "single",
36359
+ optional: false
36360
+ }],
36361
+ "pipelineOrchestrator.setPipelineDevicePin": [{
36362
+ name: "deviceId",
36363
+ form: "single",
36364
+ optional: false
36365
+ }],
36366
+ "pipelineOrchestrator.unassignAudio": [{
36367
+ name: "deviceId",
36368
+ form: "single",
36369
+ optional: false
36370
+ }],
36371
+ "pipelineOrchestrator.unassignPipeline": [{
36372
+ name: "deviceId",
36373
+ form: "single",
36374
+ optional: false
36375
+ }],
36376
+ "pipelineRunner.attachCamera": [{
36377
+ name: "deviceId",
36378
+ form: "single",
36379
+ optional: false
36380
+ }],
36381
+ "pipelineRunner.detachCamera": [{
36382
+ name: "deviceId",
36383
+ form: "single",
36384
+ optional: false
36385
+ }],
36386
+ "pipelineRunner.getCameraMetrics": [{
36387
+ name: "deviceId",
36388
+ form: "single",
36389
+ optional: false
36390
+ }],
36391
+ "pipelineRunner.reportMotion": [{
36392
+ name: "deviceId",
36393
+ form: "single",
36394
+ optional: false
36395
+ }],
36396
+ "pipelineRunner.runDetailSubtree": [{
36397
+ name: "deviceId",
36398
+ form: "single",
36399
+ optional: false
36400
+ }],
36401
+ "pipelineRunner.runStatelessStep": [{
36402
+ name: "sourceDeviceId",
36403
+ form: "single",
36404
+ optional: false
36405
+ }],
36406
+ "plateGallery.getPlateByTrack": [{
36407
+ name: "deviceId",
36408
+ form: "single",
36409
+ optional: false
36410
+ }],
36411
+ "plateGallery.listPlates": [{
36412
+ name: "deviceId",
36413
+ form: "single",
36414
+ optional: true
36415
+ }],
36416
+ "privacyMask.getOptions": [{
36417
+ name: "deviceId",
36418
+ form: "single",
36419
+ optional: false
36420
+ }],
36421
+ "privacyMask.setAudioEnabled": [{
36422
+ name: "deviceId",
36423
+ form: "single",
36424
+ optional: false
36425
+ }],
36426
+ "privacyMask.setMask": [{
36427
+ name: "deviceId",
36428
+ form: "single",
36429
+ optional: false
36430
+ }],
36431
+ "ptz.continuousMove": [{
36432
+ name: "deviceId",
36433
+ form: "single",
36434
+ optional: false
36435
+ }],
36436
+ "ptz.deletePreset": [{
36437
+ name: "deviceId",
36438
+ form: "single",
36439
+ optional: false
36440
+ }],
36441
+ "ptz.getOptions": [{
36442
+ name: "deviceId",
36443
+ form: "single",
36444
+ optional: false
36445
+ }],
36446
+ "ptz.getPosition": [{
36447
+ name: "deviceId",
36448
+ form: "single",
36449
+ optional: false
36450
+ }],
36451
+ "ptz.getPresets": [{
36452
+ name: "deviceId",
36453
+ form: "single",
36454
+ optional: false
36455
+ }],
36456
+ "ptz.goHome": [{
36457
+ name: "deviceId",
36458
+ form: "single",
36459
+ optional: false
36460
+ }],
36461
+ "ptz.goToPreset": [{
36462
+ name: "deviceId",
36463
+ form: "single",
36464
+ optional: false
36465
+ }],
36466
+ "ptz.move": [{
36467
+ name: "deviceId",
36468
+ form: "single",
36469
+ optional: false
36470
+ }],
36471
+ "ptz.savePreset": [{
36472
+ name: "deviceId",
36473
+ form: "single",
36474
+ optional: false
36475
+ }],
36476
+ "ptz.setAutofocus": [{
36477
+ name: "deviceId",
36478
+ form: "single",
36479
+ optional: false
36480
+ }],
36481
+ "ptz.stop": [{
36482
+ name: "deviceId",
36483
+ form: "single",
36484
+ optional: false
36485
+ }],
36486
+ "ptzAutotrack.getSettings": [{
36487
+ name: "deviceId",
36488
+ form: "single",
36489
+ optional: false
36490
+ }],
36491
+ "ptzAutotrack.getStatus": [{
36492
+ name: "deviceId",
36493
+ form: "single",
36494
+ optional: false
36495
+ }],
36496
+ "ptzAutotrack.setEnabled": [{
36497
+ name: "deviceId",
36498
+ form: "single",
36499
+ optional: false
36500
+ }],
36501
+ "ptzAutotrack.setSettings": [{
36502
+ name: "deviceId",
36503
+ form: "single",
36504
+ optional: false
36505
+ }],
36506
+ "reboot.reboot": [{
36507
+ name: "deviceId",
36508
+ form: "single",
36509
+ optional: false
36510
+ }],
36511
+ "recording.deleteFootprint": [{
36512
+ name: "deviceId",
36513
+ form: "single",
36514
+ optional: false
36515
+ }],
36516
+ "recording.getAvailability": [{
36517
+ name: "deviceId",
36518
+ form: "single",
36519
+ optional: false
36520
+ }],
36521
+ "recording.getDaysWithRecordings": [{
36522
+ name: "deviceId",
36523
+ form: "single",
36524
+ optional: false
36525
+ }],
36526
+ "recording.getDeviceConfig": [{
36527
+ name: "deviceId",
36528
+ form: "single",
36529
+ optional: false
36530
+ }],
36531
+ "recording.getPlaybackManifest": [{
36532
+ name: "deviceId",
36533
+ form: "single",
36534
+ optional: false
36535
+ }],
36536
+ "recording.listOpsLog": [{
36537
+ name: "deviceId",
36538
+ form: "single",
36539
+ optional: true
36540
+ }],
36541
+ "recording.locateSegment": [{
36542
+ name: "deviceId",
36543
+ form: "single",
36544
+ optional: false
36545
+ }],
36546
+ "recording.pruneFootage": [{
36547
+ name: "deviceId",
36548
+ form: "single",
36549
+ optional: false
36550
+ }],
36551
+ "recording.readGopBytes": [{
36552
+ name: "deviceId",
36553
+ form: "single",
36554
+ optional: false
36555
+ }],
36556
+ "recording.readSegmentBytes": [{
36557
+ name: "deviceId",
36558
+ form: "single",
36559
+ optional: false
36560
+ }],
36561
+ "recording.relocateFootage": [{
36562
+ name: "deviceId",
36563
+ form: "single",
36564
+ optional: true
36565
+ }],
36566
+ "recording.renderClip": [{
36567
+ name: "deviceId",
36568
+ form: "single",
36569
+ optional: false
36570
+ }],
36571
+ "recording.renderGif": [{
36572
+ name: "deviceId",
36573
+ form: "single",
36574
+ optional: false
36575
+ }],
36576
+ "recording.rescanStorage": [{
36577
+ name: "deviceId",
36578
+ form: "single",
36579
+ optional: false
36580
+ }],
36581
+ "recording.setDeviceConfig": [{
36582
+ name: "deviceId",
36583
+ form: "single",
36584
+ optional: false
36585
+ }],
36586
+ "recording.startStorageMigrationMove": [{
36587
+ name: "deviceId",
36588
+ form: "single",
36589
+ optional: true
36590
+ }],
36591
+ "recordingExport.createExport": [{
36592
+ name: "deviceId",
36593
+ form: "single",
36594
+ optional: false
36595
+ }],
36596
+ "recordingExport.listExports": [{
36597
+ name: "deviceId",
36598
+ form: "single",
36599
+ optional: true
36600
+ }],
36601
+ "sceneMonitor.captureReference": [{
36602
+ name: "deviceId",
36603
+ form: "single",
36604
+ optional: false
36605
+ }],
36606
+ "sceneMonitor.createScene": [{
36607
+ name: "deviceId",
36608
+ form: "single",
36609
+ optional: false
36610
+ }],
36611
+ "sceneMonitor.deleteReference": [{
36612
+ name: "deviceId",
36613
+ form: "single",
36614
+ optional: false
36615
+ }],
36616
+ "sceneMonitor.deleteScene": [{
36617
+ name: "deviceId",
36618
+ form: "single",
36619
+ optional: false
36620
+ }],
36621
+ "sceneMonitor.listScenes": [{
36622
+ name: "deviceId",
36623
+ form: "single",
36624
+ optional: false
36625
+ }],
36626
+ "sceneMonitor.recheckNow": [{
36627
+ name: "deviceId",
36628
+ form: "single",
36629
+ optional: false
36630
+ }],
36631
+ "sceneMonitor.resetScene": [{
36632
+ name: "deviceId",
36633
+ form: "single",
36634
+ optional: false
36635
+ }],
36636
+ "sceneMonitor.updateScene": [{
36637
+ name: "deviceId",
36638
+ form: "single",
36639
+ optional: false
36640
+ }],
36641
+ "scriptRunner.run": [{
36642
+ name: "deviceId",
36643
+ form: "single",
36644
+ optional: false
36645
+ }],
36646
+ "scriptRunner.stop": [{
36647
+ name: "deviceId",
36648
+ form: "single",
36649
+ optional: false
36650
+ }],
36651
+ "snapshot.getSnapshot": [{
36652
+ name: "deviceId",
36653
+ form: "single",
36654
+ optional: false
36655
+ }],
36656
+ "snapshot.getSnapshotLinks": [{
36657
+ name: "targets",
36658
+ form: "object-array",
36659
+ optional: false,
36660
+ itemField: "deviceId"
36661
+ }],
36662
+ "snapshot.getSnapshotOverview": [{
36663
+ name: "deviceIds",
36664
+ form: "array",
36665
+ optional: false
36666
+ }],
36667
+ "snapshot.invalidateCache": [{
36668
+ name: "deviceId",
36669
+ form: "single",
36670
+ optional: false
36671
+ }],
36672
+ "streamBroker.acquireEgressTranscode": [{
36673
+ name: "deviceId",
36674
+ form: "single",
36675
+ optional: false
36676
+ }],
36677
+ "streamBroker.assignProfile": [{
36678
+ name: "deviceId",
36679
+ form: "single",
36680
+ optional: false
36681
+ }],
36682
+ "streamBroker.getDeviceAudioMute": [{
36683
+ name: "deviceId",
36684
+ form: "single",
36685
+ optional: false
36686
+ }],
36687
+ "streamBroker.getStreamWithCodec": [{
36688
+ name: "deviceId",
36689
+ form: "single",
36690
+ optional: false
36691
+ }],
36692
+ "streamBroker.produceEventMedia": [{
36693
+ name: "deviceId",
36694
+ form: "single",
36695
+ optional: false
36696
+ }],
36697
+ "streamBroker.publishCameraStream": [{
36698
+ name: "deviceId",
36699
+ form: "single",
36700
+ optional: false
36701
+ }],
36702
+ "streamBroker.renderPreBufferClip": [{
36703
+ name: "deviceId",
36704
+ form: "single",
36705
+ optional: false
36706
+ }],
36707
+ "streamBroker.restartProfile": [{
36708
+ name: "deviceId",
36709
+ form: "single",
36710
+ optional: false
36711
+ }],
36712
+ "streamBroker.retractCameraStream": [{
36713
+ name: "deviceId",
36714
+ form: "single",
36715
+ optional: false
36716
+ }],
36717
+ "streamBroker.setDeviceAudioMute": [{
36718
+ name: "deviceId",
36719
+ form: "single",
36720
+ optional: false
36721
+ }],
36722
+ "streamBroker.unassignProfile": [{
36723
+ name: "deviceId",
36724
+ form: "single",
36725
+ optional: false
36726
+ }],
36727
+ "streamCatalog.getCatalog": [{
36728
+ name: "deviceId",
36729
+ form: "single",
36730
+ optional: false
36731
+ }],
36732
+ "streamParams.getConfigSchema": [{
36733
+ name: "deviceId",
36734
+ form: "single",
36735
+ optional: false
36736
+ }],
36737
+ "streamParams.getOptions": [{
36738
+ name: "deviceId",
36739
+ form: "single",
36740
+ optional: false
36741
+ }],
36742
+ "streamParams.setProfile": [{
36743
+ name: "deviceId",
36744
+ form: "single",
36745
+ optional: false
36746
+ }],
36747
+ "switch.setState": [{
36748
+ name: "deviceId",
36749
+ form: "single",
36750
+ optional: false
36751
+ }],
36752
+ "vacuumControl.locate": [{
36753
+ name: "deviceId",
36754
+ form: "single",
36755
+ optional: false
36756
+ }],
36757
+ "vacuumControl.pause": [{
36758
+ name: "deviceId",
36759
+ form: "single",
36760
+ optional: false
36761
+ }],
36762
+ "vacuumControl.returnToBase": [{
36763
+ name: "deviceId",
36764
+ form: "single",
36765
+ optional: false
36766
+ }],
36767
+ "vacuumControl.setFanSpeed": [{
36768
+ name: "deviceId",
36769
+ form: "single",
36770
+ optional: false
36771
+ }],
36772
+ "vacuumControl.start": [{
36773
+ name: "deviceId",
36774
+ form: "single",
36775
+ optional: false
36776
+ }],
36777
+ "vacuumControl.stop": [{
36778
+ name: "deviceId",
36779
+ form: "single",
36780
+ optional: false
36781
+ }],
36782
+ "valve.close": [{
36783
+ name: "deviceId",
36784
+ form: "single",
36785
+ optional: false
36786
+ }],
36787
+ "valve.open": [{
36788
+ name: "deviceId",
36789
+ form: "single",
36790
+ optional: false
36791
+ }],
36792
+ "valve.setPosition": [{
36793
+ name: "deviceId",
36794
+ form: "single",
36795
+ optional: false
36796
+ }],
36797
+ "valve.stop": [{
36798
+ name: "deviceId",
36799
+ form: "single",
36800
+ optional: false
36801
+ }],
36802
+ "videoclips.getClipPlayback": [{
36803
+ name: "deviceId",
36804
+ form: "single",
36805
+ optional: false
36806
+ }],
36807
+ "videoclips.listClips": [{
36808
+ name: "deviceId",
36809
+ form: "single",
36810
+ optional: false
36811
+ }],
36812
+ "waterHeater.setAway": [{
36813
+ name: "deviceId",
36814
+ form: "single",
36815
+ optional: false
36816
+ }],
36817
+ "waterHeater.setOperationMode": [{
36818
+ name: "deviceId",
36819
+ form: "single",
36820
+ optional: false
36821
+ }],
36822
+ "waterHeater.setTargetTemp": [{
36823
+ name: "deviceId",
36824
+ form: "single",
36825
+ optional: false
36826
+ }],
36827
+ "webrtcSession.addIceCandidate": [{
36828
+ name: "deviceId",
36829
+ form: "single",
36830
+ optional: false
36831
+ }],
36832
+ "webrtcSession.closeSession": [{
36833
+ name: "deviceId",
36834
+ form: "single",
36835
+ optional: false
36836
+ }],
36837
+ "webrtcSession.createSession": [{
36838
+ name: "deviceId",
36839
+ form: "single",
36840
+ optional: false
36841
+ }],
36842
+ "webrtcSession.getIceCandidates": [{
36843
+ name: "deviceId",
36844
+ form: "single",
36845
+ optional: false
36846
+ }],
36847
+ "webrtcSession.getSessionState": [{
36848
+ name: "deviceId",
36849
+ form: "single",
36850
+ optional: false
36851
+ }],
36852
+ "webrtcSession.handleAnswer": [{
36853
+ name: "deviceId",
36854
+ form: "single",
36855
+ optional: false
36856
+ }],
36857
+ "webrtcSession.handleOffer": [{
36858
+ name: "deviceId",
36859
+ form: "single",
36860
+ optional: false
36861
+ }],
36862
+ "webrtcSession.hasAdaptiveBitrate": [{
36863
+ name: "deviceId",
36864
+ form: "single",
36865
+ optional: false
36866
+ }],
36867
+ "webrtcSession.listStreams": [{
36868
+ name: "deviceId",
36869
+ form: "single",
36870
+ optional: false
36871
+ }],
36872
+ "zoneAnalytics.getCameraHistory": [{
36873
+ name: "deviceId",
36874
+ form: "single",
36875
+ optional: false
36876
+ }],
36877
+ "zoneAnalytics.getCurrentSnapshot": [{
36878
+ name: "deviceId",
36879
+ form: "single",
36880
+ optional: false
36881
+ }],
36882
+ "zoneAnalytics.getUnzonedHistory": [{
36883
+ name: "deviceId",
36884
+ form: "single",
36885
+ optional: false
36886
+ }],
36887
+ "zoneAnalytics.getZoneHistory": [{
36888
+ name: "deviceId",
36889
+ form: "single",
36890
+ optional: false
36891
+ }],
36892
+ "zoneRules.listRules": [{
36893
+ name: "deviceId",
36894
+ form: "single",
36895
+ optional: false
36896
+ }],
36897
+ "zoneRules.setRules": [{
36898
+ name: "deviceId",
36899
+ form: "single",
36900
+ optional: false
36901
+ }],
36902
+ "zones.addZone": [{
36903
+ name: "deviceId",
36904
+ form: "single",
36905
+ optional: false
36906
+ }],
36907
+ "zones.listZones": [{
36908
+ name: "deviceId",
36909
+ form: "single",
36910
+ optional: false
36911
+ }],
36912
+ "zones.removeZone": [{
36913
+ name: "deviceId",
36914
+ form: "single",
36915
+ optional: false
36916
+ }],
36917
+ "zones.updateZone": [{
36918
+ name: "deviceId",
36919
+ form: "single",
36920
+ optional: false
36921
+ }]
36922
+ });
34122
36923
  Object.freeze({
34123
36924
  "broker": "broker",
34124
36925
  "device-export": "device-export",