@camstack/addon-provider-onvif 1.2.15 → 1.2.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/addon.js +2751 -96
  2. package/dist/addon.mjs +2751 -96
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  //#region \0rolldown/runtime.js
3
3
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
4
4
  //#endregion
5
- //#region ../types/dist/event-category-Cv9dO26A.mjs
5
+ //#region ../types/dist/event-category-Bxo5yJjt.mjs
6
6
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
7
7
  EventCategory["SystemBoot"] = "system.boot";
8
8
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -209,6 +209,33 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
209
209
  EventCategory["PipelineCameraAssigned"] = "pipeline.camera-assigned";
210
210
  EventCategory["PipelineCameraUnassigned"] = "pipeline.camera-unassigned";
211
211
  /**
212
+ * A node the orchestrator would otherwise place cameras on has NO usable
213
+ * inference device: the operator enabled one or more accelerators there and
214
+ * the live probe reports every one of them unavailable. Emitted once per
215
+ * TRANSITION into that state (never per dispatch), and the node is dropped
216
+ * from the placement candidate set for as long as it holds.
217
+ *
218
+ * This exists because the state was previously invisible: little-unraid
219
+ * absorbed 283k inference errors in a day while still being handed cameras,
220
+ * and nothing in the system said so.
221
+ *
222
+ * A node with no accelerators configured at all is NOT this — its devices
223
+ * are `disabled`, not `unavailable`, and the runner's default CPU pool
224
+ * serves it exactly as before.
225
+ */
226
+ EventCategory["PipelineNodeInferenceUnavailable"] = "pipeline.node-inference-unavailable";
227
+ /**
228
+ * A camera has an OPEN detection session and has produced no detection at
229
+ * all for longer than the blind threshold — the camera is being decoded and
230
+ * inferred and is returning nothing. Emitted once per transition into blind,
231
+ * per camera.
232
+ *
233
+ * The failure it reports: a 1h43 detection blackout on the entrance camera
234
+ * that nobody noticed, because "a camera that detects nothing" and "a quiet
235
+ * camera" produce byte-identical silence.
236
+ */
237
+ EventCategory["PipelineDetectionBlind"] = "pipeline.detection-blind";
238
+ /**
212
239
  * Per-camera pipeline config was mutated by the orchestrator
213
240
  * (3-level settings change via `setAgentAddonDefaults` /
214
241
  * `setCameraStepToggle` / `setCameraPipelineForAgent` or a
@@ -3000,6 +3027,9 @@ function handlePipeResult(left, next, ctx) {
3000
3027
  fallback: left.fallback
3001
3028
  }, ctx);
3002
3029
  }
3030
+ var $ZodPreprocess = /*@__PURE__*/ $constructor("$ZodPreprocess", (inst, def) => {
3031
+ $ZodPipe.init(inst, def);
3032
+ });
3003
3033
  var $ZodReadonly = /*@__PURE__*/ $constructor("$ZodReadonly", (inst, def) => {
3004
3034
  $ZodType.init(inst, def);
3005
3035
  defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
@@ -5185,6 +5215,10 @@ function pipe(in_, out) {
5185
5215
  out
5186
5216
  });
5187
5217
  }
5218
+ var ZodPreprocess = /*@__PURE__*/ $constructor("ZodPreprocess", (inst, def) => {
5219
+ ZodPipe.init(inst, def);
5220
+ $ZodPreprocess.init(inst, def);
5221
+ });
5188
5222
  var ZodReadonly = /*@__PURE__*/ $constructor("ZodReadonly", (inst, def) => {
5189
5223
  $ZodReadonly.init(inst, def);
5190
5224
  ZodType.init(inst, def);
@@ -5243,6 +5277,13 @@ function _instanceof(cls, params = {}) {
5243
5277
  };
5244
5278
  return inst;
5245
5279
  }
5280
+ function preprocess(fn, schema) {
5281
+ return new ZodPreprocess({
5282
+ type: "pipe",
5283
+ in: transform(fn),
5284
+ out: schema
5285
+ });
5286
+ }
5246
5287
  //#endregion
5247
5288
  //#region ../../node_modules/zod/v4/classic/compat.js
5248
5289
  /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
@@ -10773,6 +10814,8 @@ var QueryFilterSchema = object({
10773
10814
  where: record(string(), unknown()).optional(),
10774
10815
  whereIn: record(string(), array(unknown())).optional(),
10775
10816
  whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
10817
+ /** NULL-safe exclusion: matches rows whose field is NULL OR != the value. */
10818
+ whereNot: record(string(), unknown()).optional(),
10776
10819
  orderBy: object({
10777
10820
  field: string(),
10778
10821
  direction: _enum(["asc", "desc"])
@@ -10792,7 +10835,8 @@ var QueryFilterSchema = object({
10792
10835
  var MutationFilterSchema = object({
10793
10836
  where: record(string(), unknown()).optional(),
10794
10837
  whereIn: record(string(), array(unknown())).optional(),
10795
- whereBetween: record(string(), tuple([unknown(), unknown()])).optional()
10838
+ whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
10839
+ whereNot: record(string(), unknown()).optional()
10796
10840
  });
10797
10841
  /** A single stored record: `{ id, data }`. */
10798
10842
  var SettingsRecordSchema = object({
@@ -12204,6 +12248,17 @@ var LlmImageSchema = object({
12204
12248
  bytes: _instanceof(Uint8Array),
12205
12249
  mimeType: string()
12206
12250
  });
12251
+ /**
12252
+ * Retry policy. `enabled: false` is NOT the same as `maxAttempts: 1` in intent —
12253
+ * the flag is what a consumer table flips, the count is what the operator tunes.
12254
+ * A retry doubles the wall time of a call, so the two gates that run inside a
12255
+ * notification's budget keep it off (see `CONSUMER_RETRY_POLICY` in addon-ai).
12256
+ */
12257
+ var LlmRetryPolicySchema = object({
12258
+ enabled: boolean().default(false),
12259
+ /** Total attempts INCLUDING the first. 1 = no retry. */
12260
+ maxAttempts: number().int().min(1).max(5).default(1)
12261
+ });
12207
12262
  var LlmGenerateBaseInputSchema = object({
12208
12263
  /** Collection routing (the notification-output posture). */
12209
12264
  addonId: string().optional(),
@@ -12218,7 +12273,28 @@ var LlmGenerateBaseInputSchema = object({
12218
12273
  jsonSchema: record(string(), unknown()).optional(),
12219
12274
  /** Per-call override of the profile default. */
12220
12275
  maxTokens: number().int().positive().optional(),
12221
- temperature: number().optional()
12276
+ temperature: number().optional(),
12277
+ /** Per-call override of the profile default (nucleus sampling). */
12278
+ topP: number().min(0).max(1).optional(),
12279
+ /** Per-call override of the profile default (top-k sampling). */
12280
+ topK: number().int().positive().optional(),
12281
+ /** Per-call override of `profile.timeoutMs` — the total generation bound. */
12282
+ timeoutMs: number().int().positive().optional(),
12283
+ /** Per-call override; beats both the consumer table and the profile. */
12284
+ retry: LlmRetryPolicySchema.optional(),
12285
+ /**
12286
+ * Caller-minted id that makes this generation CANCELLABLE.
12287
+ *
12288
+ * Without it a caller that stops waiting cannot stop the work: the gates race
12289
+ * the call against 8 s and free their own slot when the timer wins, while the
12290
+ * generation upstream keeps running to `profile.timeoutMs` — 60 s by default,
12291
+ * on a single-threaded local model. The per-camera bound then counts WAITS,
12292
+ * not generations, and the real load is unbounded.
12293
+ *
12294
+ * `AbortSignal` cannot cross a process boundary; an id can. Pass one here and
12295
+ * `llm.cancel({ requestId })` tears the socket down.
12296
+ */
12297
+ requestId: string().optional()
12222
12298
  });
12223
12299
  /**
12224
12300
  * `llm-runtime` — node-side managed llama.cpp executor (spec §4). Registered
@@ -12231,6 +12307,18 @@ var LlmGenerateBaseInputSchema = object({
12231
12307
  * Resource ceiling = llama-server flags + idleStopMinutes ONLY (no RSS
12232
12308
  * watchdog — operator decision #3).
12233
12309
  */
12310
+ /**
12311
+ * A companion artifact that MUST land beside the main GGUF: the `mmproj`
12312
+ * projector of a vision model, or shards 2..N of a split GGUF. Carried on the
12313
+ * REF rather than looked up at install time, so what the operator approved in
12314
+ * the preview is exactly what the node downloads.
12315
+ */
12316
+ var ManagedModelExtraFileSchema = object({
12317
+ url: string(),
12318
+ filename: string(),
12319
+ sizeBytes: number(),
12320
+ sha256: string().optional()
12321
+ });
12234
12322
  var ManagedModelRefSchema = discriminatedUnion("kind", [
12235
12323
  object({
12236
12324
  kind: literal("catalog"),
@@ -12239,7 +12327,11 @@ var ManagedModelRefSchema = discriminatedUnion("kind", [
12239
12327
  object({
12240
12328
  kind: literal("url"),
12241
12329
  url: string(),
12242
- sha256: string().optional()
12330
+ sha256: string().optional(),
12331
+ /** Picker/status label; the file basename when absent. */
12332
+ label: string().optional(),
12333
+ sizeBytes: number().optional(),
12334
+ extraFiles: array(ManagedModelExtraFileSchema).optional()
12243
12335
  }),
12244
12336
  object({
12245
12337
  kind: literal("path"),
@@ -12257,13 +12349,82 @@ var ManagedRuntimeConfigSchema = object({
12257
12349
  gpuLayers: number().int().default(0),
12258
12350
  /** Default: cpus-2, clamped ≥1 (resolved node-side). */
12259
12351
  threads: number().int().optional(),
12260
- /** Concurrent slots. */
12352
+ /** Concurrent slots (`--parallel`). */
12261
12353
  parallel: number().int().default(1),
12354
+ /** Logical batch size (`-b`). Larger = faster prompt ingest, more RAM. */
12355
+ batchSize: number().int().positive().optional(),
12356
+ /** Physical batch / micro-batch (`-ub`). */
12357
+ ubatchSize: number().int().positive().optional(),
12358
+ /**
12359
+ * `--flash-attn`. Cuts KV-cache memory on the backends that implement it and
12360
+ * is a no-op elsewhere, so it is offered rather than assumed.
12361
+ */
12362
+ flashAttention: boolean().default(false),
12363
+ /**
12364
+ * `--mlock`. Pins the weights in RAM so the OS cannot page them out mid
12365
+ * inference. Costs the full model size in resident memory — which is exactly
12366
+ * what the RAM budget is counting.
12367
+ */
12368
+ mlock: boolean().default(false),
12369
+ /**
12370
+ * `--no-mmap`. Reads the whole GGUF up front instead of mapping it. Slower to
12371
+ * start, but avoids the page-fault stalls a network or spinning-disk model
12372
+ * store produces on every first token.
12373
+ */
12374
+ noMmap: boolean().default(false),
12375
+ /** `--cache-type-k` / `--cache-type-v` — quantising the KV cache is the
12376
+ * cheapest way to fit a longer context in the same RAM. */
12377
+ cacheTypeK: _enum([
12378
+ "f32",
12379
+ "f16",
12380
+ "q8_0",
12381
+ "q5_1",
12382
+ "q5_0",
12383
+ "q4_1",
12384
+ "q4_0"
12385
+ ]).optional(),
12386
+ cacheTypeV: _enum([
12387
+ "f32",
12388
+ "f16",
12389
+ "q8_0",
12390
+ "q5_1",
12391
+ "q5_0",
12392
+ "q4_1",
12393
+ "q4_0"
12394
+ ]).optional(),
12395
+ /**
12396
+ * Escape hatch for llama-server flags this schema does NOT model — `--jinja`
12397
+ * (which most vision chat templates need and some language-only models
12398
+ * dislike), `--cont-batching`, `--rope-scaling`, …
12399
+ *
12400
+ * It is NOT a second place to set the flags above. A token that collides
12401
+ * with a typed field is REJECTED at start, naming the field that owns it
12402
+ * (`assertNoOwnedFlags`), because two knobs writing the same argv is exactly
12403
+ * the "two switches that disagree" failure this repo has already shipped
12404
+ * twice (D62).
12405
+ */
12406
+ extraArgs: array(string()).default([]),
12262
12407
  /** Else lazy: first generate boots it. */
12263
12408
  autoStart: boolean().default(false),
12264
12409
  /** 0 = never; frees RAM after quiet periods. */
12265
12410
  idleStopMinutes: number().int().default(30)
12266
12411
  });
12412
+ /**
12413
+ * Where a multi-GB install currently is. A single 0..1 fraction cannot answer
12414
+ * "is it stuck?" for an install that is three files (shards + mmproj) followed
12415
+ * by a sha256 pass over 22 GB — during which the fraction sat at 1.0 and the
12416
+ * node looked hung. Phase + file + bytes is the smallest shape that does.
12417
+ */
12418
+ var LlmDownloadProgressSchema = object({
12419
+ phase: _enum(["downloading", "verifying"]),
12420
+ /** The artifact currently moving, e.g. `mmproj-F16.gguf`. */
12421
+ file: string(),
12422
+ fileIndex: number().int(),
12423
+ fileCount: number().int(),
12424
+ /** Across the WHOLE install, not the current file. */
12425
+ downloadedBytes: number(),
12426
+ totalBytes: number().optional()
12427
+ });
12267
12428
  var LlmRuntimeStatusSchema = object({
12268
12429
  /** Status is ALWAYS node-qualified. */
12269
12430
  nodeId: string(),
@@ -12280,6 +12441,8 @@ var LlmRuntimeStatusSchema = object({
12280
12441
  modelPath: string().optional(),
12281
12442
  modelId: string().optional(),
12282
12443
  downloadProgress: number().min(0).max(1).optional(),
12444
+ /** Detail behind `downloadProgress`; present for the same lifetime. */
12445
+ download: LlmDownloadProgressSchema.optional(),
12283
12446
  lastError: string().optional(),
12284
12447
  crashesInWindow: number(),
12285
12448
  /** Child RSS (sampled best-effort). */
@@ -12290,7 +12453,14 @@ var LlmNodeModelSchema = object({
12290
12453
  file: string(),
12291
12454
  sizeBytes: number(),
12292
12455
  catalogId: string().optional(),
12293
- installedAt: number().optional()
12456
+ installedAt: number().optional(),
12457
+ /**
12458
+ * Absolute path on the node. Present so a file that is on disk but matches
12459
+ * no catalog entry — a custom Hugging Face install, or a GGUF the operator
12460
+ * copied in by hand — is still SELECTABLE, as a `{kind:'path'}` ref. Without
12461
+ * it the picker could list such a file and do nothing with it.
12462
+ */
12463
+ path: string().optional()
12294
12464
  });
12295
12465
  var LlmRuntimeDiskUsageSchema = object({
12296
12466
  nodeId: string(),
@@ -12346,10 +12516,47 @@ var LlmProfileSchema = object({
12346
12516
  baseUrl: string().optional(),
12347
12517
  /** ConfigUISchema type:'password' — never round-trips (spec §5). */
12348
12518
  apiKey: string().optional(),
12519
+ /** Vision on/off. A vision call against a `false` profile is REFUSED, never
12520
+ * degraded to text — that shipped once and produced a confident answer to a
12521
+ * question about a picture nobody sent. */
12349
12522
  supportsVision: boolean(),
12350
12523
  temperature: number().min(0).max(2).optional(),
12524
+ /** Nucleus sampling. Every wire we speak has it. */
12525
+ topP: number().min(0).max(1).optional(),
12526
+ /** Top-k sampling. Carried only by the wires that have it — NEITHER OpenAI
12527
+ * wire does, and the client drops it there (measured: the request body gets
12528
+ * `top_p` and no `top_k`). The profile editor hides the field wherever it
12529
+ * would change nothing; `KINDS_WITH_TOP_K` is the single owner of that list. */
12530
+ topK: number().int().positive().optional(),
12351
12531
  maxTokens: number().int().positive().optional(),
12532
+ /** Prompt context window. Advisory for cloud kinds (they enforce their own);
12533
+ * for `managed-local` it is the llama.cpp `--ctx-size` the runtime starts
12534
+ * the model with, so it is the one field that changes a PROCESS. */
12535
+ contextLength: number().int().positive().optional(),
12536
+ /** Default system prompt. A caller's `system` REPLACES it (never appends —
12537
+ * two system prompts fighting is worse than either alone). */
12538
+ systemPrompt: string().optional(),
12539
+ /** Total generation bound — the only one a unary call has. */
12352
12540
  timeoutMs: number().int().positive().default(6e4),
12541
+ /** The TCP handshake only — "is the port even open". NOT the wait for
12542
+ * response headers: on the LM Studio / llama-server wire those are written
12543
+ * once the model has finished loading, so they belong to the bound below. */
12544
+ connectTimeoutMs: number().int().positive().default(1e4),
12545
+ /** Accepted, but no output yet — response headers included, because a cold
12546
+ * GPU load is exactly what happens before them. */
12547
+ firstTokenTimeoutMs: number().int().positive().default(12e4),
12548
+ /** Output started then stopped. */
12549
+ idleTimeoutMs: number().int().positive().default(6e4),
12550
+ /** Profile-level default. The per-consumer table and a per-call override
12551
+ * both beat it — see `resolveRetryPolicy`. */
12552
+ retry: LlmRetryPolicySchema.default({
12553
+ enabled: false,
12554
+ maxAttempts: 1
12555
+ }),
12556
+ /** Whether this profile may use tools. The tool-call plumbing rides the
12557
+ * library; the REGISTRY of callable tools is ours and is empty in v1, so a
12558
+ * `true` here buys the wiring, not behaviour, until tools are registered. */
12559
+ toolsEnabled: boolean().default(false),
12353
12560
  extraHeaders: record(string(), string()).optional(),
12354
12561
  /** kind === 'managed-local' only (spec §4). */
12355
12562
  runtime: ManagedRuntimeConfigSchema.optional()
@@ -12399,6 +12606,36 @@ var ManagedModelCatalogEntrySchema = object({
12399
12606
  /** Vision models: companion projector file. */
12400
12607
  mmprojUrl: string().optional()
12401
12608
  });
12609
+ /**
12610
+ * The outcome of turning one operator-typed Hugging Face reference into a
12611
+ * download plan. A RESULT, never a throw: "this repo has 24 quantizations and
12612
+ * I will not pick for you" is a normal answer the UI has to render, not an
12613
+ * exception.
12614
+ *
12615
+ * `candidates` is the whole reason the refusal is usable — every string in it
12616
+ * is a tag that resolves when pasted back as `<org>/<repo>:<TAG>`.
12617
+ */
12618
+ var HfModelResolutionSchema = discriminatedUnion("ok", [object({
12619
+ ok: literal(true),
12620
+ /** Ready to hand to `installModel` unchanged. */
12621
+ model: ManagedModelRefSchema,
12622
+ label: string(),
12623
+ repo: string(),
12624
+ quantization: string(),
12625
+ purpose: _enum(["text", "vision"]),
12626
+ totalBytes: number(),
12627
+ /** mmproj + shards, for the preview: an operator approving 23 GB should
12628
+ * see that 0.9 GB of it is a projector they did not name. */
12629
+ extraFilenames: array(string())
12630
+ }), object({
12631
+ ok: literal(false),
12632
+ code: string(),
12633
+ message: string(),
12634
+ candidates: array(string()).optional(),
12635
+ /** Set when the refusal was only the ceiling: re-calling with
12636
+ * `maxBytes: requiredBytes` is the operator's explicit override. */
12637
+ requiredBytes: number().optional()
12638
+ })]);
12402
12639
  var LlmRuntimeNodeSchema = object({
12403
12640
  nodeId: string(),
12404
12641
  reachable: boolean(),
@@ -12411,7 +12648,10 @@ var ProfileRefInputSchema = object({
12411
12648
  addonId: string(),
12412
12649
  profileId: string()
12413
12650
  });
12414
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
12651
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
12652
+ addonId: string().optional(),
12653
+ requestId: string()
12654
+ }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
12415
12655
  kind: "mutation",
12416
12656
  auth: "admin"
12417
12657
  }), method(ProfileRefInputSchema, _void(), {
@@ -12432,6 +12672,15 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
12432
12672
  consumer: string().optional(),
12433
12673
  profileId: string().optional()
12434
12674
  }), array(LlmUsageRollupSchema)), method(object({}), array(ManagedModelCatalogEntrySchema)), method(object({}), array(LlmRuntimeNodeSchema)), method(object({ nodeId: string() }), array(LlmNodeModelSchema)), method(object({
12675
+ /** `https://huggingface.co/<org>/<repo>/resolve/main/<f>.gguf`,
12676
+ * `<org>/<repo>/<f>.gguf`, `<org>/<repo>` or `<org>/<repo>:<QUANT>`. */
12677
+ ref: string(),
12678
+ /** Explicit ceiling override, in bytes. Absent = the built-in ceiling. */
12679
+ maxBytes: number().positive().optional()
12680
+ }), HfModelResolutionSchema, {
12681
+ kind: "mutation",
12682
+ auth: "admin"
12683
+ }), method(object({
12435
12684
  nodeId: string(),
12436
12685
  model: ManagedModelRefSchema
12437
12686
  }), _void(), {
@@ -12991,11 +13240,33 @@ var NotificationFormatSchema = _enum([
12991
13240
  * Named by INTENT, never by glyph. "check" would tie the vocabulary to one
12992
13241
  * renderer's icon set; "acknowledge" survives an adapter that draws it
12993
13242
  * differently.
13243
+ *
13244
+ * ── A TOKEN IS NOT A WIRE VALUE ─────────────────────────────────────
13245
+ *
13246
+ * These names are for US. **No adapter may forward one verbatim.** Each maps
13247
+ * the whole set onto its own renderer's vocabulary through a
13248
+ * `Record<NotificationActionIcon, string>` — a Record, never a lookup with a
13249
+ * fallback, so adding a member here fails every adapter's build until someone
13250
+ * decides its glyph, which is the only place that decision can be made
13251
+ * honestly.
13252
+ *
13253
+ * This paragraph is the bug. Zentik declared `actionIcons: true` and passed
13254
+ * `disarm` straight through; iOS feeds that string to
13255
+ * `UNNotificationActionIcon(systemImageName:)`, `disarm` is not an SF Symbol,
13256
+ * and every snooze and alarm button arrived BLANK. A pass-through is not a
13257
+ * mapping, and "the field is documented" is not "the value renders".
13258
+ *
13259
+ * Adding a member is TRAIN-BOUND. The enum lives in the published
13260
+ * `@camstack/server` closure and the cap seam validates against the HUB's copy,
13261
+ * so an addon that emits a token the running hub does not know does not lose an
13262
+ * icon — its whole `send` fails Zod validation and the notification never
13263
+ * arrives. Never emit a new token from an addon before the train carrying it.
12994
13264
  */
12995
13265
  var NotificationActionIconSchema = _enum([
12996
13266
  "acknowledge",
12997
13267
  "dismiss",
12998
13268
  "silence",
13269
+ "snooze",
12999
13270
  "view",
13000
13271
  "play",
13001
13272
  "open",
@@ -13003,9 +13274,13 @@ var NotificationActionIconSchema = _enum([
13003
13274
  "lock",
13004
13275
  "unlock",
13005
13276
  "arm",
13277
+ "arm-home",
13278
+ "arm-away",
13279
+ "arm-night",
13006
13280
  "disarm",
13007
13281
  "light",
13008
- "alert"
13282
+ "alert",
13283
+ "camera"
13009
13284
  ]);
13010
13285
  /** A single tap-through action button. */
13011
13286
  var NotificationActionSchema = object({
@@ -13205,6 +13480,24 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
13205
13480
  targetId: string(),
13206
13481
  enabled: boolean()
13207
13482
  }), _void(), { kind: "mutation" });
13483
+ new Set([
13484
+ {
13485
+ id: "person",
13486
+ name: "Person"
13487
+ },
13488
+ {
13489
+ id: "vehicle",
13490
+ name: "Vehicle"
13491
+ },
13492
+ {
13493
+ id: "animal",
13494
+ name: "Animal"
13495
+ },
13496
+ {
13497
+ id: "package",
13498
+ name: "Package"
13499
+ }
13500
+ ].map((l) => l.id));
13208
13501
  var COCO_TO_MACRO = {
13209
13502
  mapping: {
13210
13503
  person: "person",
@@ -13997,11 +14290,15 @@ var NcSystemEventKindSchema = _enum([
13997
14290
  "stream-offline",
13998
14291
  "node-online",
13999
14292
  "node-offline",
14293
+ "node-inference-unavailable",
14294
+ "detection-blind",
14000
14295
  "addon-update-available",
14001
14296
  "server-update-available",
14002
14297
  "alarm-triggered",
14003
14298
  "alarm-armed",
14004
14299
  "alarm-disarmed",
14300
+ "alarm-arming",
14301
+ "alarm-arm-refused",
14005
14302
  "camera-online",
14006
14303
  "camera-offline",
14007
14304
  "camera-disabled",
@@ -14056,7 +14353,16 @@ var NcScheduleSchema = object({
14056
14353
  });
14057
14354
  /** Fuzzy plate matcher — OCR noise makes exact match useless (spec row 12/13). */
14058
14355
  var NcPlateMatcherSchema = object({
14059
- values: array(string().min(1)).min(1),
14356
+ /**
14357
+ * Plate texts (or gallery vehicle names) to match. EMPTY = **any plate the
14358
+ * pipeline could read** — the plate half of "no selection = no narrowing",
14359
+ * and the switch that says this rule is about vehicles that were IDENTIFIED
14360
+ * rather than merely seen. A subject carrying no plate still fails.
14361
+ *
14362
+ * The `.min(1)` this used to carry made that state unauthorable; nothing has
14363
+ * ever persisted an empty list, so widening it cannot change an existing rule.
14364
+ */
14365
+ values: array(string().min(1)),
14060
14366
  /** Max Levenshtein distance after normalization (uppercase alphanumeric). */
14061
14367
  maxDistance: number().int().min(0).max(3).default(1)
14062
14368
  });
@@ -14090,28 +14396,36 @@ var NcOccupancyConditionSchema = object({
14090
14396
  /**
14091
14397
  * Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
14092
14398
  *
14093
- * Operator-approved vocabulary (2026-08-12, option A — the same one the
14094
- * reference notifier uses, so an operator moving between them re-uses what
14095
- * they already know): a rule matches when, over a sampling window of
14096
- * `samplingSeconds`, at least `hitPercent`% of the audio samples in that
14097
- * window are HITS. A sample is a hit when it satisfies BOTH present filters:
14098
- *
14099
- * - `dbThreshold` its level is at or above this many dBFS (see
14100
- * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
14101
- * - `labels` the classifier put at least one of these labels on it.
14102
- *
14103
- * Both are OPTIONAL and independent, which is the point of the shape: a
14104
- * loudness rule ("something loud at 3am") needs no model to be right, and a
14105
- * label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
14106
- * is given** a window in which every sample is trivially a hit would fire on
14107
- * silence, so the engine refuses such a condition rather than notifying on
14108
- * nothing (the schema cannot express "at least one of" without becoming a
14109
- * ZodEffects the cap path would have to special-case).
14110
- *
14111
- * `hitPercent` is over the samples the window actually HOLDS, and the window
14112
- * must be FULL before it can match a window that has been open for two
14113
- * seconds of its ten is 100% of nothing, and firing on it would make
14114
- * `samplingSeconds` decorative.
14399
+ * **TWO EXCLUSIVE MODES** (operator decision 2026-08-14, D157). Which one a
14400
+ * rule is in is not a stored field it is WHICH FILTER the rule carries, so
14401
+ * there is no second switch that can disagree with the first and every rule
14402
+ * authored before the decision migrates for free (`audioModeOf`):
14403
+ *
14404
+ * - **LABEL mode — `labels` present.** The rule fires on the FIRST frame the
14405
+ * classifier labels with one of them. No window, no percentage:
14406
+ * `hitPercent` and `samplingSeconds` are ignored, and the rule's own
14407
+ * `throttle` cooldown is the only brake. The per-label confidence floor is
14408
+ * the analyzer's (`classificationMinScore`, per device) — a label only
14409
+ * reaches this condition if the classifier was already confident enough.
14410
+ * - **LEVEL mode `dbThreshold` present, no labels.** The sampling window IS
14411
+ * the condition: at least `hitPercent`% of the samples over
14412
+ * `samplingSeconds` must be at or above `dbThreshold` dBFS (see
14413
+ * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale). The window
14414
+ * must be FULL before it can match a window open for two of its ten
14415
+ * seconds is 100% of nothing.
14416
+ *
14417
+ * **Why label mode has no window.** It had one, and it never fired: the
14418
+ * analyzer emits ~1 audio frame per second but YAMNet only LABELS one to three
14419
+ * of them per episode, even through continuous crying. The measured maximum
14420
+ * `hitPercent` over the whole live history was 40 — under the shipped default
14421
+ * of 60, so a label rule could not fire at all, ever. A percentage of frames is
14422
+ * the wrong question to ask of a sparse classifier.
14423
+ *
14424
+ * **Fail-closed when NEITHER is given** — every sample would be a trivial hit
14425
+ * and the rule would fire on silence. The schema cannot express "exactly one
14426
+ * of" without becoming a ZodEffects the cap path would have to special-case, so
14427
+ * the exclusivity is enforced where every editor writes (`patchAudio`) and a
14428
+ * legacy rule carrying both resolves to LABEL (the mode that fires).
14115
14429
  *
14116
14430
  * Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
14117
14431
  * `audio-*` ids). Both spellings are accepted — the matcher normalizes the
@@ -14119,13 +14433,13 @@ var NcOccupancyConditionSchema = object({
14119
14433
  * an operator who typed `dog` mean the same thing.
14120
14434
  */
14121
14435
  var NcAudioConditionSchema = object({
14122
- /** Audio macro labels; absent = any sound (level-only rule). */
14436
+ /** LABEL MODE: audio macro labels. Present fires on the first labelled frame. */
14123
14437
  labels: array(string().min(1)).min(1).optional(),
14124
- /** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
14438
+ /** LEVEL MODE: floor in dBFS (negative-going, `0` = full scale). */
14125
14439
  dbThreshold: number().min(-96).max(0).optional(),
14126
- /** Percentage of the window's samples that must be hits (1–100). */
14440
+ /** LEVEL MODE ONLY: percentage of the window's samples that must be hits (1–100). */
14127
14441
  hitPercent: number().int().min(1).max(100).default(60),
14128
- /** Length of the sampling window in seconds. */
14442
+ /** LEVEL MODE ONLY: length of the sampling window in seconds. */
14129
14443
  samplingSeconds: number().int().min(1).max(300).default(10)
14130
14444
  });
14131
14445
  /**
@@ -14263,13 +14577,81 @@ var NcRuleActionsSchema = object({
14263
14577
  */
14264
14578
  buttons: array(NcRuleNotificationButtonSchema).max(8).optional()
14265
14579
  });
14580
+ /**
14581
+ * "This rule applies only while `deviceId` is in one of `states`."
14582
+ *
14583
+ * The states are the DEVICE's own vocabulary — `AlarmState` for a panel,
14584
+ * `on`/`off` for a switch — not a normalised set, because normalising would
14585
+ * make the condition lie about devices whose states have no equivalent.
14586
+ *
14587
+ * An unreadable state does NOT match: see the engine's fail-closed gate. A
14588
+ * condition that fired on "I could not read it" would be worse than no gate.
14589
+ */
14590
+ var NcDeviceStateConditionSchema = object({
14591
+ deviceId: number().int(),
14592
+ /** Any of these matches. */
14593
+ states: array(string().min(1)).min(1)
14594
+ });
14595
+ /**
14596
+ * "This rule applies only while scene `sceneId` is `matched` / `diverged`."
14597
+ *
14598
+ * A GATE, not a trigger. `occupancy` and `audio` each DISCRIMINATE their rule —
14599
+ * carrying one makes the rule fire on that subject and nothing else. Scene is
14600
+ * the other shape entirely, the `deviceState` shape: it narrows a rule that
14601
+ * already has a trigger ("tell me about a person at the front door, but only
14602
+ * while the bin is still out"). That is why it composes with every delivery
14603
+ * instead of owning one, and why no new `NcDelivery` member and no new subject
14604
+ * kind exist for it — see D159.
14605
+ *
14606
+ * ── Identity ───────────────────────────────────────────────────────────────
14607
+ * `sceneId` is `SceneMonitor.id`, a `randomUUID()` minted by `createScene` —
14608
+ * globally unique, so it needs no device to disambiguate it. `deviceId` is
14609
+ * carried as a HINT for the editor and for the log line, never as part of the
14610
+ * lookup key: a rule whose hint drifted must still gate correctly.
14611
+ *
14612
+ * ── Which boolean ──────────────────────────────────────────────────────────
14613
+ * `latched` ABSENT means "whatever the scene itself says" — `SceneMonitor.emit`
14614
+ * already declares which boolean drives notification rules, and a second knob
14615
+ * that could disagree with it is exactly the D62 failure. Set it only to
14616
+ * override one rule against the scene's own default.
14617
+ *
14618
+ * - LIVE reading (`emit`/`latched` resolve to live): passes iff
14619
+ * `verdict === requiredState`. `unknown` — no reference for this light, view
14620
+ * shifted, no snapshot — passes NEITHER. A scene that cannot judge is not
14621
+ * evidence, in either direction.
14622
+ * - LATCHED reading: passes iff `latched === (requiredState === 'diverged')`.
14623
+ * The latch is a durable fact about the past ("it has diverged since I armed
14624
+ * it"), so a camera that has gone dark does not clear it — that is the whole
14625
+ * reason the operator asked for a latch.
14626
+ *
14627
+ * The gate reads an in-memory mirror (`NcSceneStateCache`) refreshed OFF the
14628
+ * event path, never the cap: D49. A mirror that has never loaded, or a scene it
14629
+ * does not carry, reads absent and the rule does NOT fire — fail closed, and
14630
+ * said out loud in the log rather than dropped in silence.
14631
+ */
14632
+ var NcSceneConditionSchema = object({
14633
+ /** `SceneMonitor.id` — the uuid the cap mints. The whole lookup key. */
14634
+ sceneId: string().min(1),
14635
+ /** The camera the scene lives on. A hint for the editor and the log line. */
14636
+ deviceId: number().int().optional(),
14637
+ /** The state the scene must be in for the rule to fire. */
14638
+ requiredState: _enum(["matched", "diverged"]),
14639
+ /**
14640
+ * Read the LATCH (`true`) or the LIVE verdict (`false`). Absent = follow the
14641
+ * scene's own `emit` field, which is the only place that decision belongs.
14642
+ */
14643
+ latched: boolean().optional()
14644
+ });
14266
14645
  var NcConditionsSchema = object({
14267
14646
  /** Gate on ANOTHER device's current state (the alarm armed, a switch on). */
14268
- deviceState: object({
14269
- deviceId: number().int(),
14270
- /** Any of these matches. */
14271
- states: array(string().min(1)).min(1)
14272
- }).optional(),
14647
+ deviceState: NcDeviceStateConditionSchema.optional(),
14648
+ /**
14649
+ * Gate on a SCENE's state — "only while the bin is still out". Composes with
14650
+ * every trigger (detection, occupancy, audio, sensor, package, track-end);
14651
+ * unlike `occupancy`/`audio` it discriminates nothing. See
14652
+ * {@link NcSceneCondition} and D159.
14653
+ */
14654
+ scene: NcSceneConditionSchema.optional(),
14273
14655
  /** Device scope — absent = all devices. */
14274
14656
  devices: array(number()).optional(),
14275
14657
  /** Detector class names (any overlap with the record's class set). */
@@ -14295,18 +14677,47 @@ var NcConditionsSchema = object({
14295
14677
  */
14296
14678
  labelEquals: array(string().min(1)).optional(),
14297
14679
  /**
14298
- * Identity matcher. P1 boundary: matched against the record's collapsed
14299
- * `label` (the identity display name propagated by the face pipeline) —
14300
- * identity-ID matching rides in P2 when identity ids reach the record.
14680
+ * KNOWN FACES the rule's identity scope, and the switch that says the rule
14681
+ * is about recognised people at all.
14682
+ *
14683
+ * Three states, and the empty one is the point:
14684
+ *
14685
+ * | value | meaning |
14686
+ * | --- | --- |
14687
+ * | absent | the rule does not care who it is; an unrecognised person matches |
14688
+ * | `[]` | **only known faces** — any identity in the gallery, nobody in particular |
14689
+ * | a list | only these identities |
14690
+ *
14691
+ * `[]` is the repo-wide "no selection = no narrowing" reading (an absent
14692
+ * `devices` list is every device), applied one level down: the operator has
14693
+ * turned the face scope ON and narrowed it to nothing, which is every known
14694
+ * face. No second field states the same thing — a switch that can disagree
14695
+ * with the list under it is worse than no switch (D62).
14696
+ *
14697
+ * MEMBERS ARE FACE-GALLERY `Identity.id`s (uuid), not display names. A name is
14698
+ * renameable, and a rule authored on "Gianluca" went silently dark the moment
14699
+ * the operator fixed the spelling. The id reaches the record on
14700
+ * `LabelAttribution.identityId`; the name is what the editor shows and what
14701
+ * `{{label}}` renders.
14702
+ *
14703
+ * Rules written before this carry NAMES, and are resolved to ids lazily at
14704
+ * load (`NcRuleStore.load`) against the live gallery — a name nothing answers
14705
+ * for is left as it stands and reported, never dropped. The engine also
14706
+ * accepts a display-name hit as a compatibility leg, so a rule whose
14707
+ * migration could not resolve keeps matching exactly what it matched before.
14301
14708
  */
14302
14709
  identities: array(string().min(1)).optional(),
14303
- /** Fuzzy plate matcher against the record's `label` (plate text). */
14710
+ /**
14711
+ * KNOWN PLATES / VEHICLES — the plate mirror of {@link identities}, including
14712
+ * the empty-list reading: `values: []` is "any plate the OCR could read",
14713
+ * a non-empty list is those plates (fuzzily). See {@link NcPlateMatcherSchema}.
14714
+ */
14304
14715
  plates: NcPlateMatcherSchema.optional(),
14305
14716
  /**
14306
- * Identity EXCLUDE — mirror of {@link identities} with `notIn` semantics.
14307
- * Same P1 boundary: matched against the record's collapsed `label` (the
14308
- * identity display name). A record with NO label passes (nothing to
14309
- * exclude), unlike the include variant which fails on an absent label.
14717
+ * Identity EXCLUDE — mirror of {@link identities} with `notIn` semantics, and
14718
+ * the same id members and the same lazy name→id migration. A record with NO
14719
+ * identity passes (nothing to exclude), unlike the include variant which
14720
+ * fails on an unrecognised subject. An EMPTY list excludes nobody.
14310
14721
  */
14311
14722
  identitiesExclude: array(string().min(1)).optional(),
14312
14723
  /**
@@ -14698,7 +15109,80 @@ var NcRuleInputSchema = object({
14698
15109
  * a rule that predates the gate must keep delivering byte-for-byte as it
14699
15110
  * did, and absent is the only way to say that without a migration.
14700
15111
  */
14701
- confirm: NcConfirmSchema.optional()
15112
+ confirm: NcConfirmSchema.optional(),
15113
+ /**
15114
+ * WAIT for face/plate recognition before saying anything.
15115
+ *
15116
+ * A notification's TEXT is frozen at enqueue and its media is re-resolved at
15117
+ * send; the identity is neither. A face is confirmed after `confirmFrames`
15118
+ * agreeing observations — p50 **11.4 s** after the track was first seen,
15119
+ * measured on this hub — and an `immediate` rule enqueues on the first object
15120
+ * event, seconds before that. So "Gianluca è arrivato" is unsayable on the
15121
+ * immediate path, and no amount of media re-resolution fixes a sentence.
15122
+ *
15123
+ * Only two honest answers exist, and this flag picks between them. It has
15124
+ * effect ONLY on a rule that declares a recognition scope
15125
+ * ({@link NcConditions.identities} or {@link NcConditions.plates}) — on any
15126
+ * other rule there is nothing to wait for and the flag is inert.
15127
+ *
15128
+ * | value | what happens |
15129
+ * | --- | --- |
15130
+ * | `true` | the rule stops firing on the object event and fires at TRACK CLOSE instead, once, with the name — later, and complete |
15131
+ * | 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) |
15132
+ *
15133
+ * `.optional()` and deliberately NOT `.default()`: a Zod default does not run
15134
+ * on the addon cap path, and absent has to keep meaning exactly what every
15135
+ * rule authored before this field meant.
15136
+ *
15137
+ * The cost of `true` is stated here because the editor states it too: a rule
15138
+ * that waits also inherits track-close SEMANTICS — its `zones` condition
15139
+ * tests every zone the track visited and a `crossing` condition can no longer
15140
+ * be satisfied, because a closed track carries no crossing.
15141
+ */
15142
+ waitForEnhancement: boolean().optional(),
15143
+ /**
15144
+ * GROUP a burst of subjects into ONE notification that grows.
15145
+ *
15146
+ * Seconds of quiet after the last matching subject before the burst is
15147
+ * considered over. While it is open, the first subject enqueues immediately —
15148
+ * **exactly as today, with no added latency** — and every real growth (a new
15149
+ * subject, or a name confirmed on one already in it) REPLACES that
15150
+ * notification with an updated one naming everybody. The push carries the
15151
+ * group's own coalescing tag, so the phone replaces rather than stacks.
15152
+ *
15153
+ * `0` / absent = off, and off is today's behaviour byte for byte.
15154
+ *
15155
+ * ### Why an idle cutoff and not a window
15156
+ *
15157
+ * The measured seven-person arrival on device 590 spans 110 s with every
15158
+ * internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
15159
+ * idle cutoff holds it as one and ends it when the arrival actually ends.
15160
+ * 30 is Frigate's shipped value for the same decision.
15161
+ *
15162
+ * ### What it replaces
15163
+ *
15164
+ * The blind cooldown, which collapses a burst by DISCARDING it. Measured on
15165
+ * device 615 / *Persona su Uscio* over six days: 116 qualifying tracks → 74
15166
+ * notifications, **44 (37.9%) suppressed outright**, 23 of them overlapping a
15167
+ * track that did fire and 7 carrying a confirmed identity nobody heard about.
15168
+ * A group collapses the same volume by MERGING, so the cooldown becomes a
15169
+ * budget over GROUPS — which is what it always meant — and a growth is never
15170
+ * throttled by the window its own first member spent.
15171
+ *
15172
+ * ### Interaction with {@link waitForEnhancement}
15173
+ *
15174
+ * They compose, and the order matters. `waitForEnhancement` defers the rule to
15175
+ * TRACK CLOSE, so with both set the group is opened by the first member to
15176
+ * CLOSE — already carrying its name — and grows as later members close. That
15177
+ * is later, and complete. With grouping alone the group opens on the first
15178
+ * object event and picks up names as they are confirmed, through the growth
15179
+ * path. Neither combination fires twice for one subject.
15180
+ *
15181
+ * `.optional()` and deliberately NOT `.default()`: a Zod default does not run
15182
+ * on the addon cap path, so absent must keep meaning what it meant before this
15183
+ * field existed.
15184
+ */
15185
+ groupIdleSec: number().int().min(0).max(600).optional()
14702
15186
  });
14703
15187
  /**
14704
15188
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -14805,6 +15289,7 @@ var NcConditionDescriptorSchema = object({
14805
15289
  "occupancy",
14806
15290
  "audio",
14807
15291
  "deviceState",
15292
+ "scene",
14808
15293
  "systemEvent"
14809
15294
  ]),
14810
15295
  operator: _enum([
@@ -15210,7 +15695,87 @@ var MethodAccessSchema = _enum([
15210
15695
  var AllowedProviderSchema = union([literal("*"), array(string())]);
15211
15696
  var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
15212
15697
  var CapScopeSchema = _enum(["device", "system"]);
15213
- var TokenScopeSchema = discriminatedUnion("type", [
15698
+ /**
15699
+ * DeviceSelector (scope model v3 — 2026-08-12).
15700
+ *
15701
+ * A `device` grant no longer carries a frozen list of deviceIds. It carries
15702
+ * a SELECTOR the matcher resolves against the live fleet, so the grant can be
15703
+ * DYNAMIC: a `types:['camera']` selector automatically covers a camera added
15704
+ * AFTER the grant was minted — no re-grant, no re-login.
15705
+ *
15706
+ * - `all` — every device in the deployment. The broad viewer/operator
15707
+ * lever without a `category` grant (a `category` grant also covers device
15708
+ * caps that carry no deviceId; `all` is specifically the device set).
15709
+ * - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
15710
+ * grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
15711
+ * is NOT covered until the grant is edited.
15712
+ * - `types` — every device of a `DeviceType` (e.g. every `camera`).
15713
+ * DYNAMIC. A device that changes type, or a new device of the type,
15714
+ * re-resolves on the next request.
15715
+ * - `locations` — every device whose operator-assigned `location` label is
15716
+ * in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
15717
+ * null/unset location matches NO `locations` selector.
15718
+ */
15719
+ var DeviceSelectorSchema = discriminatedUnion("kind", [
15720
+ object({ kind: literal("all") }),
15721
+ object({
15722
+ kind: literal("ids"),
15723
+ ids: array(number().int()).min(1)
15724
+ }),
15725
+ object({
15726
+ kind: literal("types"),
15727
+ types: array(_enum(DeviceType)).min(1)
15728
+ }),
15729
+ object({
15730
+ kind: literal("locations"),
15731
+ locations: array(string().min(1)).min(1)
15732
+ })
15733
+ ]);
15734
+ var DeviceTokenScopeSchema = object({
15735
+ type: literal("device"),
15736
+ /** The device SET this grant covers — resolved against the live fleet. */
15737
+ selector: DeviceSelectorSchema,
15738
+ access: array(MethodAccessSchema).min(1),
15739
+ /**
15740
+ * Whether a grant on a PARENT device transparently covers its accessory
15741
+ * CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
15742
+ * Direction is parent → children ONLY.
15743
+ *
15744
+ * Absent → the matcher DERIVES it from the access flavour: `view`
15745
+ * inherits (a camera viewer sees the camera's accessories), `create` /
15746
+ * `delete` do NOT (actuating/removing a child is an explicit act the
15747
+ * operator must grant on the child, not inherit from the parent). Set it
15748
+ * explicitly to override that default per grant.
15749
+ */
15750
+ includeLinked: boolean().optional()
15751
+ });
15752
+ /**
15753
+ * v2 → v3 lazy migration. A pre-v3 `device` grant carried
15754
+ * `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
15755
+ * `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
15756
+ * EVERY parse path — stored records AND the JWT-carried scope arrays
15757
+ * normalised at the request boundary ({@link normalizeTokenScopes} in
15758
+ * `device-selector.ts`). Chosen over a one-time DB migration because a
15759
+ * migration cannot reach a JWT already in a client's hands; parse-time
15760
+ * migration covers both without a flag day. No cast — the raw object is read
15761
+ * through `Reflect.get` (its static type is `unknown`).
15762
+ */
15763
+ function migrateLegacyTokenScope(raw) {
15764
+ if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
15765
+ if (Reflect.get(raw, "type") !== "device") return raw;
15766
+ if (Reflect.get(raw, "selector") !== void 0) return raw;
15767
+ const targets = Reflect.get(raw, "targets");
15768
+ if (!Array.isArray(targets)) return raw;
15769
+ return {
15770
+ type: "device",
15771
+ selector: {
15772
+ kind: "ids",
15773
+ ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
15774
+ },
15775
+ access: Reflect.get(raw, "access")
15776
+ };
15777
+ }
15778
+ var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
15214
15779
  object({
15215
15780
  type: literal("category"),
15216
15781
  target: CapScopeSchema,
@@ -15226,18 +15791,8 @@ var TokenScopeSchema = discriminatedUnion("type", [
15226
15791
  target: string(),
15227
15792
  access: array(MethodAccessSchema).min(1)
15228
15793
  }),
15229
- object({
15230
- type: literal("device"),
15231
- /**
15232
- * One or more deviceIds (serialised as strings for wire-format
15233
- * consistency with the rest of the union). Matcher accepts if
15234
- * `input.deviceId` ∈ `targets`. Array shape avoids the row-explosion
15235
- * of one scope-per-device when granting access to a set of cameras.
15236
- */
15237
- targets: array(string()).min(1),
15238
- access: array(MethodAccessSchema).min(1)
15239
- })
15240
- ]);
15794
+ DeviceTokenScopeSchema
15795
+ ]));
15241
15796
  object({
15242
15797
  id: string(),
15243
15798
  username: string(),
@@ -15554,7 +16109,7 @@ var TrackEnvelopeSchema = object({
15554
16109
  * `snapshots[]` references — megabytes across a page of tracks. `slim`
15555
16110
  * keeps every scalar the list surfaces actually render (ids, class(es),
15556
16111
  * label / audioLabels / importance enrichment, firstSeen/lastSeen, state,
15557
- * zonesVisited, bestEventId, envelope, hasFace) and returns `positions` /
16112
+ * zonesVisited, bestEventId, envelope, hasFace, hasRider) and returns `positions` /
15558
16113
  * `snapshots` as EMPTY arrays — detail views re-fetch the full row via
15559
16114
  * `getTrack`. Mirrors the event-store `projection` convention
15560
16115
  * (`getObjectEvents` et al.).
@@ -15690,7 +16245,21 @@ union([literal(1), literal(2)]);
15690
16245
  var LabelAttributionSchema = object({
15691
16246
  stepId: string(),
15692
16247
  modelId: string().optional(),
15693
- decidedAt: number()
16248
+ decidedAt: number(),
16249
+ /**
16250
+ * The GALLERY id behind a recognised tier-2 label — a face-gallery
16251
+ * `Identity.id` or a plate-gallery `Vehicle.id` (both `randomUUID`).
16252
+ *
16253
+ * The text alone is a DISPLAY NAME, and a display name is renameable: a
16254
+ * notification rule authored on "Gianluca" stopped matching the moment the
16255
+ * operator fixed the spelling in the gallery, and nothing said so. The id is
16256
+ * the thing that does not move, so it is what a rule matches on
16257
+ * (`NcConditions.identities`) and the text is what a human is shown.
16258
+ *
16259
+ * Absent when the label names no gallery row — a plate the OCR read but no
16260
+ * vehicle claims, a sub-class, a species, any tier-1 value.
16261
+ */
16262
+ identityId: string().optional()
15694
16263
  });
15695
16264
  /**
15696
16265
  * The TIERED label model (roadmap 4g), spread into `TrackSchema` and
@@ -15827,6 +16396,28 @@ var TrackSchema = object({
15827
16396
  * `=== true` and render nothing otherwise, never infer "no face".
15828
16397
  */
15829
16398
  hasFace: boolean().optional(),
16399
+ /**
16400
+ * This subject CONTAINS a folded rider — a person the rider-pairing step
16401
+ * ([D34](../decisions/adr-0034.md)) removed from the frame BEFORE the tracker,
16402
+ * so the passage is tracked once and as a VEHICLE.
16403
+ *
16404
+ * It exists because the fold's record was dishonest. D34 and the code both
16405
+ * said "the person is not lost — it is reported so both entities stay on the
16406
+ * record"; in fact the pair went into a per-processor RAM field behind an
16407
+ * accessor nobody called, and every durable surface said `vehicle`, full
16408
+ * stop. This is the composition note that makes the row true.
16409
+ *
16410
+ * A COMPOSITION, never a class and never a label. "This vehicle contains a
16411
+ * person" is not an answer to "what is this" — both label tiers would refuse
16412
+ * a macro token anyway (D89), and correctly. Nothing here changes what the
16413
+ * subject IS: a cyclist stays one vehicle track, occupancy still counts one,
16414
+ * and a `person` rule still does not fire for someone cycling past.
16415
+ *
16416
+ * **Absent ≠ false**, exactly like {@link hasFace}: every row written before
16417
+ * the column, and every hub that predates the field, omits it. Test
16418
+ * `=== true` and render nothing otherwise — never infer "no rider".
16419
+ */
16420
+ hasRider: boolean().optional(),
15830
16421
  ...TrackFlagFields,
15831
16422
  ...TrackRetrainFields
15832
16423
  });
@@ -16176,7 +16767,10 @@ var RecentTracksQueryInput = object({
16176
16767
  * Encodes the (lastSeen, trackId) sort position — treat as opaque. */
16177
16768
  cursor: string().optional(),
16178
16769
  /** See {@link TrackProjectionSchema}. Default `full`. */
16179
- projection: TrackProjectionSchema.optional()
16770
+ projection: TrackProjectionSchema.optional(),
16771
+ /** Include stationary-promoted rows (parked objects). Default false: the
16772
+ * feed lists passages; parking records live on the stationary registry. */
16773
+ includeStationary: boolean().optional()
16180
16774
  });
16181
16775
  var RecentTracksPageSchema = object({
16182
16776
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -16394,7 +16988,11 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16394
16988
  zone: TrackZoneFilterSchema.optional(),
16395
16989
  /** See {@link TrackProjectionSchema}. Default `full` (backward
16396
16990
  * compatible — omitting the field keeps today's exact behaviour). */
16397
- projection: TrackProjectionSchema.optional()
16991
+ projection: TrackProjectionSchema.optional(),
16992
+ /** Include stationary-promoted rows (parked objects handed to the
16993
+ * stationary registry). Default false: the timeline lists passages,
16994
+ * not parking records (operator decision, 2026-08-15). */
16995
+ includeStationary: boolean().optional()
16398
16996
  }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
16399
16997
  kind: "mutation",
16400
16998
  auth: "admin"
@@ -16558,11 +17156,16 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16558
17156
  auth: "admin"
16559
17157
  }), method(object({
16560
17158
  eventId: string(),
16561
- kind: MediaFileKindEnum.optional()
17159
+ kind: MediaFileKindEnum.optional(),
17160
+ deviceId: number()
16562
17161
  }), array(MediaFileSchema).readonly()), method(object({
16563
17162
  trackId: string(),
16564
- kinds: array(MediaFileKindEnum).optional()
16565
- }), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
17163
+ kinds: array(MediaFileKindEnum).optional(),
17164
+ deviceId: number()
17165
+ }), array(MediaFileSchema).readonly()), method(object({
17166
+ trackId: string(),
17167
+ deviceId: number()
17168
+ }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
16566
17169
  kind: "mutation",
16567
17170
  auth: "admin"
16568
17171
  }), method(RebuildObjectEmbeddingsInput, RebuildObjectEmbeddingsResultSchema, {
@@ -17222,6 +17825,17 @@ var maxSessionHoldMsField = {
17222
17825
  default: 12e4,
17223
17826
  step: 5e3
17224
17827
  };
17828
+ /**
17829
+ * Quiet period that closes an `audioMode: 'on-motion'` audio window. Floor of
17830
+ * 5s so a rearm can never degenerate into per-event stream churn; default 90s
17831
+ * comfortably outlives the gap between two PIR wakes on a battery camera.
17832
+ */
17833
+ var audioMotionWindowMsField = {
17834
+ min: 5e3,
17835
+ max: 6e5,
17836
+ default: 9e4,
17837
+ step: 5e3
17838
+ };
17225
17839
  var motionFpsField = {
17226
17840
  min: 1,
17227
17841
  max: 30,
@@ -17234,10 +17848,26 @@ var detectionFpsField = {
17234
17848
  default: 10,
17235
17849
  step: 1
17236
17850
  };
17851
+ /**
17852
+ * The occupancy re-check interval. DEFAULT 300 s (2026-08-13 — was 30 s).
17853
+ *
17854
+ * The recheck is now on by default (a parked car is invisible to occupancy
17855
+ * rules until the stationary registry has been rebuilt by motion, which after a
17856
+ * restart may be never on a quiet camera). Each cycle re-subscribes a detection
17857
+ * session — an RTSP re-dial — so the switch is only affordable at a WIDE
17858
+ * interval: 300 s is ~12 re-dials an hour per camera, against 120 at the old
17859
+ * 30 s. A parked car is therefore counted within 5 minutes of a restart.
17860
+ *
17861
+ * Why not wider: `max` is 300 and raising it is TRAIN-BOUND, not addon-bound —
17862
+ * the host validates `attachCamera` against ITS copy of this schema, so a
17863
+ * runner asked for 600 would be rejected by the hub until a `@camstack/server`
17864
+ * carrying the wider bound is installed everywhere. 300 is the widest value
17865
+ * that ships with an addon deploy.
17866
+ */
17237
17867
  var occupancyRecheckSecField = {
17238
17868
  min: 0,
17239
17869
  max: 300,
17240
- default: 30,
17870
+ default: 300,
17241
17871
  step: 5
17242
17872
  };
17243
17873
  var occupancyRecheckFramesField = {
@@ -17382,6 +18012,27 @@ var RunnerCameraConfigSchema = object({
17382
18012
  * resolved `CameraDetectionConfig`.
17383
18013
  */
17384
18014
  maxSessionHoldMs: number().min(maxSessionHoldMsField.min).max(maxSessionHoldMsField.max).optional(),
18015
+ /**
18016
+ * Orchestrator-side quiet period (ms) that closes an `audioMode:
18017
+ * 'on-motion'` audio window, measured from the LAST motion event.
18018
+ *
18019
+ * This exists because the falling edge cannot be relied on. Camera-native
18020
+ * providers emit motion as a RISING EDGE ONLY (Reolink's Baichuan push and
18021
+ * its email-push SMTP path both emit `detected: true` and never the
18022
+ * counterpart); only the frame-diff analyzer emits falls. So on an
18023
+ * onboard-only camera a window that closed only on `detected: false` never
18024
+ * closed at all, and `on-motion` silently behaved as `always-on` — on a
18025
+ * battery camera, the one failure mode the mode exists to prevent.
18026
+ *
18027
+ * Every motion event rearms this timer WITHOUT restarting the stream, so a
18028
+ * burst of re-fires costs nothing. A falling edge, when one does arrive,
18029
+ * still closes earlier via `motionCooldownMs` — whichever comes first wins.
18030
+ *
18031
+ * Not consumed by the runner: carried here so it shares the per-camera
18032
+ * device-settings surface with `motionCooldownMs`, exactly like
18033
+ * `maxSessionHoldMs`.
18034
+ */
18035
+ audioMotionWindowMs: number().min(audioMotionWindowMsField.min).max(audioMotionWindowMsField.max).optional(),
17385
18036
  motionFps: number().min(motionFpsField.min).max(motionFpsField.max).default(motionFpsField.default),
17386
18037
  detectionFps: number().min(detectionFpsField.min).max(detectionFpsField.max).default(detectionFpsField.default),
17387
18038
  motionStreamId: string(),
@@ -17435,15 +18086,21 @@ var RunnerCameraConfigSchema = object({
17435
18086
  */
17436
18087
  onboardMotionDrivesAnalyzer: boolean().default(true),
17437
18088
  /**
17438
- * Master toggle for the occupancy re-check. When `false` (DEFAULT) the runner
17439
- * never arms the periodic recheck timer, regardless of `occupancyRecheckSec`
17440
- * this is off by default because the recheck re-subscribes a detection session
17441
- * every N seconds while `watching`, a major source of pull-decoder re-dial
17442
- * churn (each cycle creates+tears a session → RTSP re-dial → latency). The
18089
+ * Master toggle for the occupancy re-check. When `false` the runner never arms
18090
+ * the periodic recheck timer, regardless of `occupancyRecheckSec`; the
17443
18091
  * `occupancyRecheckSec` / `occupancyRecheckFrames` sliders only take effect
17444
18092
  * (and only render) when this is enabled.
17445
- */
17446
- occupancyRecheckEnabled: boolean().default(false),
18093
+ *
18094
+ * DEFAULT `true` since 2026-08-13 (was `false`). It was off because the
18095
+ * recheck re-subscribes a detection session every N seconds while `watching`
18096
+ * — each cycle creates+tears a session ⇒ an RTSP re-dial ⇒ latency, a major
18097
+ * pull-decoder churn source. What that bought was a blind spot: a STATIONARY
18098
+ * object is counted only while the stationary registry holds it, and the
18099
+ * registry rebuilds from motion, so after a restart a parked car was invisible
18100
+ * to every occupancy rule until something moved in front of it. The churn is
18101
+ * now paid on the interval instead — see `occupancyRecheckSecField`.
18102
+ */
18103
+ occupancyRecheckEnabled: boolean().default(true),
17447
18104
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
17448
18105
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
17449
18106
  /**
@@ -17471,7 +18128,7 @@ var RunnerCameraConfigSchema = object({
17471
18128
  */
17472
18129
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
17473
18130
  });
17474
- 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;
18131
+ 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;
17475
18132
  /**
17476
18133
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
17477
18134
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -18576,7 +19233,16 @@ targets: array(object({
18576
19233
  /** A sleeping battery camera: the frame is deliberately stale and will
18577
19234
  * NOT refresh in the background. A surface should say so rather than
18578
19235
  * present it as current. */
18579
- sleeping: boolean()
19236
+ sleeping: boolean(),
19237
+ /** Current device state rendered over the cached frame. State images
19238
+ * remain authoritative even when their photographic background is
19239
+ * old; null means the link must carry a current camera frame. */
19240
+ stateReason: _enum([
19241
+ "disabled",
19242
+ "sleeping",
19243
+ "unreachable",
19244
+ "waking"
19245
+ ]).nullable()
18580
19246
  })))
18581
19247
  },
18582
19248
  status: {
@@ -20104,6 +20770,25 @@ var BatteryStatusSchema = object({
20104
20770
  /** Ms epoch of the last observation. Lets consumers reason about freshness. */
20105
20771
  lastUpdated: number(),
20106
20772
  /**
20773
+ * Ms epoch of the last time the device PROVED it was reachable — a
20774
+ * completed firmware round-trip, an observed wake, or an inbound push
20775
+ * (firmware event, email). `0`/absent = never since this slice was born.
20776
+ *
20777
+ * This is the ONLY input that separates "asleep" from "gone", and it is
20778
+ * fed exclusively by PASSIVE signals: nothing may write it by reaching
20779
+ * for the radio, because a poll that confirms reachability is the same
20780
+ * poll that drains the battery. See {@link deriveBatteryPresence} — the
20781
+ * single derivation every consumer must use; no surface computes its own.
20782
+ *
20783
+ * It is deliberately NOT a clock in the
20784
+ * `scripts/check-runtime-state-durability.ts` sense: it is the
20785
+ * observation itself, and it is the only thing a 30-hour silence is
20786
+ * visible in. Writers quantise it (see `CONTACT_WRITE_QUANTUM_MS` in the
20787
+ * Reolink provider) so a value that means "recently" cannot cost a
20788
+ * SQLite commit per round-trip.
20789
+ */
20790
+ lastContactAt: number().optional(),
20791
+ /**
20107
20792
  * True when the source is a BINARY low-battery indicator (HA
20108
20793
  * `binary_sensor` device_class=battery / `LOW_BAT`) that has no real
20109
20794
  * charge level — `percentage` is then a coarse stand-in (100 = normal,
@@ -23683,7 +24368,7 @@ method(object({
23683
24368
  toMs: number()
23684
24369
  }), RecordingAvailabilitySchema, {
23685
24370
  kind: "query",
23686
- auth: "admin"
24371
+ auth: "protected"
23687
24372
  }), method(object({
23688
24373
  deviceId: number(),
23689
24374
  fromMs: number(),
@@ -23691,14 +24376,14 @@ method(object({
23691
24376
  tzOffsetMinutes: number()
23692
24377
  }), RecordingDaysSchema, {
23693
24378
  kind: "query",
23694
- auth: "admin"
24379
+ auth: "protected"
23695
24380
  }), method(object({
23696
24381
  deviceId: number(),
23697
24382
  fromMs: number(),
23698
24383
  toMs: number()
23699
24384
  }), RecordingManifestSchema, {
23700
24385
  kind: "query",
23701
- auth: "admin"
24386
+ auth: "protected"
23702
24387
  }), method(object({}), RecordingStorageUsageSchema, {
23703
24388
  kind: "query",
23704
24389
  auth: "admin"
@@ -23988,14 +24673,77 @@ method(object({
23988
24673
  * thing except the comparator: `similarity` (CLIP cosine at the same ROI coords
23989
24674
  * vs condition-tagged references) and `llm` (vision-LLM judgment over the crop).
23990
24675
  *
23991
- * D14 device-config archetype (`deviceConfig.ui.kind:'widget'`) the framework
23992
- * derives the device-detail contribution; the provider carries NO hand-written
23993
- * settings-contribution methods. `status.kind:'push'` the engine pushes on
23994
- * every hysteresis flip / availability change; consumers never poll.
23995
- */
23996
- /** Extensible condition tag. Seeded 'day' | 'night'; open by design so more can
23997
- * be added without a wire break (matching falls back to any-condition refs). */
24676
+ * **No `deviceConfig`, deliberately.** This shipped as the D14 widget archetype,
24677
+ * which put a "Scenes" tab on one camera's detail page. That is the wrong shape
24678
+ * for the thing: a scene is a standing question about the property ("is the bin
24679
+ * still out"), and the operator's question is "which of my scenes have tripped",
24680
+ * across every camera at once — not "what does camera 617 think". Buried one
24681
+ * camera deep it also could not be found. The surface is now a top-level admin
24682
+ * page (`/scenes`, `pages/Scenes.tsx`) that lists every scene on every camera and
24683
+ * picks the camera inside the create flow, the same shape Events and Faces have.
24684
+ *
24685
+ * The consequence to keep in mind: `host/scene-monitor-editor` is gone from
24686
+ * `HOST_WIDGETS` too. `scripts/check-host-widget-resolves.ts` asserts BOTH
24687
+ * directions, so a registration nobody declares fails exactly as loudly as a
24688
+ * declaration nobody registers. The editor is imported directly by the page.
24689
+ *
24690
+ * `status.kind:'push'` — the engine pushes on every hysteresis flip /
24691
+ * availability change; consumers never poll.
24692
+ */
24693
+ /** Extensible condition tag. Seeded 'day' | 'ir' (the two variants the operator
24694
+ * captures) plus 'night' | 'dawn' | 'dusk' from the resolver's sun-times band.
24695
+ * Open by design so more can be added without a wire break.
24696
+ *
24697
+ * Matching does NOT fall back across conditions: cross-condition cosines are
24698
+ * not comparable, so "I have never seen this scene in this light" is reported
24699
+ * as `unknown`, never guessed. A day reference scored against an IR frame
24700
+ * collapses the cosine and would latch a false alarm every single night. */
23998
24701
  var SceneConditionSchema = string();
24702
+ /**
24703
+ * What a scene does when the CURRENT light has no reference of its own.
24704
+ *
24705
+ * The lighting variants are not equally likely to exist. Almost every operator
24706
+ * captures daylight and then never stands outside at 22:00 to capture IR, and a
24707
+ * scene that is only ever going to be asked about a daytime question ("is the
24708
+ * bin still on the kerb at 08:00") does not need a night reference at all. The
24709
+ * night half must therefore be OPTIONAL, and optional means the scene keeps
24710
+ * working without it rather than degrading into a permanent complaint.
24711
+ *
24712
+ * - `skip` (default) — the check in that light is not made. Not a verdict, not
24713
+ * an alarm, not even an `unknown`: the live state simply stays whatever the
24714
+ * last covered light left it at, the latch is untouched, and the hysteresis
24715
+ * run is neither spent nor cleared. The scene resumes by itself at first
24716
+ * light. This is the only behaviour under which "I never captured IR" is a
24717
+ * configuration choice instead of a nightly fault.
24718
+ * - `judge-anyway` — score against the OTHER conditions' references. Available
24719
+ * for cameras whose IR frame is close enough to daylight (a floodlit
24720
+ * driveway, an always-white-light doorbell), and wrong for everything else:
24721
+ * cross-condition cosines are not comparable, so a day reference against a
24722
+ * true IR frame collapses and the scene reports a theft at 21:40.
24723
+ *
24724
+ * Never applies when the scene has NO comparable reference at all — that is
24725
+ * "not armed yet", it is reported as `no-reference-for-condition`, and silence
24726
+ * there would hide a scene the operator never finished setting up.
24727
+ */
24728
+ var SceneUncoveredPolicySchema = _enum(["skip", "judge-anyway"]);
24729
+ /** `matched` = the baseline is what we see; `diverged` = it demonstrably is not;
24730
+ * `unknown` = we cannot judge (no reference for this condition, encoder model
24731
+ * changed, view shifted, no snapshot). `unknown` is a real value, not a null,
24732
+ * and never counts toward hysteresis in either direction. */
24733
+ var SceneVerdictSchema = _enum([
24734
+ "matched",
24735
+ "diverged",
24736
+ "unknown"
24737
+ ]);
24738
+ /** Why a scene cannot judge. Named, because this feature's failure mode is
24739
+ * silence that reads as "nothing has happened". */
24740
+ var SceneUnavailableSchema = _enum([
24741
+ "no-reference-for-condition",
24742
+ "view-shifted",
24743
+ "no-vision-profile",
24744
+ "encoder-model-changed",
24745
+ "no-snapshot"
24746
+ ]);
23999
24747
  /** One captured reference — condition-tagged, model-version-gated. `embedding`
24000
24748
  * is `number[]` (Float32Array does NOT survive MsgPack/UDS). */
24001
24749
  var SceneReferenceSchema = object({
@@ -24003,7 +24751,14 @@ var SceneReferenceSchema = object({
24003
24751
  modelId: string(),
24004
24752
  condition: SceneConditionSchema,
24005
24753
  capturedAt: number(),
24006
- thumbnailMediaId: string().optional()
24754
+ thumbnailMediaId: string().optional(),
24755
+ /** Whole-frame (downscaled) embedding captured alongside the ROI crop. The
24756
+ * anti-view-shift anchor: a bumped camera, a PTZ preset or a re-aim makes the
24757
+ * normalized rect frame a different piece of world, and the scene would
24758
+ * diverge forever with a perfectly plausible cosine. Checked LAZILY, only
24759
+ * when hysteresis is about to flip — one extra encode per candidate
24760
+ * transition, not per poll. */
24761
+ anchorEmbedding: array(number()).optional()
24007
24762
  });
24008
24763
  var SceneMonitorStateSchema = object({
24009
24764
  id: string(),
@@ -24025,6 +24780,28 @@ var SceneCheckSchema = discriminatedUnion("mode", [object({
24025
24780
  profileId: string().optional(),
24026
24781
  hysteresisCount: number().int().positive()
24027
24782
  })]);
24783
+ var SCENE_DEFAULT_ANCHOR_THRESHOLD = .85;
24784
+ /** Night is OPTIONAL. A scene with only a daylight reference sits the IR hours
24785
+ * out in silence rather than reporting a fault every night. */
24786
+ var SCENE_DEFAULT_UNCOVERED_POLICY = "skip";
24787
+ /**
24788
+ * Vision-model adjudication of a candidate flip. Field names deliberately
24789
+ * mirror `NcConfirmSchema` so an operator meets one vocabulary, not two.
24790
+ *
24791
+ * `onTimeout` defaults to **'hold'**, the OPPOSITE of `NcConfirmGate`'s
24792
+ * fail-open: a notification suppressed is the worse error there, but a vision
24793
+ * model that timed out has not told us the bin is gone, and a latch is a
24794
+ * stateful claim that costs the operator a trip to reset.
24795
+ */
24796
+ var SceneConfirmSchema = object({
24797
+ enabled: boolean().default(false),
24798
+ prompt: string().min(1).max(1e3),
24799
+ profileId: string().optional(),
24800
+ timeoutMs: number().int().min(1e3).max(2e4).default(8e3),
24801
+ maxImagePx: number().int().min(64).max(2048).default(448),
24802
+ /** What a timeout / unavailable model means for the PENDING flip. */
24803
+ onTimeout: _enum(["flip", "hold"]).default("hold")
24804
+ });
24028
24805
  var SceneMonitorSchema = object({
24029
24806
  id: string(),
24030
24807
  label: string(),
@@ -24043,7 +24820,56 @@ var SceneMonitorSchema = object({
24043
24820
  lastConfidence: number().nullable(),
24044
24821
  currentCondition: SceneConditionSchema.nullable(),
24045
24822
  availability: _enum(["ok", "unavailable"]),
24046
- unavailableReason: string().nullable()
24823
+ unavailableReason: string().nullable(),
24824
+ /** Which state is "the initial screen". `null` until the first capture. */
24825
+ baselineStateId: string().nullable(),
24826
+ /** Which boolean drives notification rules and any export. */
24827
+ emit: _enum(["latched", "live"]).default("latched"),
24828
+ /** Live: does the region match the baseline RIGHT NOW. */
24829
+ verdict: SceneVerdictSchema,
24830
+ /** Has it been `diverged` at least once since `armedAt` — the operator's boolean. */
24831
+ latched: boolean(),
24832
+ /** Last reset (or creation). */
24833
+ armedAt: number(),
24834
+ divergedAt: number().nullable(),
24835
+ restoredAt: number().nullable(),
24836
+ /** A check is only COUNTED when the device has been quiet this long. Motion
24837
+ * during the window DISCARDS the observation — a car pulling up in front of
24838
+ * the bin must not be able to spend hysteresis credit. */
24839
+ quietSeconds: number().int().min(0).max(3600).default(60),
24840
+ /** An observation only advances the pending count when it is at least this
24841
+ * far from the previously counted one, so N agreeing checks span real time
24842
+ * rather than N adjacent polls inside one occlusion. */
24843
+ minObservationSpacingSec: number().int().min(0).max(3600).default(120),
24844
+ /** Vision-model adjudication of a candidate flip. Similarity primary only. */
24845
+ confirm: SceneConfirmSchema.optional(),
24846
+ /** Whole-frame anchor cosine below which a flip is REFUSED as `view-shifted`. */
24847
+ anchorThreshold: number().min(0).max(1).default(SCENE_DEFAULT_ANCHOR_THRESHOLD),
24848
+ /** Clear the latch on its own when the scene matches again? Default false —
24849
+ * `restoredAt` and the `scene-restored` edge are recorded regardless, so an
24850
+ * automation can react to the bin coming back without the operator's own
24851
+ * alarm silently clearing itself. */
24852
+ autoRestore: boolean().default(false),
24853
+ /** What to do when the current light has no reference of its own. See
24854
+ * {@link SceneUncoveredPolicySchema} — the default makes night OPTIONAL. */
24855
+ onUncoveredCondition: SceneUncoveredPolicySchema.default(SCENE_DEFAULT_UNCOVERED_POLICY),
24856
+ /**
24857
+ * The light whose checks are currently being SAT OUT under
24858
+ * `onUncoveredCondition: 'skip'` — `null` when the scene is checking normally.
24859
+ *
24860
+ * Engine-reported and advisory only: it moves no verdict, no latch and no
24861
+ * hysteresis. It exists so the card can say *"night (IR) — checks paused,
24862
+ * nothing captured in this light"* in the same calm voice as the coverage
24863
+ * line, because the alternative is a scene that silently stops answering
24864
+ * after sunset with nothing anywhere saying why. A skipped check must never
24865
+ * read as a broken one.
24866
+ */
24867
+ suspendedCondition: SceneConditionSchema.nullable().default(null),
24868
+ /** Named cause when `verdict === 'unknown'`. */
24869
+ unavailable: SceneUnavailableSchema.nullable(),
24870
+ /** Conditions that have at least one comparable reference — the coverage line
24871
+ * ("day ✓ · ir ✓ · dusk ✗") that turns a silent fallback into a visible fact. */
24872
+ coveredConditions: array(SceneConditionSchema)
24047
24873
  });
24048
24874
  var SceneMonitorStatusSchema = object({
24049
24875
  monitors: array(SceneMonitorSchema),
@@ -24076,7 +24902,15 @@ DeviceType.Camera, method(object({ deviceId: number() }), SceneMonitorStatusSche
24076
24902
  "both"
24077
24903
  ]).optional(),
24078
24904
  checkIntervalSec: number().optional(),
24079
- check: SceneCheckSchema.optional()
24905
+ check: SceneCheckSchema.optional(),
24906
+ emit: _enum(["latched", "live"]).optional(),
24907
+ quietSeconds: number().int().min(0).max(3600).optional(),
24908
+ minObservationSpacingSec: number().int().min(0).max(3600).optional(),
24909
+ anchorThreshold: number().min(0).max(1).optional(),
24910
+ autoRestore: boolean().optional(),
24911
+ onUncoveredCondition: SceneUncoveredPolicySchema.optional(),
24912
+ /** `null` clears the vision-model adjudicator. */
24913
+ confirm: SceneConfirmSchema.nullable().optional()
24080
24914
  })
24081
24915
  }), _void(), {
24082
24916
  kind: "mutation",
@@ -24113,6 +24947,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), SceneMonitorStatusSche
24113
24947
  }), _void(), {
24114
24948
  kind: "mutation",
24115
24949
  auth: "admin"
24950
+ }), method(object({
24951
+ deviceId: number(),
24952
+ monitorId: string(),
24953
+ /** Defaults to TRUE at the provider seam — see `SCENE_RESET_RECAPTURES`. */
24954
+ recapture: boolean().optional()
24955
+ }), _void(), {
24956
+ kind: "mutation",
24957
+ auth: "admin"
24116
24958
  });
24117
24959
  /**
24118
24960
  * Per-stage gating mode applied to the zones a rule references.
@@ -24266,6 +25108,16 @@ var CamStreamDescriptorSchema = object({
24266
25108
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
24267
25109
  metadata: record(string(), unknown()).optional()
24268
25110
  });
25111
+ object({
25112
+ /** The descriptors as last built from a real camera response. Never a guess:
25113
+ * a failed or refused build writes NOTHING, so a restored catalog is always
25114
+ * one the camera itself once produced. */
25115
+ descriptors: array(CamStreamDescriptorSchema),
25116
+ /** Ms epoch of the build that produced {@link descriptors}. Lets the wake
25117
+ * path decide whether the camera's own awake window is worth spending on a
25118
+ * re-read. */
25119
+ lastFetchedAt: number()
25120
+ });
24269
25121
  DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), array(CamStreamDescriptorSchema).readonly());
24270
25122
  /** One of the camera's stream profiles. */
24271
25123
  var StreamProfileSchema = _enum([
@@ -24421,12 +25273,64 @@ var NetworkAddressSchema = object({
24421
25273
  family: string(),
24422
25274
  internal: boolean()
24423
25275
  });
25276
+ /**
25277
+ * Provenance of the site coordinates, and the whole reason this is not just two
25278
+ * numbers.
25279
+ *
25280
+ * - `operator-set` — a human typed it, or accepted a detection. Authoritative;
25281
+ * nothing overwrites it.
25282
+ * - `derived-from-ip` — the hub geolocated its own public IP once, because a
25283
+ * default that is right to a few kilometres beats the coarse UTC clock split
25284
+ * the sun-times consumers otherwise fall back to.
25285
+ *
25286
+ * The UI shows which one it is. An operator who cannot tell a guess from their
25287
+ * own input will eventually trust the guess.
25288
+ */
25289
+ var SiteLocationSourceSchema = _enum(["operator-set", "derived-from-ip"]);
25290
+ /**
25291
+ * The read shape: the location plus the honest state of the one-shot derivation.
25292
+ *
25293
+ * `derivationAttemptedAt` is what makes the "one call, ever" contract
25294
+ * inspectable. When it is set and `location` is null, the geo-IP lookup ran and
25295
+ * failed; the hub will NOT try again on its own — the fallback is declared
25296
+ * (consumers degrade to their own last resort) and the operator either types the
25297
+ * coordinates or presses detect.
25298
+ */
25299
+ var SiteLocationStatusSchema = object({
25300
+ location: object({
25301
+ /** WGS84 decimal degrees. */
25302
+ latitude: number().min(-90).max(90),
25303
+ longitude: number().min(-180).max(180),
25304
+ source: SiteLocationSourceSchema,
25305
+ /** Epoch ms the value was last written. */
25306
+ updatedAt: number(),
25307
+ /**
25308
+ * Human-readable place the geo-IP service reported ("Napoli, IT"). Display
25309
+ * only — never parsed, never matched on. Absent for an operator-typed value.
25310
+ */
25311
+ label: string().optional()
25312
+ }).nullable(),
25313
+ derivationAttemptedAt: number().nullable(),
25314
+ /** Why the last derivation failed, for the UI to show instead of a shrug. */
25315
+ derivationError: string().nullable()
25316
+ });
25317
+ /** `null` clears the location and re-arms nothing — the derivation stays spent. */
25318
+ var SetSiteLocationInputSchema = object({
25319
+ latitude: number().min(-90).max(90),
25320
+ longitude: number().min(-180).max(180)
25321
+ }).nullable();
24424
25322
  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(), {
24425
25323
  kind: "mutation",
24426
25324
  auth: "admin"
24427
25325
  }), method(_void(), _void(), {
24428
25326
  kind: "mutation",
24429
25327
  auth: "admin"
25328
+ }), method(_void(), SiteLocationStatusSchema), method(SetSiteLocationInputSchema, SiteLocationStatusSchema, {
25329
+ kind: "mutation",
25330
+ auth: "admin"
25331
+ }), method(_void(), SiteLocationStatusSchema, {
25332
+ kind: "mutation",
25333
+ auth: "admin"
24430
25334
  });
24431
25335
  object({
24432
25336
  /** True when the device's tamper switch / case-open contact is
@@ -25355,6 +26259,15 @@ var BaseDeviceProvider = class extends BaseAddon {
25355
26259
  labels: ["probe not implemented"]
25356
26260
  };
25357
26261
  }
26262
+ /**
26263
+ * Top-level devices restored at once in {@link onRestoreDevices}.
26264
+ *
26265
+ * Four covers the fleets this ships to without turning a boot into a burst a
26266
+ * camera NVR answers with a refusal. A provider whose upstream is a single
26267
+ * session with a serial command channel (a Baichuan hub, an NVR that
26268
+ * serialises ISAPI) should lower it; nothing needs to raise it.
26269
+ */
26270
+ restoreConcurrency = 4;
25358
26271
  async restoreDevices(savedDevices) {
25359
26272
  await this.onRestoreDevices(savedDevices);
25360
26273
  if (savedDevices.length > 0) this.ctx.logger.info(`Restored ${savedDevices.length} ${this.providerName} device(s)`);
@@ -25386,15 +26299,15 @@ var BaseDeviceProvider = class extends BaseAddon {
25386
26299
  */
25387
26300
  async onRestoreDevices(savedDevices) {
25388
26301
  const restored = /* @__PURE__ */ new Set();
25389
- for (const saved of savedDevices) {
25390
- if (saved.parentDeviceId !== null) continue;
26302
+ const topLevel = savedDevices.filter((saved) => saved.parentDeviceId === null);
26303
+ const restoreOne = async (saved) => {
25391
26304
  const Class = this.deviceClasses[saved.type];
25392
26305
  if (!Class) {
25393
26306
  this.ctx.logger.warn("No device class registered for restored type — skipping", {
25394
26307
  tags: { stableId: saved.stableId },
25395
26308
  meta: { type: saved.type }
25396
26309
  });
25397
- continue;
26310
+ return;
25398
26311
  }
25399
26312
  try {
25400
26313
  await this.ctx.kernel.devices.create(saved.stableId, Class, {});
@@ -25408,7 +26321,15 @@ var BaseDeviceProvider = class extends BaseAddon {
25408
26321
  }
25409
26322
  });
25410
26323
  }
25411
- }
26324
+ };
26325
+ let nextTopLevel = 0;
26326
+ await Promise.all(Array.from({ length: Math.min(Math.max(1, this.restoreConcurrency), topLevel.length) }, async () => {
26327
+ for (;;) {
26328
+ const saved = topLevel[nextTopLevel++];
26329
+ if (saved === void 0) return;
26330
+ await restoreOne(saved);
26331
+ }
26332
+ }));
25412
26333
  const childRows = savedDevices.filter((s) => s.parentDeviceId !== null);
25413
26334
  for (const saved of childRows) {
25414
26335
  const Class = this.deviceClasses[saved.type];
@@ -27565,6 +28486,12 @@ Object.freeze({
27565
28486
  addonId: null,
27566
28487
  access: "create"
27567
28488
  },
28489
+ "llm.cancel": {
28490
+ capName: "llm",
28491
+ capScope: "system",
28492
+ addonId: null,
28493
+ access: "create"
28494
+ },
27568
28495
  "llm.deleteModel": {
27569
28496
  capName: "llm",
27570
28497
  capScope: "system",
@@ -27649,6 +28576,12 @@ Object.freeze({
27649
28576
  addonId: null,
27650
28577
  access: "view"
27651
28578
  },
28579
+ "llm.resolveModelRef": {
28580
+ capName: "llm",
28581
+ capScope: "system",
28582
+ addonId: null,
28583
+ access: "create"
28584
+ },
27652
28585
  "llm.setDefault": {
27653
28586
  capName: "llm",
27654
28587
  capScope: "system",
@@ -29815,6 +30748,12 @@ Object.freeze({
29815
30748
  addonId: null,
29816
30749
  access: "create"
29817
30750
  },
30751
+ "sceneMonitor.resetScene": {
30752
+ capName: "scene-monitor",
30753
+ capScope: "device",
30754
+ addonId: null,
30755
+ access: "delete"
30756
+ },
29818
30757
  "sceneMonitor.updateScene": {
29819
30758
  capName: "scene-monitor",
29820
30759
  capScope: "device",
@@ -30493,6 +31432,12 @@ Object.freeze({
30493
31432
  addonId: null,
30494
31433
  access: "create"
30495
31434
  },
31435
+ "system.detectSiteLocation": {
31436
+ capName: "system",
31437
+ capScope: "system",
31438
+ addonId: null,
31439
+ access: "create"
31440
+ },
30496
31441
  "system.featureFlags": {
30497
31442
  capName: "system",
30498
31443
  capScope: "system",
@@ -30511,6 +31456,12 @@ Object.freeze({
30511
31456
  addonId: null,
30512
31457
  access: "view"
30513
31458
  },
31459
+ "system.getSiteLocation": {
31460
+ capName: "system",
31461
+ capScope: "system",
31462
+ addonId: null,
31463
+ access: "view"
31464
+ },
30514
31465
  "system.health": {
30515
31466
  capName: "system",
30516
31467
  capScope: "system",
@@ -30535,6 +31486,12 @@ Object.freeze({
30535
31486
  addonId: null,
30536
31487
  access: "create"
30537
31488
  },
31489
+ "system.setSiteLocation": {
31490
+ capName: "system",
31491
+ capScope: "system",
31492
+ addonId: null,
31493
+ access: "create"
31494
+ },
30538
31495
  "terminalSession.adoptLegacyMonitor": {
30539
31496
  capName: "terminal-session",
30540
31497
  capScope: "system",
@@ -31106,6 +32063,1704 @@ Object.freeze({
31106
32063
  access: "create"
31107
32064
  }
31108
32065
  });
32066
+ Object.freeze({
32067
+ "accessories.setChildHidden": [{
32068
+ name: "childDeviceId",
32069
+ form: "single",
32070
+ optional: false
32071
+ }, {
32072
+ name: "deviceId",
32073
+ form: "single",
32074
+ optional: false
32075
+ }],
32076
+ "addonSettings.getDeviceSettings": [{
32077
+ name: "deviceId",
32078
+ form: "single",
32079
+ optional: false
32080
+ }],
32081
+ "addonSettings.updateDeviceSettings": [{
32082
+ name: "deviceId",
32083
+ form: "single",
32084
+ optional: false
32085
+ }],
32086
+ "alarmPanel.arm": [{
32087
+ name: "deviceId",
32088
+ form: "single",
32089
+ optional: false
32090
+ }],
32091
+ "alarmPanel.disarm": [{
32092
+ name: "deviceId",
32093
+ form: "single",
32094
+ optional: false
32095
+ }],
32096
+ "alarmPanel.trigger": [{
32097
+ name: "deviceId",
32098
+ form: "single",
32099
+ optional: false
32100
+ }],
32101
+ "audioAnalysis.resolveDeviceSettings": [{
32102
+ name: "deviceId",
32103
+ form: "single",
32104
+ optional: false
32105
+ }],
32106
+ "audioAnalyzer.classify": [{
32107
+ name: "deviceId",
32108
+ form: "single",
32109
+ optional: true
32110
+ }],
32111
+ "audioMetrics.getCurrentSnapshot": [{
32112
+ name: "deviceId",
32113
+ form: "single",
32114
+ optional: false
32115
+ }],
32116
+ "audioMetrics.getHistory": [{
32117
+ name: "deviceId",
32118
+ form: "single",
32119
+ optional: false
32120
+ }],
32121
+ "automationControl.disable": [{
32122
+ name: "deviceId",
32123
+ form: "single",
32124
+ optional: false
32125
+ }],
32126
+ "automationControl.enable": [{
32127
+ name: "deviceId",
32128
+ form: "single",
32129
+ optional: false
32130
+ }],
32131
+ "automationControl.trigger": [{
32132
+ name: "deviceId",
32133
+ form: "single",
32134
+ optional: false
32135
+ }],
32136
+ "battery.wakeForStream": [{
32137
+ name: "deviceId",
32138
+ form: "single",
32139
+ optional: false
32140
+ }],
32141
+ "brightness.setBrightness": [{
32142
+ name: "deviceId",
32143
+ form: "single",
32144
+ optional: false
32145
+ }],
32146
+ "button.press": [{
32147
+ name: "deviceId",
32148
+ form: "single",
32149
+ optional: false
32150
+ }],
32151
+ "cameraCredentials.getCredentials": [{
32152
+ name: "deviceId",
32153
+ form: "single",
32154
+ optional: false
32155
+ }],
32156
+ "cameraStreams.getBrokerStreams": [{
32157
+ name: "deviceId",
32158
+ form: "single",
32159
+ optional: false
32160
+ }],
32161
+ "cameraStreams.getCameraStreams": [{
32162
+ name: "deviceId",
32163
+ form: "single",
32164
+ optional: false
32165
+ }],
32166
+ "cameraStreams.getProfileRtspEntries": [{
32167
+ name: "deviceId",
32168
+ form: "single",
32169
+ optional: false
32170
+ }],
32171
+ "cameraStreams.getRtspEntries": [{
32172
+ name: "deviceId",
32173
+ form: "single",
32174
+ optional: false
32175
+ }],
32176
+ "cameraStreams.pickStream": [{
32177
+ name: "deviceId",
32178
+ form: "single",
32179
+ optional: false
32180
+ }],
32181
+ "climateControl.setFanMode": [{
32182
+ name: "deviceId",
32183
+ form: "single",
32184
+ optional: false
32185
+ }],
32186
+ "climateControl.setMode": [{
32187
+ name: "deviceId",
32188
+ form: "single",
32189
+ optional: false
32190
+ }],
32191
+ "climateControl.setPreset": [{
32192
+ name: "deviceId",
32193
+ form: "single",
32194
+ optional: false
32195
+ }],
32196
+ "climateControl.setSwingHorizontal": [{
32197
+ name: "deviceId",
32198
+ form: "single",
32199
+ optional: false
32200
+ }],
32201
+ "climateControl.setSwingVertical": [{
32202
+ name: "deviceId",
32203
+ form: "single",
32204
+ optional: false
32205
+ }],
32206
+ "climateControl.setTarget": [{
32207
+ name: "deviceId",
32208
+ form: "single",
32209
+ optional: false
32210
+ }],
32211
+ "climateControl.setTargetHumidity": [{
32212
+ name: "deviceId",
32213
+ form: "single",
32214
+ optional: false
32215
+ }],
32216
+ "climateControl.setTargetRange": [{
32217
+ name: "deviceId",
32218
+ form: "single",
32219
+ optional: false
32220
+ }],
32221
+ "color.setColor": [{
32222
+ name: "deviceId",
32223
+ form: "single",
32224
+ optional: false
32225
+ }],
32226
+ "consumables.reset": [{
32227
+ name: "deviceId",
32228
+ form: "single",
32229
+ optional: false
32230
+ }],
32231
+ "control.setValue": [{
32232
+ name: "deviceId",
32233
+ form: "single",
32234
+ optional: false
32235
+ }],
32236
+ "cover.close": [{
32237
+ name: "deviceId",
32238
+ form: "single",
32239
+ optional: false
32240
+ }],
32241
+ "cover.open": [{
32242
+ name: "deviceId",
32243
+ form: "single",
32244
+ optional: false
32245
+ }],
32246
+ "cover.setPosition": [{
32247
+ name: "deviceId",
32248
+ form: "single",
32249
+ optional: false
32250
+ }],
32251
+ "cover.setTiltPosition": [{
32252
+ name: "deviceId",
32253
+ form: "single",
32254
+ optional: false
32255
+ }],
32256
+ "cover.stop": [{
32257
+ name: "deviceId",
32258
+ form: "single",
32259
+ optional: false
32260
+ }],
32261
+ "dayNight.getOptions": [{
32262
+ name: "deviceId",
32263
+ form: "single",
32264
+ optional: false
32265
+ }],
32266
+ "dayNight.setSettings": [{
32267
+ name: "deviceId",
32268
+ form: "single",
32269
+ optional: false
32270
+ }],
32271
+ "decoder.createSession": [{
32272
+ name: "deviceId",
32273
+ form: "single",
32274
+ optional: true
32275
+ }],
32276
+ "deviceAdoption.release": [{
32277
+ name: "camDeviceId",
32278
+ form: "single",
32279
+ optional: false
32280
+ }],
32281
+ "deviceAdoption.resync": [{
32282
+ name: "camDeviceId",
32283
+ form: "single",
32284
+ optional: false
32285
+ }],
32286
+ "deviceDiscovery.adoptDevice": [{
32287
+ name: "deviceId",
32288
+ form: "single",
32289
+ optional: false
32290
+ }],
32291
+ "deviceDiscovery.listDiscovered": [{
32292
+ name: "deviceId",
32293
+ form: "single",
32294
+ optional: false
32295
+ }],
32296
+ "deviceDiscovery.refreshDiscovery": [{
32297
+ name: "deviceId",
32298
+ form: "single",
32299
+ optional: false
32300
+ }],
32301
+ "deviceDiscovery.releaseDevice": [{
32302
+ name: "childDeviceId",
32303
+ form: "single",
32304
+ optional: false
32305
+ }, {
32306
+ name: "deviceId",
32307
+ form: "single",
32308
+ optional: false
32309
+ }],
32310
+ "deviceManager.adoptionRelease": [{
32311
+ name: "camDeviceId",
32312
+ form: "single",
32313
+ optional: false
32314
+ }],
32315
+ "deviceManager.adoptionResync": [{
32316
+ name: "camDeviceId",
32317
+ form: "single",
32318
+ optional: false
32319
+ }],
32320
+ "deviceManager.applyInitialMeta": [{
32321
+ name: "deviceId",
32322
+ form: "single",
32323
+ optional: false
32324
+ }, {
32325
+ name: "linkDeviceId",
32326
+ form: "single",
32327
+ optional: true
32328
+ }],
32329
+ "deviceManager.disable": [{
32330
+ name: "deviceId",
32331
+ form: "single",
32332
+ optional: false
32333
+ }],
32334
+ "deviceManager.enable": [{
32335
+ name: "deviceId",
32336
+ form: "single",
32337
+ optional: false
32338
+ }],
32339
+ "deviceManager.getBindings": [{
32340
+ name: "deviceId",
32341
+ form: "single",
32342
+ optional: false
32343
+ }],
32344
+ "deviceManager.getChildren": [{
32345
+ name: "parentDeviceId",
32346
+ form: "single",
32347
+ optional: false
32348
+ }],
32349
+ "deviceManager.getConfigSchema": [{
32350
+ name: "deviceId",
32351
+ form: "single",
32352
+ optional: false
32353
+ }],
32354
+ "deviceManager.getDevice": [{
32355
+ name: "deviceId",
32356
+ form: "single",
32357
+ optional: false
32358
+ }],
32359
+ "deviceManager.getDeviceAggregate": [{
32360
+ name: "deviceId",
32361
+ form: "single",
32362
+ optional: false
32363
+ }],
32364
+ "deviceManager.getDeviceLiveInfoAggregate": [{
32365
+ name: "deviceId",
32366
+ form: "single",
32367
+ optional: false
32368
+ }],
32369
+ "deviceManager.getDeviceSettingsAggregate": [{
32370
+ name: "deviceId",
32371
+ form: "single",
32372
+ optional: false
32373
+ }],
32374
+ "deviceManager.getDeviceStatusAggregate": [{
32375
+ name: "deviceId",
32376
+ form: "single",
32377
+ optional: false
32378
+ }],
32379
+ "deviceManager.getDeviceStatusAggregateBatch": [{
32380
+ name: "deviceIds",
32381
+ form: "array",
32382
+ optional: false
32383
+ }],
32384
+ "deviceManager.getLinkedDevices": [{
32385
+ name: "deviceId",
32386
+ form: "single",
32387
+ optional: false
32388
+ }],
32389
+ "deviceManager.getSettingsSchema": [{
32390
+ name: "deviceId",
32391
+ form: "single",
32392
+ optional: false
32393
+ }],
32394
+ "deviceManager.getStreamProfileMap": [{
32395
+ name: "deviceId",
32396
+ form: "single",
32397
+ optional: false
32398
+ }],
32399
+ "deviceManager.getStreamSources": [{
32400
+ name: "deviceId",
32401
+ form: "single",
32402
+ optional: false
32403
+ }],
32404
+ "deviceManager.getWireableFields": [{
32405
+ name: "deviceId",
32406
+ form: "single",
32407
+ optional: false
32408
+ }],
32409
+ "deviceManager.loadConfig": [{
32410
+ name: "deviceId",
32411
+ form: "single",
32412
+ optional: false
32413
+ }],
32414
+ "deviceManager.loadMeta": [{
32415
+ name: "deviceId",
32416
+ form: "single",
32417
+ optional: false
32418
+ }],
32419
+ "deviceManager.loadRuntimeState": [{
32420
+ name: "deviceId",
32421
+ form: "single",
32422
+ optional: false
32423
+ }],
32424
+ "deviceManager.persistConfig": [{
32425
+ name: "deviceId",
32426
+ form: "single",
32427
+ optional: false
32428
+ }],
32429
+ "deviceManager.probeStreams": [{
32430
+ name: "deviceId",
32431
+ form: "single",
32432
+ optional: false
32433
+ }],
32434
+ "deviceManager.registerDevice": [{
32435
+ name: "parentDeviceId",
32436
+ form: "single",
32437
+ optional: true
32438
+ }],
32439
+ "deviceManager.remove": [{
32440
+ name: "deviceId",
32441
+ form: "single",
32442
+ optional: false
32443
+ }],
32444
+ "deviceManager.removeDevice": [{
32445
+ name: "deviceId",
32446
+ form: "single",
32447
+ optional: false
32448
+ }],
32449
+ "deviceManager.runDeviceAction": [{
32450
+ name: "deviceId",
32451
+ form: "single",
32452
+ optional: false
32453
+ }],
32454
+ "deviceManager.setChildLayout": [{
32455
+ name: "deviceId",
32456
+ form: "single",
32457
+ optional: false
32458
+ }],
32459
+ "deviceManager.setDisabled": [{
32460
+ name: "deviceId",
32461
+ form: "single",
32462
+ optional: false
32463
+ }],
32464
+ "deviceManager.setDisplay": [{
32465
+ name: "deviceId",
32466
+ form: "single",
32467
+ optional: false
32468
+ }],
32469
+ "deviceManager.setIntegrationId": [{
32470
+ name: "deviceId",
32471
+ form: "single",
32472
+ optional: false
32473
+ }],
32474
+ "deviceManager.setLinkDeviceId": [{
32475
+ name: "deviceId",
32476
+ form: "single",
32477
+ optional: false
32478
+ }, {
32479
+ name: "linkDeviceId",
32480
+ form: "single",
32481
+ optional: true
32482
+ }],
32483
+ "deviceManager.setLocation": [{
32484
+ name: "deviceId",
32485
+ form: "single",
32486
+ optional: false
32487
+ }],
32488
+ "deviceManager.setMetadata": [{
32489
+ name: "deviceId",
32490
+ form: "single",
32491
+ optional: false
32492
+ }],
32493
+ "deviceManager.setName": [{
32494
+ name: "deviceId",
32495
+ form: "single",
32496
+ optional: false
32497
+ }],
32498
+ "deviceManager.setPrimaryChildEntityId": [{
32499
+ name: "deviceId",
32500
+ form: "single",
32501
+ optional: false
32502
+ }],
32503
+ "deviceManager.setRole": [{
32504
+ name: "deviceId",
32505
+ form: "single",
32506
+ optional: false
32507
+ }],
32508
+ "deviceManager.setStreamProfileMap": [{
32509
+ name: "deviceId",
32510
+ form: "single",
32511
+ optional: false
32512
+ }],
32513
+ "deviceManager.setType": [{
32514
+ name: "deviceId",
32515
+ form: "single",
32516
+ optional: false
32517
+ }],
32518
+ "deviceManager.setWrapperActive": [{
32519
+ name: "deviceId",
32520
+ form: "single",
32521
+ optional: false
32522
+ }],
32523
+ "deviceManager.testField": [{
32524
+ name: "deviceId",
32525
+ form: "single",
32526
+ optional: false
32527
+ }],
32528
+ "deviceManager.updateConfig": [{
32529
+ name: "deviceId",
32530
+ form: "single",
32531
+ optional: false
32532
+ }],
32533
+ "deviceManager.updateDeviceField": [{
32534
+ name: "deviceId",
32535
+ form: "single",
32536
+ optional: false
32537
+ }],
32538
+ "deviceManager.updateDeviceFieldsBatch": [{
32539
+ name: "deviceId",
32540
+ form: "single",
32541
+ optional: false
32542
+ }],
32543
+ "deviceOps.getConfigEntries": [{
32544
+ name: "deviceId",
32545
+ form: "single",
32546
+ optional: false
32547
+ }],
32548
+ "deviceOps.getRawState": [{
32549
+ name: "deviceId",
32550
+ form: "single",
32551
+ optional: false
32552
+ }],
32553
+ "deviceOps.getSettingsSchema": [{
32554
+ name: "deviceId",
32555
+ form: "single",
32556
+ optional: false
32557
+ }],
32558
+ "deviceOps.getStreamSources": [{
32559
+ name: "deviceId",
32560
+ form: "single",
32561
+ optional: false
32562
+ }],
32563
+ "deviceOps.removeDevice": [{
32564
+ name: "deviceId",
32565
+ form: "single",
32566
+ optional: false
32567
+ }],
32568
+ "deviceOps.runAction": [{
32569
+ name: "deviceId",
32570
+ form: "single",
32571
+ optional: false
32572
+ }],
32573
+ "deviceOps.setConfig": [{
32574
+ name: "deviceId",
32575
+ form: "single",
32576
+ optional: false
32577
+ }],
32578
+ "deviceState.getCapSlice": [{
32579
+ name: "deviceId",
32580
+ form: "single",
32581
+ optional: false
32582
+ }],
32583
+ "deviceState.getSnapshot": [{
32584
+ name: "deviceId",
32585
+ form: "single",
32586
+ optional: false
32587
+ }],
32588
+ "deviceState.setCapSlice": [{
32589
+ name: "deviceId",
32590
+ form: "single",
32591
+ optional: false
32592
+ }],
32593
+ "events.getEventClipUrl": [{
32594
+ name: "deviceId",
32595
+ form: "single",
32596
+ optional: false
32597
+ }],
32598
+ "events.getEvents": [{
32599
+ name: "deviceId",
32600
+ form: "single",
32601
+ optional: false
32602
+ }],
32603
+ "events.getEventThumbnail": [{
32604
+ name: "deviceId",
32605
+ form: "single",
32606
+ optional: false
32607
+ }],
32608
+ "faceGallery.getFaceByTrack": [{
32609
+ name: "deviceId",
32610
+ form: "single",
32611
+ optional: false
32612
+ }],
32613
+ "faceGallery.listRecentFaces": [{
32614
+ name: "deviceId",
32615
+ form: "single",
32616
+ optional: true
32617
+ }],
32618
+ "fanControl.setDirection": [{
32619
+ name: "deviceId",
32620
+ form: "single",
32621
+ optional: false
32622
+ }],
32623
+ "fanControl.setOscillating": [{
32624
+ name: "deviceId",
32625
+ form: "single",
32626
+ optional: false
32627
+ }],
32628
+ "fanControl.setPercentage": [{
32629
+ name: "deviceId",
32630
+ form: "single",
32631
+ optional: false
32632
+ }],
32633
+ "fanControl.setPreset": [{
32634
+ name: "deviceId",
32635
+ form: "single",
32636
+ optional: false
32637
+ }],
32638
+ "humidifier.setMode": [{
32639
+ name: "deviceId",
32640
+ form: "single",
32641
+ optional: false
32642
+ }],
32643
+ "humidifier.setOn": [{
32644
+ name: "deviceId",
32645
+ form: "single",
32646
+ optional: false
32647
+ }],
32648
+ "humidifier.setTargetHumidity": [{
32649
+ name: "deviceId",
32650
+ form: "single",
32651
+ optional: false
32652
+ }],
32653
+ "imageSettings.getOptions": [{
32654
+ name: "deviceId",
32655
+ form: "single",
32656
+ optional: false
32657
+ }],
32658
+ "imageSettings.setSettings": [{
32659
+ name: "deviceId",
32660
+ form: "single",
32661
+ optional: false
32662
+ }],
32663
+ "intercom.endTalkSession": [{
32664
+ name: "deviceId",
32665
+ form: "single",
32666
+ optional: false
32667
+ }],
32668
+ "intercom.handleAnswer": [{
32669
+ name: "deviceId",
32670
+ form: "single",
32671
+ optional: false
32672
+ }],
32673
+ "intercom.pushTalkAudio": [{
32674
+ name: "deviceId",
32675
+ form: "single",
32676
+ optional: false
32677
+ }],
32678
+ "intercom.startSession": [{
32679
+ name: "deviceId",
32680
+ form: "single",
32681
+ optional: false
32682
+ }],
32683
+ "intercom.startTalkSession": [{
32684
+ name: "deviceId",
32685
+ form: "single",
32686
+ optional: false
32687
+ }],
32688
+ "intercom.stopSession": [{
32689
+ name: "deviceId",
32690
+ form: "single",
32691
+ optional: false
32692
+ }],
32693
+ "lawnMowerControl.dock": [{
32694
+ name: "deviceId",
32695
+ form: "single",
32696
+ optional: false
32697
+ }],
32698
+ "lawnMowerControl.pause": [{
32699
+ name: "deviceId",
32700
+ form: "single",
32701
+ optional: false
32702
+ }],
32703
+ "lawnMowerControl.startMowing": [{
32704
+ name: "deviceId",
32705
+ form: "single",
32706
+ optional: false
32707
+ }],
32708
+ "lockControl.lock": [{
32709
+ name: "deviceId",
32710
+ form: "single",
32711
+ optional: false
32712
+ }],
32713
+ "lockControl.open": [{
32714
+ name: "deviceId",
32715
+ form: "single",
32716
+ optional: false
32717
+ }],
32718
+ "lockControl.unlock": [{
32719
+ name: "deviceId",
32720
+ form: "single",
32721
+ optional: false
32722
+ }],
32723
+ "mediaPlayer.next": [{
32724
+ name: "deviceId",
32725
+ form: "single",
32726
+ optional: false
32727
+ }],
32728
+ "mediaPlayer.pause": [{
32729
+ name: "deviceId",
32730
+ form: "single",
32731
+ optional: false
32732
+ }],
32733
+ "mediaPlayer.play": [{
32734
+ name: "deviceId",
32735
+ form: "single",
32736
+ optional: false
32737
+ }],
32738
+ "mediaPlayer.playMedia": [{
32739
+ name: "deviceId",
32740
+ form: "single",
32741
+ optional: false
32742
+ }],
32743
+ "mediaPlayer.previous": [{
32744
+ name: "deviceId",
32745
+ form: "single",
32746
+ optional: false
32747
+ }],
32748
+ "mediaPlayer.seek": [{
32749
+ name: "deviceId",
32750
+ form: "single",
32751
+ optional: false
32752
+ }],
32753
+ "mediaPlayer.selectSource": [{
32754
+ name: "deviceId",
32755
+ form: "single",
32756
+ optional: false
32757
+ }],
32758
+ "mediaPlayer.setMute": [{
32759
+ name: "deviceId",
32760
+ form: "single",
32761
+ optional: false
32762
+ }],
32763
+ "mediaPlayer.setRepeat": [{
32764
+ name: "deviceId",
32765
+ form: "single",
32766
+ optional: false
32767
+ }],
32768
+ "mediaPlayer.setShuffle": [{
32769
+ name: "deviceId",
32770
+ form: "single",
32771
+ optional: false
32772
+ }],
32773
+ "mediaPlayer.setVolume": [{
32774
+ name: "deviceId",
32775
+ form: "single",
32776
+ optional: false
32777
+ }],
32778
+ "mediaPlayer.stop": [{
32779
+ name: "deviceId",
32780
+ form: "single",
32781
+ optional: false
32782
+ }],
32783
+ "motion.isDetected": [{
32784
+ name: "deviceId",
32785
+ form: "single",
32786
+ optional: false
32787
+ }],
32788
+ "motionDetection.analyze": [{
32789
+ name: "deviceId",
32790
+ form: "single",
32791
+ optional: false
32792
+ }],
32793
+ "motionDetection.removeCamera": [{
32794
+ name: "deviceId",
32795
+ form: "single",
32796
+ optional: false
32797
+ }],
32798
+ "motionTrigger.setMotionTrigger": [{
32799
+ name: "deviceId",
32800
+ form: "single",
32801
+ optional: false
32802
+ }],
32803
+ "motionZones.getOptions": [{
32804
+ name: "deviceId",
32805
+ form: "single",
32806
+ optional: false
32807
+ }],
32808
+ "motionZones.setZone": [{
32809
+ name: "deviceId",
32810
+ form: "single",
32811
+ optional: false
32812
+ }],
32813
+ "nativeObjectDetection.setEnabled": [{
32814
+ name: "deviceId",
32815
+ form: "single",
32816
+ optional: false
32817
+ }],
32818
+ "networkQuality.getDeviceStats": [{
32819
+ name: "deviceId",
32820
+ form: "single",
32821
+ optional: false
32822
+ }],
32823
+ "networkQuality.reportClientStats": [{
32824
+ name: "deviceId",
32825
+ form: "single",
32826
+ optional: false
32827
+ }],
32828
+ "notificationRules.setDeviceMuted": [{
32829
+ name: "deviceId",
32830
+ form: "single",
32831
+ optional: false
32832
+ }],
32833
+ "notifier.cancel": [{
32834
+ name: "deviceId",
32835
+ form: "single",
32836
+ optional: false
32837
+ }],
32838
+ "notifier.send": [{
32839
+ name: "deviceId",
32840
+ form: "single",
32841
+ optional: false
32842
+ }],
32843
+ "osd.setOverlay": [{
32844
+ name: "deviceId",
32845
+ form: "single",
32846
+ optional: false
32847
+ }],
32848
+ "osdManager.clearSlotBinding": [{
32849
+ name: "deviceId",
32850
+ form: "single",
32851
+ optional: false
32852
+ }],
32853
+ "osdManager.copyDeviceConfiguration": [{
32854
+ name: "sourceDeviceId",
32855
+ form: "single",
32856
+ optional: false
32857
+ }, {
32858
+ name: "targetDeviceId",
32859
+ form: "single",
32860
+ optional: false
32861
+ }],
32862
+ "osdManager.getDeviceOsd": [{
32863
+ name: "deviceId",
32864
+ form: "single",
32865
+ optional: false
32866
+ }],
32867
+ "osdManager.getSourceCatalog": [{
32868
+ name: "deviceId",
32869
+ form: "single",
32870
+ optional: false
32871
+ }],
32872
+ "osdManager.previewSlot": [{
32873
+ name: "deviceId",
32874
+ form: "single",
32875
+ optional: false
32876
+ }],
32877
+ "osdManager.renderDevice": [{
32878
+ name: "deviceId",
32879
+ form: "single",
32880
+ optional: false
32881
+ }],
32882
+ "osdManager.setSlotBinding": [{
32883
+ name: "deviceId",
32884
+ form: "single",
32885
+ optional: false
32886
+ }],
32887
+ "petFeeder.callPet": [{
32888
+ name: "deviceId",
32889
+ form: "single",
32890
+ optional: false
32891
+ }],
32892
+ "petFeeder.cancelFeed": [{
32893
+ name: "deviceId",
32894
+ form: "single",
32895
+ optional: false
32896
+ }],
32897
+ "petFeeder.feed": [{
32898
+ name: "deviceId",
32899
+ form: "single",
32900
+ optional: false
32901
+ }],
32902
+ "petFeeder.markFoodReplenished": [{
32903
+ name: "deviceId",
32904
+ form: "single",
32905
+ optional: false
32906
+ }],
32907
+ "petFeeder.playSound": [{
32908
+ name: "deviceId",
32909
+ form: "single",
32910
+ optional: false
32911
+ }],
32912
+ "petFeeder.resetDesiccant": [{
32913
+ name: "deviceId",
32914
+ form: "single",
32915
+ optional: false
32916
+ }],
32917
+ "petFeeder.setChildLock": [{
32918
+ name: "deviceId",
32919
+ form: "single",
32920
+ optional: false
32921
+ }],
32922
+ "petFeeder.setFeedSound": [{
32923
+ name: "deviceId",
32924
+ form: "single",
32925
+ optional: false
32926
+ }],
32927
+ "petFeeder.setIndicatorLight": [{
32928
+ name: "deviceId",
32929
+ form: "single",
32930
+ optional: false
32931
+ }],
32932
+ "petFeeder.setVolume": [{
32933
+ name: "deviceId",
32934
+ form: "single",
32935
+ optional: false
32936
+ }],
32937
+ "pipelineAnalytics.clearTracks": [{
32938
+ name: "deviceId",
32939
+ form: "single",
32940
+ optional: false
32941
+ }],
32942
+ "pipelineAnalytics.completeRetrainTrack": [{
32943
+ name: "deviceId",
32944
+ form: "single",
32945
+ optional: false
32946
+ }],
32947
+ "pipelineAnalytics.deleteDeviceEvents": [{
32948
+ name: "deviceId",
32949
+ form: "single",
32950
+ optional: false
32951
+ }],
32952
+ "pipelineAnalytics.deleteTracks": [{
32953
+ name: "deviceId",
32954
+ form: "single",
32955
+ optional: false
32956
+ }],
32957
+ "pipelineAnalytics.deselectRetrainFrame": [{
32958
+ name: "deviceId",
32959
+ form: "single",
32960
+ optional: false
32961
+ }],
32962
+ "pipelineAnalytics.getActiveTracks": [{
32963
+ name: "deviceId",
32964
+ form: "single",
32965
+ optional: false
32966
+ }],
32967
+ "pipelineAnalytics.getAudioEvents": [{
32968
+ name: "deviceId",
32969
+ form: "single",
32970
+ optional: false
32971
+ }],
32972
+ "pipelineAnalytics.getEventDensity": [{
32973
+ name: "deviceId",
32974
+ form: "single",
32975
+ optional: false
32976
+ }],
32977
+ "pipelineAnalytics.getEventMedia": [{
32978
+ name: "deviceId",
32979
+ form: "single",
32980
+ optional: false
32981
+ }],
32982
+ "pipelineAnalytics.getKeyEvents": [{
32983
+ name: "deviceId",
32984
+ form: "single",
32985
+ optional: false
32986
+ }],
32987
+ "pipelineAnalytics.getMotionEvents": [{
32988
+ name: "deviceId",
32989
+ form: "single",
32990
+ optional: false
32991
+ }],
32992
+ "pipelineAnalytics.getObjectEvents": [{
32993
+ name: "deviceId",
32994
+ form: "single",
32995
+ optional: false
32996
+ }],
32997
+ "pipelineAnalytics.getRetrainExportUrl": [{
32998
+ name: "deviceIds",
32999
+ form: "array",
33000
+ optional: true
33001
+ }],
33002
+ "pipelineAnalytics.getSensorEvents": [{
33003
+ name: "deviceId",
33004
+ form: "single",
33005
+ optional: false
33006
+ }],
33007
+ "pipelineAnalytics.getTrack": [{
33008
+ name: "deviceId",
33009
+ form: "single",
33010
+ optional: false
33011
+ }],
33012
+ "pipelineAnalytics.getTrackMedia": [{
33013
+ name: "deviceId",
33014
+ form: "single",
33015
+ optional: false
33016
+ }],
33017
+ "pipelineAnalytics.getTrainingExportSummary": [{
33018
+ name: "deviceIds",
33019
+ form: "array",
33020
+ optional: true
33021
+ }],
33022
+ "pipelineAnalytics.getTrainingExportUrl": [{
33023
+ name: "deviceIds",
33024
+ form: "array",
33025
+ optional: true
33026
+ }],
33027
+ "pipelineAnalytics.listEventKinds": [{
33028
+ name: "deviceId",
33029
+ form: "single",
33030
+ optional: false
33031
+ }],
33032
+ "pipelineAnalytics.listEventKindsBatch": [{
33033
+ name: "deviceIds",
33034
+ form: "array",
33035
+ optional: false
33036
+ }],
33037
+ "pipelineAnalytics.listOpsLog": [{
33038
+ name: "deviceId",
33039
+ form: "single",
33040
+ optional: true
33041
+ }],
33042
+ "pipelineAnalytics.listRecentTracks": [{
33043
+ name: "deviceIds",
33044
+ form: "array",
33045
+ optional: false
33046
+ }],
33047
+ "pipelineAnalytics.listRetrainStaging": [{
33048
+ name: "deviceIds",
33049
+ form: "array",
33050
+ optional: true
33051
+ }],
33052
+ "pipelineAnalytics.listTrackMedia": [{
33053
+ name: "deviceId",
33054
+ form: "single",
33055
+ optional: false
33056
+ }],
33057
+ "pipelineAnalytics.listTracks": [{
33058
+ name: "deviceId",
33059
+ form: "single",
33060
+ optional: false
33061
+ }],
33062
+ "pipelineAnalytics.proposeRetrainAnnotations": [{
33063
+ name: "deviceId",
33064
+ form: "single",
33065
+ optional: false
33066
+ }],
33067
+ "pipelineAnalytics.pruneEventsBefore": [{
33068
+ name: "deviceId",
33069
+ form: "single",
33070
+ optional: false
33071
+ }],
33072
+ "pipelineAnalytics.pruneTracksBefore": [{
33073
+ name: "deviceId",
33074
+ form: "single",
33075
+ optional: false
33076
+ }],
33077
+ "pipelineAnalytics.rebuildObjectEmbeddings": [{
33078
+ name: "deviceId",
33079
+ form: "single",
33080
+ optional: true
33081
+ }],
33082
+ "pipelineAnalytics.restageRetrainTrack": [{
33083
+ name: "deviceId",
33084
+ form: "single",
33085
+ optional: false
33086
+ }],
33087
+ "pipelineAnalytics.saveRetrainAnnotations": [{
33088
+ name: "deviceId",
33089
+ form: "single",
33090
+ optional: false
33091
+ }],
33092
+ "pipelineAnalytics.searchObjectEvents": [{
33093
+ name: "deviceId",
33094
+ form: "single",
33095
+ optional: true
33096
+ }],
33097
+ "pipelineAnalytics.selectRetrainFrames": [{
33098
+ name: "deviceId",
33099
+ form: "single",
33100
+ optional: false
33101
+ }],
33102
+ "pipelineAnalytics.setTrackFlags": [{
33103
+ name: "deviceId",
33104
+ form: "single",
33105
+ optional: false
33106
+ }],
33107
+ "pipelineAnalytics.wipeAllAnalytics": [{
33108
+ name: "deviceId",
33109
+ form: "single",
33110
+ optional: false
33111
+ }],
33112
+ "pipelineExecutor.runPipeline": [{
33113
+ name: "deviceId",
33114
+ form: "single",
33115
+ optional: true
33116
+ }],
33117
+ "pipelineExecutor.runPipelineBatch": [{
33118
+ name: "deviceId",
33119
+ form: "single",
33120
+ optional: true
33121
+ }],
33122
+ "pipelineOrchestrator.assignAudio": [{
33123
+ name: "deviceId",
33124
+ form: "single",
33125
+ optional: false
33126
+ }],
33127
+ "pipelineOrchestrator.assignPipeline": [{
33128
+ name: "deviceId",
33129
+ form: "single",
33130
+ optional: false
33131
+ }],
33132
+ "pipelineOrchestrator.getAudioAssignment": [{
33133
+ name: "deviceId",
33134
+ form: "single",
33135
+ optional: false
33136
+ }],
33137
+ "pipelineOrchestrator.getCameraMetrics": [{
33138
+ name: "deviceId",
33139
+ form: "single",
33140
+ optional: false
33141
+ }],
33142
+ "pipelineOrchestrator.getCameraSettings": [{
33143
+ name: "deviceId",
33144
+ form: "single",
33145
+ optional: false
33146
+ }],
33147
+ "pipelineOrchestrator.getCameraStatus": [{
33148
+ name: "deviceId",
33149
+ form: "single",
33150
+ optional: false
33151
+ }],
33152
+ "pipelineOrchestrator.getCameraStatuses": [{
33153
+ name: "deviceIds",
33154
+ form: "array",
33155
+ optional: true
33156
+ }],
33157
+ "pipelineOrchestrator.getCameraStepOverrides": [{
33158
+ name: "deviceId",
33159
+ form: "single",
33160
+ optional: false
33161
+ }],
33162
+ "pipelineOrchestrator.getCameraSwitches": [{
33163
+ name: "deviceId",
33164
+ form: "single",
33165
+ optional: false
33166
+ }],
33167
+ "pipelineOrchestrator.getPipelineAssignment": [{
33168
+ name: "deviceId",
33169
+ form: "single",
33170
+ optional: false
33171
+ }],
33172
+ "pipelineOrchestrator.getPipelineDevicePin": [{
33173
+ name: "deviceId",
33174
+ form: "single",
33175
+ optional: false
33176
+ }],
33177
+ "pipelineOrchestrator.resolvePipeline": [{
33178
+ name: "deviceId",
33179
+ form: "single",
33180
+ optional: false
33181
+ }],
33182
+ "pipelineOrchestrator.setCameraPipelineForAgent": [{
33183
+ name: "deviceId",
33184
+ form: "single",
33185
+ optional: false
33186
+ }],
33187
+ "pipelineOrchestrator.setCameraStepOverride": [{
33188
+ name: "deviceId",
33189
+ form: "single",
33190
+ optional: false
33191
+ }],
33192
+ "pipelineOrchestrator.setCameraStepToggle": [{
33193
+ name: "deviceId",
33194
+ form: "single",
33195
+ optional: false
33196
+ }],
33197
+ "pipelineOrchestrator.setCameraSwitch": [{
33198
+ name: "deviceId",
33199
+ form: "single",
33200
+ optional: false
33201
+ }],
33202
+ "pipelineOrchestrator.setPipelineDevicePin": [{
33203
+ name: "deviceId",
33204
+ form: "single",
33205
+ optional: false
33206
+ }],
33207
+ "pipelineOrchestrator.unassignAudio": [{
33208
+ name: "deviceId",
33209
+ form: "single",
33210
+ optional: false
33211
+ }],
33212
+ "pipelineOrchestrator.unassignPipeline": [{
33213
+ name: "deviceId",
33214
+ form: "single",
33215
+ optional: false
33216
+ }],
33217
+ "pipelineRunner.attachCamera": [{
33218
+ name: "deviceId",
33219
+ form: "single",
33220
+ optional: false
33221
+ }],
33222
+ "pipelineRunner.detachCamera": [{
33223
+ name: "deviceId",
33224
+ form: "single",
33225
+ optional: false
33226
+ }],
33227
+ "pipelineRunner.getCameraMetrics": [{
33228
+ name: "deviceId",
33229
+ form: "single",
33230
+ optional: false
33231
+ }],
33232
+ "pipelineRunner.reportMotion": [{
33233
+ name: "deviceId",
33234
+ form: "single",
33235
+ optional: false
33236
+ }],
33237
+ "pipelineRunner.runDetailSubtree": [{
33238
+ name: "deviceId",
33239
+ form: "single",
33240
+ optional: false
33241
+ }],
33242
+ "pipelineRunner.runStatelessStep": [{
33243
+ name: "sourceDeviceId",
33244
+ form: "single",
33245
+ optional: false
33246
+ }],
33247
+ "plateGallery.getPlateByTrack": [{
33248
+ name: "deviceId",
33249
+ form: "single",
33250
+ optional: false
33251
+ }],
33252
+ "plateGallery.listPlates": [{
33253
+ name: "deviceId",
33254
+ form: "single",
33255
+ optional: true
33256
+ }],
33257
+ "privacyMask.getOptions": [{
33258
+ name: "deviceId",
33259
+ form: "single",
33260
+ optional: false
33261
+ }],
33262
+ "privacyMask.setAudioEnabled": [{
33263
+ name: "deviceId",
33264
+ form: "single",
33265
+ optional: false
33266
+ }],
33267
+ "privacyMask.setMask": [{
33268
+ name: "deviceId",
33269
+ form: "single",
33270
+ optional: false
33271
+ }],
33272
+ "ptz.continuousMove": [{
33273
+ name: "deviceId",
33274
+ form: "single",
33275
+ optional: false
33276
+ }],
33277
+ "ptz.deletePreset": [{
33278
+ name: "deviceId",
33279
+ form: "single",
33280
+ optional: false
33281
+ }],
33282
+ "ptz.getOptions": [{
33283
+ name: "deviceId",
33284
+ form: "single",
33285
+ optional: false
33286
+ }],
33287
+ "ptz.getPosition": [{
33288
+ name: "deviceId",
33289
+ form: "single",
33290
+ optional: false
33291
+ }],
33292
+ "ptz.getPresets": [{
33293
+ name: "deviceId",
33294
+ form: "single",
33295
+ optional: false
33296
+ }],
33297
+ "ptz.goHome": [{
33298
+ name: "deviceId",
33299
+ form: "single",
33300
+ optional: false
33301
+ }],
33302
+ "ptz.goToPreset": [{
33303
+ name: "deviceId",
33304
+ form: "single",
33305
+ optional: false
33306
+ }],
33307
+ "ptz.move": [{
33308
+ name: "deviceId",
33309
+ form: "single",
33310
+ optional: false
33311
+ }],
33312
+ "ptz.savePreset": [{
33313
+ name: "deviceId",
33314
+ form: "single",
33315
+ optional: false
33316
+ }],
33317
+ "ptz.setAutofocus": [{
33318
+ name: "deviceId",
33319
+ form: "single",
33320
+ optional: false
33321
+ }],
33322
+ "ptz.stop": [{
33323
+ name: "deviceId",
33324
+ form: "single",
33325
+ optional: false
33326
+ }],
33327
+ "ptzAutotrack.getSettings": [{
33328
+ name: "deviceId",
33329
+ form: "single",
33330
+ optional: false
33331
+ }],
33332
+ "ptzAutotrack.getStatus": [{
33333
+ name: "deviceId",
33334
+ form: "single",
33335
+ optional: false
33336
+ }],
33337
+ "ptzAutotrack.setEnabled": [{
33338
+ name: "deviceId",
33339
+ form: "single",
33340
+ optional: false
33341
+ }],
33342
+ "ptzAutotrack.setSettings": [{
33343
+ name: "deviceId",
33344
+ form: "single",
33345
+ optional: false
33346
+ }],
33347
+ "reboot.reboot": [{
33348
+ name: "deviceId",
33349
+ form: "single",
33350
+ optional: false
33351
+ }],
33352
+ "recording.deleteFootprint": [{
33353
+ name: "deviceId",
33354
+ form: "single",
33355
+ optional: false
33356
+ }],
33357
+ "recording.getAvailability": [{
33358
+ name: "deviceId",
33359
+ form: "single",
33360
+ optional: false
33361
+ }],
33362
+ "recording.getDaysWithRecordings": [{
33363
+ name: "deviceId",
33364
+ form: "single",
33365
+ optional: false
33366
+ }],
33367
+ "recording.getDeviceConfig": [{
33368
+ name: "deviceId",
33369
+ form: "single",
33370
+ optional: false
33371
+ }],
33372
+ "recording.getPlaybackManifest": [{
33373
+ name: "deviceId",
33374
+ form: "single",
33375
+ optional: false
33376
+ }],
33377
+ "recording.listOpsLog": [{
33378
+ name: "deviceId",
33379
+ form: "single",
33380
+ optional: true
33381
+ }],
33382
+ "recording.locateSegment": [{
33383
+ name: "deviceId",
33384
+ form: "single",
33385
+ optional: false
33386
+ }],
33387
+ "recording.pruneFootage": [{
33388
+ name: "deviceId",
33389
+ form: "single",
33390
+ optional: false
33391
+ }],
33392
+ "recording.readGopBytes": [{
33393
+ name: "deviceId",
33394
+ form: "single",
33395
+ optional: false
33396
+ }],
33397
+ "recording.readSegmentBytes": [{
33398
+ name: "deviceId",
33399
+ form: "single",
33400
+ optional: false
33401
+ }],
33402
+ "recording.relocateFootage": [{
33403
+ name: "deviceId",
33404
+ form: "single",
33405
+ optional: true
33406
+ }],
33407
+ "recording.renderClip": [{
33408
+ name: "deviceId",
33409
+ form: "single",
33410
+ optional: false
33411
+ }],
33412
+ "recording.renderGif": [{
33413
+ name: "deviceId",
33414
+ form: "single",
33415
+ optional: false
33416
+ }],
33417
+ "recording.rescanStorage": [{
33418
+ name: "deviceId",
33419
+ form: "single",
33420
+ optional: false
33421
+ }],
33422
+ "recording.setDeviceConfig": [{
33423
+ name: "deviceId",
33424
+ form: "single",
33425
+ optional: false
33426
+ }],
33427
+ "recording.startStorageMigrationMove": [{
33428
+ name: "deviceId",
33429
+ form: "single",
33430
+ optional: true
33431
+ }],
33432
+ "recordingExport.createExport": [{
33433
+ name: "deviceId",
33434
+ form: "single",
33435
+ optional: false
33436
+ }],
33437
+ "recordingExport.listExports": [{
33438
+ name: "deviceId",
33439
+ form: "single",
33440
+ optional: true
33441
+ }],
33442
+ "sceneMonitor.captureReference": [{
33443
+ name: "deviceId",
33444
+ form: "single",
33445
+ optional: false
33446
+ }],
33447
+ "sceneMonitor.createScene": [{
33448
+ name: "deviceId",
33449
+ form: "single",
33450
+ optional: false
33451
+ }],
33452
+ "sceneMonitor.deleteReference": [{
33453
+ name: "deviceId",
33454
+ form: "single",
33455
+ optional: false
33456
+ }],
33457
+ "sceneMonitor.deleteScene": [{
33458
+ name: "deviceId",
33459
+ form: "single",
33460
+ optional: false
33461
+ }],
33462
+ "sceneMonitor.listScenes": [{
33463
+ name: "deviceId",
33464
+ form: "single",
33465
+ optional: false
33466
+ }],
33467
+ "sceneMonitor.recheckNow": [{
33468
+ name: "deviceId",
33469
+ form: "single",
33470
+ optional: false
33471
+ }],
33472
+ "sceneMonitor.resetScene": [{
33473
+ name: "deviceId",
33474
+ form: "single",
33475
+ optional: false
33476
+ }],
33477
+ "sceneMonitor.updateScene": [{
33478
+ name: "deviceId",
33479
+ form: "single",
33480
+ optional: false
33481
+ }],
33482
+ "scriptRunner.run": [{
33483
+ name: "deviceId",
33484
+ form: "single",
33485
+ optional: false
33486
+ }],
33487
+ "scriptRunner.stop": [{
33488
+ name: "deviceId",
33489
+ form: "single",
33490
+ optional: false
33491
+ }],
33492
+ "snapshot.getSnapshot": [{
33493
+ name: "deviceId",
33494
+ form: "single",
33495
+ optional: false
33496
+ }],
33497
+ "snapshot.getSnapshotLinks": [{
33498
+ name: "targets",
33499
+ form: "object-array",
33500
+ optional: false,
33501
+ itemField: "deviceId"
33502
+ }],
33503
+ "snapshot.getSnapshotOverview": [{
33504
+ name: "deviceIds",
33505
+ form: "array",
33506
+ optional: false
33507
+ }],
33508
+ "snapshot.invalidateCache": [{
33509
+ name: "deviceId",
33510
+ form: "single",
33511
+ optional: false
33512
+ }],
33513
+ "streamBroker.acquireEgressTranscode": [{
33514
+ name: "deviceId",
33515
+ form: "single",
33516
+ optional: false
33517
+ }],
33518
+ "streamBroker.assignProfile": [{
33519
+ name: "deviceId",
33520
+ form: "single",
33521
+ optional: false
33522
+ }],
33523
+ "streamBroker.getDeviceAudioMute": [{
33524
+ name: "deviceId",
33525
+ form: "single",
33526
+ optional: false
33527
+ }],
33528
+ "streamBroker.getStreamWithCodec": [{
33529
+ name: "deviceId",
33530
+ form: "single",
33531
+ optional: false
33532
+ }],
33533
+ "streamBroker.produceEventMedia": [{
33534
+ name: "deviceId",
33535
+ form: "single",
33536
+ optional: false
33537
+ }],
33538
+ "streamBroker.publishCameraStream": [{
33539
+ name: "deviceId",
33540
+ form: "single",
33541
+ optional: false
33542
+ }],
33543
+ "streamBroker.renderPreBufferClip": [{
33544
+ name: "deviceId",
33545
+ form: "single",
33546
+ optional: false
33547
+ }],
33548
+ "streamBroker.restartProfile": [{
33549
+ name: "deviceId",
33550
+ form: "single",
33551
+ optional: false
33552
+ }],
33553
+ "streamBroker.retractCameraStream": [{
33554
+ name: "deviceId",
33555
+ form: "single",
33556
+ optional: false
33557
+ }],
33558
+ "streamBroker.setDeviceAudioMute": [{
33559
+ name: "deviceId",
33560
+ form: "single",
33561
+ optional: false
33562
+ }],
33563
+ "streamBroker.unassignProfile": [{
33564
+ name: "deviceId",
33565
+ form: "single",
33566
+ optional: false
33567
+ }],
33568
+ "streamCatalog.getCatalog": [{
33569
+ name: "deviceId",
33570
+ form: "single",
33571
+ optional: false
33572
+ }],
33573
+ "streamParams.getConfigSchema": [{
33574
+ name: "deviceId",
33575
+ form: "single",
33576
+ optional: false
33577
+ }],
33578
+ "streamParams.getOptions": [{
33579
+ name: "deviceId",
33580
+ form: "single",
33581
+ optional: false
33582
+ }],
33583
+ "streamParams.setProfile": [{
33584
+ name: "deviceId",
33585
+ form: "single",
33586
+ optional: false
33587
+ }],
33588
+ "switch.setState": [{
33589
+ name: "deviceId",
33590
+ form: "single",
33591
+ optional: false
33592
+ }],
33593
+ "vacuumControl.locate": [{
33594
+ name: "deviceId",
33595
+ form: "single",
33596
+ optional: false
33597
+ }],
33598
+ "vacuumControl.pause": [{
33599
+ name: "deviceId",
33600
+ form: "single",
33601
+ optional: false
33602
+ }],
33603
+ "vacuumControl.returnToBase": [{
33604
+ name: "deviceId",
33605
+ form: "single",
33606
+ optional: false
33607
+ }],
33608
+ "vacuumControl.setFanSpeed": [{
33609
+ name: "deviceId",
33610
+ form: "single",
33611
+ optional: false
33612
+ }],
33613
+ "vacuumControl.start": [{
33614
+ name: "deviceId",
33615
+ form: "single",
33616
+ optional: false
33617
+ }],
33618
+ "vacuumControl.stop": [{
33619
+ name: "deviceId",
33620
+ form: "single",
33621
+ optional: false
33622
+ }],
33623
+ "valve.close": [{
33624
+ name: "deviceId",
33625
+ form: "single",
33626
+ optional: false
33627
+ }],
33628
+ "valve.open": [{
33629
+ name: "deviceId",
33630
+ form: "single",
33631
+ optional: false
33632
+ }],
33633
+ "valve.setPosition": [{
33634
+ name: "deviceId",
33635
+ form: "single",
33636
+ optional: false
33637
+ }],
33638
+ "valve.stop": [{
33639
+ name: "deviceId",
33640
+ form: "single",
33641
+ optional: false
33642
+ }],
33643
+ "videoclips.getClipPlayback": [{
33644
+ name: "deviceId",
33645
+ form: "single",
33646
+ optional: false
33647
+ }],
33648
+ "videoclips.listClips": [{
33649
+ name: "deviceId",
33650
+ form: "single",
33651
+ optional: false
33652
+ }],
33653
+ "waterHeater.setAway": [{
33654
+ name: "deviceId",
33655
+ form: "single",
33656
+ optional: false
33657
+ }],
33658
+ "waterHeater.setOperationMode": [{
33659
+ name: "deviceId",
33660
+ form: "single",
33661
+ optional: false
33662
+ }],
33663
+ "waterHeater.setTargetTemp": [{
33664
+ name: "deviceId",
33665
+ form: "single",
33666
+ optional: false
33667
+ }],
33668
+ "webrtcSession.addIceCandidate": [{
33669
+ name: "deviceId",
33670
+ form: "single",
33671
+ optional: false
33672
+ }],
33673
+ "webrtcSession.closeSession": [{
33674
+ name: "deviceId",
33675
+ form: "single",
33676
+ optional: false
33677
+ }],
33678
+ "webrtcSession.createSession": [{
33679
+ name: "deviceId",
33680
+ form: "single",
33681
+ optional: false
33682
+ }],
33683
+ "webrtcSession.getIceCandidates": [{
33684
+ name: "deviceId",
33685
+ form: "single",
33686
+ optional: false
33687
+ }],
33688
+ "webrtcSession.getSessionState": [{
33689
+ name: "deviceId",
33690
+ form: "single",
33691
+ optional: false
33692
+ }],
33693
+ "webrtcSession.handleAnswer": [{
33694
+ name: "deviceId",
33695
+ form: "single",
33696
+ optional: false
33697
+ }],
33698
+ "webrtcSession.handleOffer": [{
33699
+ name: "deviceId",
33700
+ form: "single",
33701
+ optional: false
33702
+ }],
33703
+ "webrtcSession.hasAdaptiveBitrate": [{
33704
+ name: "deviceId",
33705
+ form: "single",
33706
+ optional: false
33707
+ }],
33708
+ "webrtcSession.listStreams": [{
33709
+ name: "deviceId",
33710
+ form: "single",
33711
+ optional: false
33712
+ }],
33713
+ "zoneAnalytics.getCameraHistory": [{
33714
+ name: "deviceId",
33715
+ form: "single",
33716
+ optional: false
33717
+ }],
33718
+ "zoneAnalytics.getCurrentSnapshot": [{
33719
+ name: "deviceId",
33720
+ form: "single",
33721
+ optional: false
33722
+ }],
33723
+ "zoneAnalytics.getUnzonedHistory": [{
33724
+ name: "deviceId",
33725
+ form: "single",
33726
+ optional: false
33727
+ }],
33728
+ "zoneAnalytics.getZoneHistory": [{
33729
+ name: "deviceId",
33730
+ form: "single",
33731
+ optional: false
33732
+ }],
33733
+ "zoneRules.listRules": [{
33734
+ name: "deviceId",
33735
+ form: "single",
33736
+ optional: false
33737
+ }],
33738
+ "zoneRules.setRules": [{
33739
+ name: "deviceId",
33740
+ form: "single",
33741
+ optional: false
33742
+ }],
33743
+ "zones.addZone": [{
33744
+ name: "deviceId",
33745
+ form: "single",
33746
+ optional: false
33747
+ }],
33748
+ "zones.listZones": [{
33749
+ name: "deviceId",
33750
+ form: "single",
33751
+ optional: false
33752
+ }],
33753
+ "zones.removeZone": [{
33754
+ name: "deviceId",
33755
+ form: "single",
33756
+ optional: false
33757
+ }],
33758
+ "zones.updateZone": [{
33759
+ name: "deviceId",
33760
+ form: "single",
33761
+ optional: false
33762
+ }]
33763
+ });
31109
33764
  Object.freeze({
31110
33765
  "broker": "broker",
31111
33766
  "device-export": "device-export",