@camstack/addon-provider-homematic 1.2.32 → 1.2.33

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 +495 -59
  2. package/dist/addon.mjs +495 -59
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -7535,6 +7535,66 @@ var OpsLogQueryInputSchema = object({
7535
7535
  /** Max rows returned, newest-first. */
7536
7536
  limit: number().int().min(1).max(1e3).optional()
7537
7537
  });
7538
+ var LabelDefinitionSchema = object({
7539
+ id: string(),
7540
+ name: string(),
7541
+ category: string().optional(),
7542
+ description: string().optional(),
7543
+ icon: string().optional()
7544
+ });
7545
+ /** Detection-macro targets a catalog `classMap` may resolve to. */
7546
+ var CLASS_MAP_MACRO_TARGETS = [
7547
+ "person",
7548
+ "vehicle",
7549
+ "animal",
7550
+ "package"
7551
+ ];
7552
+ /**
7553
+ * Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
7554
+ * un operatore può selezionare.
7555
+ *
7556
+ * Sono le tre offerte dallo step `object-detection`
7557
+ * (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
7558
+ * `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
7559
+ * `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
7560
+ * `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
7561
+ * stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
7562
+ * (suitcase/backpack/handbag) lasciando spento il detector dedicato.
7563
+ *
7564
+ * UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
7565
+ * dello step e una seconda volta come union `FirstLevelMacro`
7566
+ * (`types/detection.ts`); una terza copia per il trigger di registrazione
7567
+ * (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
7568
+ * successiva.
7569
+ */
7570
+ var FIRST_LEVEL_MACRO_CLASSES = [
7571
+ "person",
7572
+ "vehicle",
7573
+ "animal"
7574
+ ];
7575
+ /**
7576
+ * Wire schema for a per-model CATALOG classMap override
7577
+ * (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
7578
+ * restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
7579
+ * detection pipeline executor actually routes.
7580
+ *
7581
+ * This is deliberately a DIFFERENT, narrower shape than the general-purpose
7582
+ * `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
7583
+ * and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
7584
+ * enum) — the two used to share the name `ClassMapDefinition`/
7585
+ * `ClassMapDefinitionSchema`, which made the schema-type-twin guard
7586
+ * (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
7587
+ * are not: it is two different concepts colliding on a name. Keep this type
7588
+ * under its own name rather than reusing `ClassMapDefinition` — reusing it
7589
+ * would either narrow every `ClassMapDefinition` consumer to the four
7590
+ * detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
7591
+ * schema exists for (see the "rejects a classMap whose target is not a
7592
+ * detection macro" test in `model-catalog-schema.test.ts`).
7593
+ */
7594
+ var DetectionCatalogClassMapSchema = object({
7595
+ mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
7596
+ preserveOriginal: boolean()
7597
+ });
7538
7598
  /**
7539
7599
  * Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
7540
7600
  * Named `RecordingWeekday` to avoid collision with the string-union
@@ -7557,10 +7617,55 @@ var RecordingStorageModeSchema = _enum([
7557
7617
  "events",
7558
7618
  "continuous"
7559
7619
  ]);
7620
+ /**
7621
+ * Le macro classi che possono aprire una finestra di registrazione — le stesse
7622
+ * tre offerte dallo step `object-detection`, da UNA lista
7623
+ * ({@link FIRST_LEVEL_MACRO_CLASSES}).
7624
+ */
7625
+ var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
7626
+ /**
7627
+ * True quando `values` non ripete un elemento.
7628
+ *
7629
+ * Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
7630
+ * diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
7631
+ * conterebbe due volte le sue finestre in `segmentMissedByMs`.
7632
+ */
7633
+ var noDuplicates = (values) => new Set(values).size === values.length;
7560
7634
  /** Which detectors trigger an `events`-mode band. */
7561
7635
  var RecordingTriggersSchema = object({
7562
7636
  motion: boolean().optional(),
7563
- audioThresholdDbfs: number().optional()
7637
+ audioThresholdDbfs: number().optional(),
7638
+ /**
7639
+ * Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
7640
+ * non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
7641
+ * object acceso, nessuna classe" è la stessa forma "abilitata e non registra
7642
+ * nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
7643
+ *
7644
+ * Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
7645
+ * quelle che hanno attraversato `enabledMacroClasses`, i
7646
+ * `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
7647
+ * (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
7648
+ * finestre — vedi `recorder/object-trigger.ts`.
7649
+ */
7650
+ objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
7651
+ /**
7652
+ * I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
7653
+ * non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
7654
+ * `objectClasses`.
7655
+ *
7656
+ * Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
7657
+ * percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
7658
+ * non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
7659
+ * si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
7660
+ * device (D12) — mai un elenco globale di cap.
7661
+ *
7662
+ * Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
7663
+ * `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
7664
+ * la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
7665
+ * il livello: un contatto trovato già aperto al riavvio del runner non fa
7666
+ * registrare.
7667
+ */
7668
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7564
7669
  });
7565
7670
  /**
7566
7671
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -8012,41 +8117,6 @@ var DecoderSessionConfigSchema = object({
8012
8117
  */
8013
8118
  debug: boolean().optional()
8014
8119
  });
8015
- var LabelDefinitionSchema = object({
8016
- id: string(),
8017
- name: string(),
8018
- category: string().optional(),
8019
- description: string().optional(),
8020
- icon: string().optional()
8021
- });
8022
- /**
8023
- * Wire schema for a per-model CATALOG classMap override
8024
- * (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
8025
- * restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
8026
- * detection pipeline executor actually routes.
8027
- *
8028
- * This is deliberately a DIFFERENT, narrower shape than the general-purpose
8029
- * `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
8030
- * and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
8031
- * enum) — the two used to share the name `ClassMapDefinition`/
8032
- * `ClassMapDefinitionSchema`, which made the schema-type-twin guard
8033
- * (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
8034
- * are not: it is two different concepts colliding on a name. Keep this type
8035
- * under its own name rather than reusing `ClassMapDefinition` — reusing it
8036
- * would either narrow every `ClassMapDefinition` consumer to the four
8037
- * detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
8038
- * schema exists for (see the "rejects a classMap whose target is not a
8039
- * detection macro" test in `model-catalog-schema.test.ts`).
8040
- */
8041
- var DetectionCatalogClassMapSchema = object({
8042
- mapping: record(string(), _enum([
8043
- "person",
8044
- "vehicle",
8045
- "animal",
8046
- "package"
8047
- ])),
8048
- preserveOriginal: boolean()
8049
- });
8050
8120
  var MODEL_FORMATS = [
8051
8121
  "onnx",
8052
8122
  "coreml",
@@ -21228,7 +21298,7 @@ var lifecycleJobSchema = object({
21228
21298
  * `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
21229
21299
  * as every other cap.
21230
21300
  */
21231
- var LogLevelSchema$1 = _enum([
21301
+ var LogLevelSchema$2 = _enum([
21232
21302
  "debug",
21233
21303
  "info",
21234
21304
  "warn",
@@ -21435,7 +21505,7 @@ var CustomActionInputSchema = object({
21435
21505
  method(_void(), array(AddonListItemSchema).readonly()), method(object({
21436
21506
  addonId: string(),
21437
21507
  limit: number().min(1).max(500).default(100),
21438
- level: LogLevelSchema$1.optional()
21508
+ level: LogLevelSchema$2.optional()
21439
21509
  }), array(LogQueryEntrySchema)), method(_void(), array(InstalledPackageSchema).readonly()), method(object({
21440
21510
  packageName: string(),
21441
21511
  version: string().optional()
@@ -21533,7 +21603,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
21533
21603
  auth: "admin"
21534
21604
  }), method(object({
21535
21605
  addonId: string(),
21536
- level: LogLevelSchema$1.optional()
21606
+ level: LogLevelSchema$2.optional()
21537
21607
  }), LogStreamEntrySchema, { kind: "subscription" });
21538
21608
  /**
21539
21609
  * Multi-metric air-quality slice. Covers CO₂, total VOCs, particulate
@@ -23257,6 +23327,35 @@ var FaceFilterEnum = _enum([
23257
23327
  "identified",
23258
23328
  "all"
23259
23329
  ]);
23330
+ /**
23331
+ * What a `listRecentFaces` page is ORDERED BY.
23332
+ *
23333
+ * - `timestamp` — when the face was seen. The historical (and default) order.
23334
+ * - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
23335
+ * cosine of the face's SUGGESTED identity. This is the "review by certainty"
23336
+ * order: it puts the suggestions an operator can confirm with one tap at the
23337
+ * top, and it is the reason this enum exists — a client that ranked a capped
23338
+ * page client-side was ranking the newest N, never the most certain N.
23339
+ *
23340
+ * A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
23341
+ * auto-assigned face, or a face below the suggestion band) has no certainty to
23342
+ * compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
23343
+ * — flipping the direction reorders the rows that HAVE a certainty and never
23344
+ * floods the page with the ones that do not. `addon-post-analysis`'s
23345
+ * `store/face-sort.ts` is the single implementation, tiebreaks newest-first
23346
+ * then by faceId, and is what makes this a total order instead of the
23347
+ * backend's NULL-collation accident.
23348
+ */
23349
+ var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
23350
+ var FaceSortDirectionEnum = _enum(["asc", "desc"]);
23351
+ /** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
23352
+ * never leaves the server. */
23353
+ var FaceClusterSchema = object({
23354
+ faceIds: array(string()).readonly(),
23355
+ representativeFaceId: string(),
23356
+ size: number().int(),
23357
+ cohesion: number()
23358
+ });
23260
23359
  var MediaFileLiteSchema$1 = object({
23261
23360
  key: string(),
23262
23361
  kind: string(),
@@ -23303,24 +23402,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
23303
23402
  kind: "mutation",
23304
23403
  auth: "admin"
23305
23404
  }), method(object({
23306
- /** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
23405
+ /**
23406
+ * Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
23407
+ *
23408
+ * The legacy single-camera form, kept verbatim for every caller that
23409
+ * already sends it. A caller that wants a SET sends {@link deviceIds}
23410
+ * instead — never both: `deviceIds` is the authority whenever it is
23411
+ * present, and this field is then ignored rather than unioned, so
23412
+ * there is exactly one answer to "which cameras did I ask for".
23413
+ */
23307
23414
  deviceId: number().int().optional(),
23415
+ /**
23416
+ * Restrict to a SET of cameras — the review UI's camera filter, which
23417
+ * until now had to fetch the cluster-wide page and drop rows in the
23418
+ * client (so the `limit` it asked for was spent on cameras it was
23419
+ * about to discard).
23420
+ *
23421
+ * An **empty array reads NOTHING** — `[]` is an empty page, never
23422
+ * "every camera". A request for no devices is a request, not an
23423
+ * omission; same contract as `deviceManager.listFleet` and
23424
+ * `pipelineAnalytics.listRecentTracks`.
23425
+ *
23426
+ * Absent (`undefined`) is the omission, and keeps the cluster-wide view.
23427
+ */
23428
+ deviceIds: array(number().int()).optional(),
23308
23429
  limit: number().int().positive().optional(),
23309
23430
  filter: FaceFilterEnum.optional(),
23310
23431
  /**
23311
- * Inline the base64 crop on every row. Default `true` — the existing
23312
- * behaviour, kept so no caller breaks.
23432
+ * Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
23433
+ * Absent means no lower bound.
23434
+ */
23435
+ since: number().int().optional(),
23436
+ /**
23437
+ * Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
23438
+ * Absent means no upper bound.
23439
+ */
23440
+ until: number().int().optional(),
23441
+ /**
23442
+ * Order the page by time or by suggestion certainty. Default
23443
+ * `'timestamp'` — the historical order, unchanged for every caller
23444
+ * that does not ask.
23313
23445
  *
23314
- * Set `false` once the caller renders {@link FaceInfo.cropUrl}: that
23315
- * drops ~2.87 MiB per 500-row page to a few KiB of metadata and lets
23316
- * the browser cache the images.
23446
+ * See {@link FaceSortFieldEnum} for what a row with no suggestion
23447
+ * does under `'suggestionConfidence'`.
23317
23448
  *
23318
- * **This is an INPUT field, so it does not reach the addon until the
23319
- * next train.** The hub router validates cap inputs against its own
23320
- * compiled Zod, which strips a key it does not know — verified today
23321
- * on the OUTPUT side, where an additive field DOES arrive immediately
23322
- * (`Track.hasFace`). Until the train ships, sending `false` is
23323
- * harmless and simply keeps the crops inline.
23449
+ * Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
23450
+ * index and stops reading as soon as `limit` rows have PASSED the
23451
+ * filter. `'suggestionConfidence'` cannot stop early — the most
23452
+ * certain row may be the oldest — so it walks the window. Narrow it
23453
+ * with {@link since} / {@link until}.
23454
+ */
23455
+ sortBy: FaceSortFieldEnum.optional(),
23456
+ /** Sort direction for {@link sortBy}. Default `'desc'`. */
23457
+ sortDirection: FaceSortDirectionEnum.optional(),
23458
+ /**
23459
+ * Inline the base64 crop on every row.
23460
+ *
23461
+ * Default `false` since the 2026-08-25 inversion — see
23462
+ * `include-crops-default.ts`, which is the ONE place that resolves
23463
+ * this for every gallery, and which records why the inline shape had
23464
+ * to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
23465
+ * The doc here used to still say `true`; it was wrong, and a leftover
23466
+ * that describes the old design reads as permission to rely on it.
23467
+ *
23468
+ * Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
23469
+ * which the browser fetches off the `event-media` plane in parallel,
23470
+ * cached and ETagged.
23324
23471
  */
23325
23472
  includeCrops: boolean().optional()
23326
23473
  }).optional(), array(FaceInfoSchema).readonly()), method(object({
@@ -23356,13 +23503,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
23356
23503
  }), method(object({
23357
23504
  threshold: number().min(0).max(1).optional(),
23358
23505
  minClusterSize: number().int().min(2).optional(),
23359
- limit: number().int().positive().optional()
23360
- }).optional(), array(object({
23361
- faceIds: array(string()).readonly(),
23362
- representativeFaceId: string(),
23363
- size: number().int(),
23364
- cohesion: number()
23365
- })).readonly());
23506
+ /**
23507
+ * Cap on the number of CLUSTERS returned. Renamed from `limit`,
23508
+ * which read as though it bounded the work — it never did.
23509
+ *
23510
+ * Wins over {@link limit} when both are sent.
23511
+ */
23512
+ maxClusters: number().int().positive().optional(),
23513
+ /**
23514
+ * @deprecated Ambiguous name for {@link maxClusters} — it cuts the
23515
+ * RESULT, not the scan. Kept so existing callers keep working; send
23516
+ * `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
23517
+ */
23518
+ limit: number().int().positive().optional(),
23519
+ /**
23520
+ * Cap on the number of unassigned faces READ AND CLUSTERED — the
23521
+ * POOL, not the result.
23522
+ *
23523
+ * This is the knob {@link maxClusters} was mistaken for. Clustering
23524
+ * used to read every unassigned face on the hub no matter what the
23525
+ * caller asked for, because the only bound cut the finished clusters
23526
+ * afterwards; a UI showing a window of 100 paid for a scan of the
23527
+ * whole corpus, on an addon whose disk is under contention.
23528
+ *
23529
+ * The pool is the NEWEST matching faces first — the same order the
23530
+ * gallery shows — so a bound here shortens the horizon, it does not
23531
+ * sample it randomly.
23532
+ *
23533
+ * Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
23534
+ * so the live corpus — 372 face rows — is unaffected while the
23535
+ * unbounded scan can never come back as the table grows.
23536
+ */
23537
+ maxFacesScanned: number().int().positive().optional()
23538
+ }).optional(), array(FaceClusterSchema).readonly());
23366
23539
  /**
23367
23540
  * Fan-control cap. Models HA `fan.*` entity-specific surfaces:
23368
23541
  * speed percentage, preset modes, ceiling-fan direction, and
@@ -28304,6 +28477,211 @@ var SetSiteLocationInputSchema = object({
28304
28477
  latitude: number().min(-90).max(90),
28305
28478
  longitude: number().min(-180).max(180)
28306
28479
  }).nullable();
28480
+ /**
28481
+ * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
28482
+ * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
28483
+ * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
28484
+ * already prints - never a token, never an `Authorization` header.
28485
+ */
28486
+ var RequestCensusGroupSchema = object({
28487
+ procedure: string(),
28488
+ userAgent: string(),
28489
+ ip: string(),
28490
+ principal: string(),
28491
+ calls: number(),
28492
+ perMin: number()
28493
+ });
28494
+ /**
28495
+ * A procedure's TOTAL over the window, across every caller.
28496
+ *
28497
+ * This block, not the group list, is what answers "did these calls arrive over
28498
+ * HTTP at all". A total far BELOW what a store-side census counted over the
28499
+ * same window excludes the HTTP plane, which is a result, not a failure.
28500
+ */
28501
+ var RequestCensusProcedureSchema = object({
28502
+ procedure: string(),
28503
+ calls: number(),
28504
+ perMin: number()
28505
+ });
28506
+ /**
28507
+ * The census as an operator sees it.
28508
+ *
28509
+ * `persisted` is the honest answer to "will this survive the restart I am
28510
+ * about to do": the arm deadline is written to `system-settings` so a window
28511
+ * armed now can measure the NEXT boot, and a write that failed must not look
28512
+ * like one that succeeded.
28513
+ */
28514
+ var RequestCensusStatusSchema = object({
28515
+ armed: boolean(),
28516
+ /** How long the current - or just-closed - window collected, in ms. */
28517
+ elapsedMs: number(),
28518
+ /** The window actually armed, after the server clamped the request. */
28519
+ windowMs: number(),
28520
+ /** Epoch ms the window closes at. 0 when disarmed. */
28521
+ armedUntilMs: number(),
28522
+ httpRequests: number(),
28523
+ batchedRequests: number(),
28524
+ /**
28525
+ * Procedure invocations. Higher than `httpRequests` whenever tRPC batching
28526
+ * is in play (`?batch=1` carries several procedures in one request); this is
28527
+ * the number comparable with a store-side call count.
28528
+ */
28529
+ procedureCalls: number(),
28530
+ /**
28531
+ * tRPC WebSocket connections opened during the window. NOT calls - the WS
28532
+ * transport resolves one context per connection - but the number that says
28533
+ * whether a plane this census cannot see was busy while HTTP was quiet.
28534
+ */
28535
+ wsConnections: number(),
28536
+ distinctGroups: number(),
28537
+ /** Calls counted in the totals whose group attribution was shed at the
28538
+ * cardinality bound. */
28539
+ unattributedCalls: number(),
28540
+ procedures: array(RequestCensusProcedureSchema).readonly(),
28541
+ groups: array(RequestCensusGroupSchema).readonly()
28542
+ }).extend({ persisted: boolean() });
28543
+ /** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
28544
+ var LogLevelSchema$1 = _enum([
28545
+ "debug",
28546
+ "info",
28547
+ "warn",
28548
+ "error"
28549
+ ]);
28550
+ /**
28551
+ * The diagnostics that can be ARMED for a window. Exactly one today.
28552
+ *
28553
+ * A diagnostic is anything whose cost is only worth paying while a question is
28554
+ * open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
28555
+ */
28556
+ var DiagnosticIdSchema = _enum(["request-census"]);
28557
+ /**
28558
+ * The layers of the level hierarchy, general → specific. The most specific
28559
+ * layer that carries an explicit value wins.
28560
+ *
28561
+ * `component` is DECLARED and not yet resolvable: the per-component channels
28562
+ * are a later slice of the same plan, and a `levelSource` enum that has to
28563
+ * grow later would force every consumer of this document to change with it.
28564
+ * Nothing returns `component` today.
28565
+ */
28566
+ var LoggingScopeKindSchema = _enum([
28567
+ "cluster",
28568
+ "node",
28569
+ "component"
28570
+ ]);
28571
+ /** Where an effective level came from. `default` = nothing is set anywhere. */
28572
+ var LoggingLevelSourceSchema = _enum([
28573
+ "default",
28574
+ "cluster",
28575
+ "node",
28576
+ "component"
28577
+ ]);
28578
+ /**
28579
+ * One layer of the hierarchy as it actually STANDS.
28580
+ *
28581
+ * `level: null` is the whole reason this array is returned: it is the
28582
+ * difference between "this node is at `info` because I decided it" and
28583
+ * "...because it inherits". An operator who clears an override believing they
28584
+ * are clearing an inherited value has been handed the same defect as the two
28585
+ * contradicting knobs this document exists to remove, moved one floor up.
28586
+ */
28587
+ var LoggingLevelLayerSchema = object({
28588
+ scope: LoggingScopeKindSchema,
28589
+ /** The node this layer speaks for; `null` on the cluster layer. */
28590
+ nodeId: string().nullable(),
28591
+ /** Explicitly set here, or `null` when this layer inherits. */
28592
+ level: LogLevelSchema$1.nullable()
28593
+ });
28594
+ /** What a line is judged against, and WHICH layer decided it. */
28595
+ var LoggingEffectiveSchema = object({
28596
+ level: LogLevelSchema$1,
28597
+ levelSource: LoggingLevelSourceSchema
28598
+ });
28599
+ /** Every layer, general → specific. Never collapsed into the effective value. */
28600
+ var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
28601
+ /**
28602
+ * An armed diagnostic, with its DEADLINE.
28603
+ *
28604
+ * The shape of ADR-0244: what is stored is a deadline and never a flag, so a
28605
+ * diagnostic somebody forgot expires by itself, and a boot-window measurement
28606
+ * survives the restart it exists to measure. `remainingMs` is 0 whenever
28607
+ * `armed` is false — a window is never reported as slightly expired.
28608
+ */
28609
+ var DiagnosticWindowSchema = object({
28610
+ id: DiagnosticIdSchema,
28611
+ armed: boolean(),
28612
+ /** Epoch ms the window closes at. 0 when disarmed. */
28613
+ armedUntilMs: number(),
28614
+ /** Ms left before it expires on its own. 0 when disarmed. */
28615
+ remainingMs: number(),
28616
+ /** Whether the stored deadline is the one the live diagnostic is running —
28617
+ * i.e. whether this window would survive a restart. */
28618
+ persisted: boolean()
28619
+ });
28620
+ /**
28621
+ * `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
28622
+ * server — there is no maximum here on purpose: a bound repeated in a schema
28623
+ * is a second knob that disagrees with the first the day one of them moves.
28624
+ */
28625
+ var DiagnosticWindowPatchSchema = object({
28626
+ id: DiagnosticIdSchema,
28627
+ armMs: number().int().min(0),
28628
+ /** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
28629
+ reportEveryMs: number().int().positive().optional()
28630
+ });
28631
+ /**
28632
+ * A PATCH, and patches MERGE.
28633
+ *
28634
+ * A field absent from the patch is left exactly as it was — arming a
28635
+ * diagnostic never resets a level, and setting a level never disarms a window.
28636
+ * The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
28637
+ * `setAll` already merges, and rebuilding the object is how an absent field
28638
+ * turns into an erased one.
28639
+ */
28640
+ var LoggingSettingsPatchSchema = object({
28641
+ /**
28642
+ * Absent leaves the level untouched. `null` CLEARS the explicit value at the
28643
+ * addressed scope so it inherits again. A value sets it.
28644
+ */
28645
+ level: LogLevelSchema$1.nullable().optional(),
28646
+ /**
28647
+ * Only the diagnostics NAMED here change. An armed window that is not listed
28648
+ * keeps running — a patch is never a full replacement.
28649
+ */
28650
+ diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
28651
+ });
28652
+ /**
28653
+ * Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
28654
+ *
28655
+ * Deliberately NOT called `nodeId`: that key is reserved on every cap method
28656
+ * input — the generated router strips it and uses it to resolve the PROVIDER
28657
+ * on that node (`resolveProvider(cap, nodeId, …)`). A document about
28658
+ * `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
28659
+ * by an agent that holds no cluster document at all. The hub is the single
28660
+ * authority over the whole hierarchy and answers for every layer, so the
28661
+ * layer selector needs a name the transport does not already own.
28662
+ */
28663
+ var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
28664
+ var SetLoggingSettingsInputSchema = object({
28665
+ scopeNodeId: string().optional(),
28666
+ patch: LoggingSettingsPatchSchema
28667
+ });
28668
+ /**
28669
+ * The whole document, as read and as returned after every write.
28670
+ *
28671
+ * `persisted: false` means the settings store could not be read or written.
28672
+ * The in-memory mirror still governs behaviour and is unchanged by the
28673
+ * failure — a read that fails neither switches a level nor disarms a window
28674
+ * (D49) — but the operator is told that what they are looking at would not
28675
+ * survive a restart.
28676
+ */
28677
+ var LoggingSettingsStateSchema = object({
28678
+ /** The layer this document was read at. `null` = the cluster layer. */
28679
+ scopeNodeId: string().nullable(),
28680
+ effective: LoggingEffectiveSchema,
28681
+ explicit: LoggingExplicitSchema,
28682
+ activeWindows: array(DiagnosticWindowSchema).readonly(),
28683
+ persisted: boolean()
28684
+ });
28307
28685
  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(), {
28308
28686
  kind: "mutation",
28309
28687
  auth: "admin"
@@ -28316,6 +28694,9 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
28316
28694
  }), method(_void(), SiteLocationStatusSchema, {
28317
28695
  kind: "mutation",
28318
28696
  auth: "admin"
28697
+ }), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
28698
+ kind: "mutation",
28699
+ auth: "admin"
28319
28700
  });
28320
28701
  /**
28321
28702
  * Tamper / case-open detection sensor. Drives Home Assistant
@@ -35555,6 +35936,18 @@ Object.freeze({
35555
35936
  addonId: null,
35556
35937
  access: "create"
35557
35938
  },
35939
+ "system.getLoggingSettings": {
35940
+ capName: "system",
35941
+ capScope: "system",
35942
+ addonId: null,
35943
+ access: "view"
35944
+ },
35945
+ "system.getRequestCensus": {
35946
+ capName: "system",
35947
+ capScope: "system",
35948
+ addonId: null,
35949
+ access: "view"
35950
+ },
35558
35951
  "system.getRetentionConfig": {
35559
35952
  capName: "system",
35560
35953
  capScope: "system",
@@ -35585,6 +35978,12 @@ Object.freeze({
35585
35978
  addonId: null,
35586
35979
  access: "view"
35587
35980
  },
35981
+ "system.setLoggingSettings": {
35982
+ capName: "system",
35983
+ capScope: "system",
35984
+ addonId: null,
35985
+ access: "create"
35986
+ },
35588
35987
  "system.setRetentionConfig": {
35589
35988
  capName: "system",
35590
35989
  capScope: "system",
@@ -36740,6 +37139,10 @@ Object.freeze({
36740
37139
  name: "deviceId",
36741
37140
  form: "single",
36742
37141
  optional: true
37142
+ }, {
37143
+ name: "deviceIds",
37144
+ form: "array",
37145
+ optional: true
36743
37146
  }],
36744
37147
  "fanControl.setDirection": [{
36745
37148
  name: "deviceId",
@@ -38350,7 +38753,38 @@ object({
38350
38753
  * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
38351
38754
  * reproduce that.
38352
38755
  */
38353
- tileBudgetMb: number().int().min(0).max(1024)
38756
+ tileBudgetMb: number().int().min(0).max(1024),
38757
+ /**
38758
+ * RAM ceiling per decode worker, in MB, for the SCENE TILES — one
38759
+ * JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
38760
+ * subject tiles, on frames that detected something.
38761
+ *
38762
+ * It exists because a subject tile cannot answer a FULL-FRAME request:
38763
+ * containment is strict by design, so the native `keyFrame`, the detail
38764
+ * plane's `frameJpeg` rung and the display-crop fallback had no rung at all
38765
+ * below the hold. Measured on the live cluster: 23.3% of key-frame captures
38766
+ * missed, 95.7% of them with `worker-lease-gone` — the raster released one
38767
+ * frame-time after delivery, with the request only p50 367 ms behind it.
38768
+ *
38769
+ * Sizing, and why this is a budget and not a duration: a scene tile is
38770
+ * ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
38771
+ * ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
38772
+ * camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
38773
+ * frames, i.e. the store's 30 s TTL binds at the steady state and the budget
38774
+ * binds only through a detection burst, where it still covers well past the
38775
+ * measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
38776
+ * would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
38777
+ * whole shape exists to avoid.
38778
+ *
38779
+ * A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
38780
+ * subject tile, so one shared budget would let a busy camera's key frames
38781
+ * evict the face/plate tiles the recognisers depend on. Two budgets make that
38782
+ * impossible rather than unlikely. `0` DISABLES scene tiles and restores the
38783
+ * pre-existing behaviour, where a late full-frame request had nothing but the
38784
+ * ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
38785
+ * nothing.
38786
+ */
38787
+ sceneBudgetMb: number().int().min(0).max(1024)
38354
38788
  });
38355
38789
  /**
38356
38790
  * The values in force when the operator has set nothing.
@@ -38366,12 +38800,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
38366
38800
  budgetMb: 1024,
38367
38801
  activityMs: 15e3,
38368
38802
  tileBudgetMb: 64,
38803
+ sceneBudgetMb: 48,
38369
38804
  admission: "inferred"
38370
38805
  };
38371
38806
  DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
38372
38807
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
38373
38808
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
38374
38809
  DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
38810
+ DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
38375
38811
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
38376
38812
  /**
38377
38813
  * Pure fuzzy matcher for adoption location import. Normalized
package/dist/addon.mjs CHANGED
@@ -7536,6 +7536,66 @@ var OpsLogQueryInputSchema = object({
7536
7536
  /** Max rows returned, newest-first. */
7537
7537
  limit: number().int().min(1).max(1e3).optional()
7538
7538
  });
7539
+ var LabelDefinitionSchema = object({
7540
+ id: string(),
7541
+ name: string(),
7542
+ category: string().optional(),
7543
+ description: string().optional(),
7544
+ icon: string().optional()
7545
+ });
7546
+ /** Detection-macro targets a catalog `classMap` may resolve to. */
7547
+ var CLASS_MAP_MACRO_TARGETS = [
7548
+ "person",
7549
+ "vehicle",
7550
+ "animal",
7551
+ "package"
7552
+ ];
7553
+ /**
7554
+ * Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
7555
+ * un operatore può selezionare.
7556
+ *
7557
+ * Sono le tre offerte dallo step `object-detection`
7558
+ * (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
7559
+ * `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
7560
+ * `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
7561
+ * `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
7562
+ * stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
7563
+ * (suitcase/backpack/handbag) lasciando spento il detector dedicato.
7564
+ *
7565
+ * UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
7566
+ * dello step e una seconda volta come union `FirstLevelMacro`
7567
+ * (`types/detection.ts`); una terza copia per il trigger di registrazione
7568
+ * (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
7569
+ * successiva.
7570
+ */
7571
+ var FIRST_LEVEL_MACRO_CLASSES = [
7572
+ "person",
7573
+ "vehicle",
7574
+ "animal"
7575
+ ];
7576
+ /**
7577
+ * Wire schema for a per-model CATALOG classMap override
7578
+ * (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
7579
+ * restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
7580
+ * detection pipeline executor actually routes.
7581
+ *
7582
+ * This is deliberately a DIFFERENT, narrower shape than the general-purpose
7583
+ * `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
7584
+ * and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
7585
+ * enum) — the two used to share the name `ClassMapDefinition`/
7586
+ * `ClassMapDefinitionSchema`, which made the schema-type-twin guard
7587
+ * (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
7588
+ * are not: it is two different concepts colliding on a name. Keep this type
7589
+ * under its own name rather than reusing `ClassMapDefinition` — reusing it
7590
+ * would either narrow every `ClassMapDefinition` consumer to the four
7591
+ * detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
7592
+ * schema exists for (see the "rejects a classMap whose target is not a
7593
+ * detection macro" test in `model-catalog-schema.test.ts`).
7594
+ */
7595
+ var DetectionCatalogClassMapSchema = object({
7596
+ mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
7597
+ preserveOriginal: boolean()
7598
+ });
7539
7599
  /**
7540
7600
  * Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
7541
7601
  * Named `RecordingWeekday` to avoid collision with the string-union
@@ -7558,10 +7618,55 @@ var RecordingStorageModeSchema = _enum([
7558
7618
  "events",
7559
7619
  "continuous"
7560
7620
  ]);
7621
+ /**
7622
+ * Le macro classi che possono aprire una finestra di registrazione — le stesse
7623
+ * tre offerte dallo step `object-detection`, da UNA lista
7624
+ * ({@link FIRST_LEVEL_MACRO_CLASSES}).
7625
+ */
7626
+ var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
7627
+ /**
7628
+ * True quando `values` non ripete un elemento.
7629
+ *
7630
+ * Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
7631
+ * diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
7632
+ * conterebbe due volte le sue finestre in `segmentMissedByMs`.
7633
+ */
7634
+ var noDuplicates = (values) => new Set(values).size === values.length;
7561
7635
  /** Which detectors trigger an `events`-mode band. */
7562
7636
  var RecordingTriggersSchema = object({
7563
7637
  motion: boolean().optional(),
7564
- audioThresholdDbfs: number().optional()
7638
+ audioThresholdDbfs: number().optional(),
7639
+ /**
7640
+ * Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
7641
+ * non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
7642
+ * object acceso, nessuna classe" è la stessa forma "abilitata e non registra
7643
+ * nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
7644
+ *
7645
+ * Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
7646
+ * quelle che hanno attraversato `enabledMacroClasses`, i
7647
+ * `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
7648
+ * (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
7649
+ * finestre — vedi `recorder/object-trigger.ts`.
7650
+ */
7651
+ objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
7652
+ /**
7653
+ * I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
7654
+ * non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
7655
+ * `objectClasses`.
7656
+ *
7657
+ * Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
7658
+ * percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
7659
+ * non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
7660
+ * si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
7661
+ * device (D12) — mai un elenco globale di cap.
7662
+ *
7663
+ * Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
7664
+ * `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
7665
+ * la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
7666
+ * il livello: un contatto trovato già aperto al riavvio del runner non fa
7667
+ * registrare.
7668
+ */
7669
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7565
7670
  });
7566
7671
  /**
7567
7672
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -8013,41 +8118,6 @@ var DecoderSessionConfigSchema = object({
8013
8118
  */
8014
8119
  debug: boolean().optional()
8015
8120
  });
8016
- var LabelDefinitionSchema = object({
8017
- id: string(),
8018
- name: string(),
8019
- category: string().optional(),
8020
- description: string().optional(),
8021
- icon: string().optional()
8022
- });
8023
- /**
8024
- * Wire schema for a per-model CATALOG classMap override
8025
- * (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
8026
- * restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
8027
- * detection pipeline executor actually routes.
8028
- *
8029
- * This is deliberately a DIFFERENT, narrower shape than the general-purpose
8030
- * `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
8031
- * and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
8032
- * enum) — the two used to share the name `ClassMapDefinition`/
8033
- * `ClassMapDefinitionSchema`, which made the schema-type-twin guard
8034
- * (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
8035
- * are not: it is two different concepts colliding on a name. Keep this type
8036
- * under its own name rather than reusing `ClassMapDefinition` — reusing it
8037
- * would either narrow every `ClassMapDefinition` consumer to the four
8038
- * detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
8039
- * schema exists for (see the "rejects a classMap whose target is not a
8040
- * detection macro" test in `model-catalog-schema.test.ts`).
8041
- */
8042
- var DetectionCatalogClassMapSchema = object({
8043
- mapping: record(string(), _enum([
8044
- "person",
8045
- "vehicle",
8046
- "animal",
8047
- "package"
8048
- ])),
8049
- preserveOriginal: boolean()
8050
- });
8051
8121
  var MODEL_FORMATS = [
8052
8122
  "onnx",
8053
8123
  "coreml",
@@ -21229,7 +21299,7 @@ var lifecycleJobSchema = object({
21229
21299
  * `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
21230
21300
  * as every other cap.
21231
21301
  */
21232
- var LogLevelSchema$1 = _enum([
21302
+ var LogLevelSchema$2 = _enum([
21233
21303
  "debug",
21234
21304
  "info",
21235
21305
  "warn",
@@ -21436,7 +21506,7 @@ var CustomActionInputSchema = object({
21436
21506
  method(_void(), array(AddonListItemSchema).readonly()), method(object({
21437
21507
  addonId: string(),
21438
21508
  limit: number().min(1).max(500).default(100),
21439
- level: LogLevelSchema$1.optional()
21509
+ level: LogLevelSchema$2.optional()
21440
21510
  }), array(LogQueryEntrySchema)), method(_void(), array(InstalledPackageSchema).readonly()), method(object({
21441
21511
  packageName: string(),
21442
21512
  version: string().optional()
@@ -21534,7 +21604,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
21534
21604
  auth: "admin"
21535
21605
  }), method(object({
21536
21606
  addonId: string(),
21537
- level: LogLevelSchema$1.optional()
21607
+ level: LogLevelSchema$2.optional()
21538
21608
  }), LogStreamEntrySchema, { kind: "subscription" });
21539
21609
  /**
21540
21610
  * Multi-metric air-quality slice. Covers CO₂, total VOCs, particulate
@@ -23258,6 +23328,35 @@ var FaceFilterEnum = _enum([
23258
23328
  "identified",
23259
23329
  "all"
23260
23330
  ]);
23331
+ /**
23332
+ * What a `listRecentFaces` page is ORDERED BY.
23333
+ *
23334
+ * - `timestamp` — when the face was seen. The historical (and default) order.
23335
+ * - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
23336
+ * cosine of the face's SUGGESTED identity. This is the "review by certainty"
23337
+ * order: it puts the suggestions an operator can confirm with one tap at the
23338
+ * top, and it is the reason this enum exists — a client that ranked a capped
23339
+ * page client-side was ranking the newest N, never the most certain N.
23340
+ *
23341
+ * A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
23342
+ * auto-assigned face, or a face below the suggestion band) has no certainty to
23343
+ * compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
23344
+ * — flipping the direction reorders the rows that HAVE a certainty and never
23345
+ * floods the page with the ones that do not. `addon-post-analysis`'s
23346
+ * `store/face-sort.ts` is the single implementation, tiebreaks newest-first
23347
+ * then by faceId, and is what makes this a total order instead of the
23348
+ * backend's NULL-collation accident.
23349
+ */
23350
+ var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
23351
+ var FaceSortDirectionEnum = _enum(["asc", "desc"]);
23352
+ /** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
23353
+ * never leaves the server. */
23354
+ var FaceClusterSchema = object({
23355
+ faceIds: array(string()).readonly(),
23356
+ representativeFaceId: string(),
23357
+ size: number().int(),
23358
+ cohesion: number()
23359
+ });
23261
23360
  var MediaFileLiteSchema$1 = object({
23262
23361
  key: string(),
23263
23362
  kind: string(),
@@ -23304,24 +23403,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
23304
23403
  kind: "mutation",
23305
23404
  auth: "admin"
23306
23405
  }), method(object({
23307
- /** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
23406
+ /**
23407
+ * Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
23408
+ *
23409
+ * The legacy single-camera form, kept verbatim for every caller that
23410
+ * already sends it. A caller that wants a SET sends {@link deviceIds}
23411
+ * instead — never both: `deviceIds` is the authority whenever it is
23412
+ * present, and this field is then ignored rather than unioned, so
23413
+ * there is exactly one answer to "which cameras did I ask for".
23414
+ */
23308
23415
  deviceId: number().int().optional(),
23416
+ /**
23417
+ * Restrict to a SET of cameras — the review UI's camera filter, which
23418
+ * until now had to fetch the cluster-wide page and drop rows in the
23419
+ * client (so the `limit` it asked for was spent on cameras it was
23420
+ * about to discard).
23421
+ *
23422
+ * An **empty array reads NOTHING** — `[]` is an empty page, never
23423
+ * "every camera". A request for no devices is a request, not an
23424
+ * omission; same contract as `deviceManager.listFleet` and
23425
+ * `pipelineAnalytics.listRecentTracks`.
23426
+ *
23427
+ * Absent (`undefined`) is the omission, and keeps the cluster-wide view.
23428
+ */
23429
+ deviceIds: array(number().int()).optional(),
23309
23430
  limit: number().int().positive().optional(),
23310
23431
  filter: FaceFilterEnum.optional(),
23311
23432
  /**
23312
- * Inline the base64 crop on every row. Default `true` — the existing
23313
- * behaviour, kept so no caller breaks.
23433
+ * Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
23434
+ * Absent means no lower bound.
23435
+ */
23436
+ since: number().int().optional(),
23437
+ /**
23438
+ * Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
23439
+ * Absent means no upper bound.
23440
+ */
23441
+ until: number().int().optional(),
23442
+ /**
23443
+ * Order the page by time or by suggestion certainty. Default
23444
+ * `'timestamp'` — the historical order, unchanged for every caller
23445
+ * that does not ask.
23314
23446
  *
23315
- * Set `false` once the caller renders {@link FaceInfo.cropUrl}: that
23316
- * drops ~2.87 MiB per 500-row page to a few KiB of metadata and lets
23317
- * the browser cache the images.
23447
+ * See {@link FaceSortFieldEnum} for what a row with no suggestion
23448
+ * does under `'suggestionConfidence'`.
23318
23449
  *
23319
- * **This is an INPUT field, so it does not reach the addon until the
23320
- * next train.** The hub router validates cap inputs against its own
23321
- * compiled Zod, which strips a key it does not know — verified today
23322
- * on the OUTPUT side, where an additive field DOES arrive immediately
23323
- * (`Track.hasFace`). Until the train ships, sending `false` is
23324
- * harmless and simply keeps the crops inline.
23450
+ * Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
23451
+ * index and stops reading as soon as `limit` rows have PASSED the
23452
+ * filter. `'suggestionConfidence'` cannot stop early — the most
23453
+ * certain row may be the oldest — so it walks the window. Narrow it
23454
+ * with {@link since} / {@link until}.
23455
+ */
23456
+ sortBy: FaceSortFieldEnum.optional(),
23457
+ /** Sort direction for {@link sortBy}. Default `'desc'`. */
23458
+ sortDirection: FaceSortDirectionEnum.optional(),
23459
+ /**
23460
+ * Inline the base64 crop on every row.
23461
+ *
23462
+ * Default `false` since the 2026-08-25 inversion — see
23463
+ * `include-crops-default.ts`, which is the ONE place that resolves
23464
+ * this for every gallery, and which records why the inline shape had
23465
+ * to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
23466
+ * The doc here used to still say `true`; it was wrong, and a leftover
23467
+ * that describes the old design reads as permission to rely on it.
23468
+ *
23469
+ * Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
23470
+ * which the browser fetches off the `event-media` plane in parallel,
23471
+ * cached and ETagged.
23325
23472
  */
23326
23473
  includeCrops: boolean().optional()
23327
23474
  }).optional(), array(FaceInfoSchema).readonly()), method(object({
@@ -23357,13 +23504,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
23357
23504
  }), method(object({
23358
23505
  threshold: number().min(0).max(1).optional(),
23359
23506
  minClusterSize: number().int().min(2).optional(),
23360
- limit: number().int().positive().optional()
23361
- }).optional(), array(object({
23362
- faceIds: array(string()).readonly(),
23363
- representativeFaceId: string(),
23364
- size: number().int(),
23365
- cohesion: number()
23366
- })).readonly());
23507
+ /**
23508
+ * Cap on the number of CLUSTERS returned. Renamed from `limit`,
23509
+ * which read as though it bounded the work — it never did.
23510
+ *
23511
+ * Wins over {@link limit} when both are sent.
23512
+ */
23513
+ maxClusters: number().int().positive().optional(),
23514
+ /**
23515
+ * @deprecated Ambiguous name for {@link maxClusters} — it cuts the
23516
+ * RESULT, not the scan. Kept so existing callers keep working; send
23517
+ * `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
23518
+ */
23519
+ limit: number().int().positive().optional(),
23520
+ /**
23521
+ * Cap on the number of unassigned faces READ AND CLUSTERED — the
23522
+ * POOL, not the result.
23523
+ *
23524
+ * This is the knob {@link maxClusters} was mistaken for. Clustering
23525
+ * used to read every unassigned face on the hub no matter what the
23526
+ * caller asked for, because the only bound cut the finished clusters
23527
+ * afterwards; a UI showing a window of 100 paid for a scan of the
23528
+ * whole corpus, on an addon whose disk is under contention.
23529
+ *
23530
+ * The pool is the NEWEST matching faces first — the same order the
23531
+ * gallery shows — so a bound here shortens the horizon, it does not
23532
+ * sample it randomly.
23533
+ *
23534
+ * Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
23535
+ * so the live corpus — 372 face rows — is unaffected while the
23536
+ * unbounded scan can never come back as the table grows.
23537
+ */
23538
+ maxFacesScanned: number().int().positive().optional()
23539
+ }).optional(), array(FaceClusterSchema).readonly());
23367
23540
  /**
23368
23541
  * Fan-control cap. Models HA `fan.*` entity-specific surfaces:
23369
23542
  * speed percentage, preset modes, ceiling-fan direction, and
@@ -28305,6 +28478,211 @@ var SetSiteLocationInputSchema = object({
28305
28478
  latitude: number().min(-90).max(90),
28306
28479
  longitude: number().min(-180).max(180)
28307
28480
  }).nullable();
28481
+ /**
28482
+ * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
28483
+ * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
28484
+ * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
28485
+ * already prints - never a token, never an `Authorization` header.
28486
+ */
28487
+ var RequestCensusGroupSchema = object({
28488
+ procedure: string(),
28489
+ userAgent: string(),
28490
+ ip: string(),
28491
+ principal: string(),
28492
+ calls: number(),
28493
+ perMin: number()
28494
+ });
28495
+ /**
28496
+ * A procedure's TOTAL over the window, across every caller.
28497
+ *
28498
+ * This block, not the group list, is what answers "did these calls arrive over
28499
+ * HTTP at all". A total far BELOW what a store-side census counted over the
28500
+ * same window excludes the HTTP plane, which is a result, not a failure.
28501
+ */
28502
+ var RequestCensusProcedureSchema = object({
28503
+ procedure: string(),
28504
+ calls: number(),
28505
+ perMin: number()
28506
+ });
28507
+ /**
28508
+ * The census as an operator sees it.
28509
+ *
28510
+ * `persisted` is the honest answer to "will this survive the restart I am
28511
+ * about to do": the arm deadline is written to `system-settings` so a window
28512
+ * armed now can measure the NEXT boot, and a write that failed must not look
28513
+ * like one that succeeded.
28514
+ */
28515
+ var RequestCensusStatusSchema = object({
28516
+ armed: boolean(),
28517
+ /** How long the current - or just-closed - window collected, in ms. */
28518
+ elapsedMs: number(),
28519
+ /** The window actually armed, after the server clamped the request. */
28520
+ windowMs: number(),
28521
+ /** Epoch ms the window closes at. 0 when disarmed. */
28522
+ armedUntilMs: number(),
28523
+ httpRequests: number(),
28524
+ batchedRequests: number(),
28525
+ /**
28526
+ * Procedure invocations. Higher than `httpRequests` whenever tRPC batching
28527
+ * is in play (`?batch=1` carries several procedures in one request); this is
28528
+ * the number comparable with a store-side call count.
28529
+ */
28530
+ procedureCalls: number(),
28531
+ /**
28532
+ * tRPC WebSocket connections opened during the window. NOT calls - the WS
28533
+ * transport resolves one context per connection - but the number that says
28534
+ * whether a plane this census cannot see was busy while HTTP was quiet.
28535
+ */
28536
+ wsConnections: number(),
28537
+ distinctGroups: number(),
28538
+ /** Calls counted in the totals whose group attribution was shed at the
28539
+ * cardinality bound. */
28540
+ unattributedCalls: number(),
28541
+ procedures: array(RequestCensusProcedureSchema).readonly(),
28542
+ groups: array(RequestCensusGroupSchema).readonly()
28543
+ }).extend({ persisted: boolean() });
28544
+ /** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
28545
+ var LogLevelSchema$1 = _enum([
28546
+ "debug",
28547
+ "info",
28548
+ "warn",
28549
+ "error"
28550
+ ]);
28551
+ /**
28552
+ * The diagnostics that can be ARMED for a window. Exactly one today.
28553
+ *
28554
+ * A diagnostic is anything whose cost is only worth paying while a question is
28555
+ * open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
28556
+ */
28557
+ var DiagnosticIdSchema = _enum(["request-census"]);
28558
+ /**
28559
+ * The layers of the level hierarchy, general → specific. The most specific
28560
+ * layer that carries an explicit value wins.
28561
+ *
28562
+ * `component` is DECLARED and not yet resolvable: the per-component channels
28563
+ * are a later slice of the same plan, and a `levelSource` enum that has to
28564
+ * grow later would force every consumer of this document to change with it.
28565
+ * Nothing returns `component` today.
28566
+ */
28567
+ var LoggingScopeKindSchema = _enum([
28568
+ "cluster",
28569
+ "node",
28570
+ "component"
28571
+ ]);
28572
+ /** Where an effective level came from. `default` = nothing is set anywhere. */
28573
+ var LoggingLevelSourceSchema = _enum([
28574
+ "default",
28575
+ "cluster",
28576
+ "node",
28577
+ "component"
28578
+ ]);
28579
+ /**
28580
+ * One layer of the hierarchy as it actually STANDS.
28581
+ *
28582
+ * `level: null` is the whole reason this array is returned: it is the
28583
+ * difference between "this node is at `info` because I decided it" and
28584
+ * "...because it inherits". An operator who clears an override believing they
28585
+ * are clearing an inherited value has been handed the same defect as the two
28586
+ * contradicting knobs this document exists to remove, moved one floor up.
28587
+ */
28588
+ var LoggingLevelLayerSchema = object({
28589
+ scope: LoggingScopeKindSchema,
28590
+ /** The node this layer speaks for; `null` on the cluster layer. */
28591
+ nodeId: string().nullable(),
28592
+ /** Explicitly set here, or `null` when this layer inherits. */
28593
+ level: LogLevelSchema$1.nullable()
28594
+ });
28595
+ /** What a line is judged against, and WHICH layer decided it. */
28596
+ var LoggingEffectiveSchema = object({
28597
+ level: LogLevelSchema$1,
28598
+ levelSource: LoggingLevelSourceSchema
28599
+ });
28600
+ /** Every layer, general → specific. Never collapsed into the effective value. */
28601
+ var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
28602
+ /**
28603
+ * An armed diagnostic, with its DEADLINE.
28604
+ *
28605
+ * The shape of ADR-0244: what is stored is a deadline and never a flag, so a
28606
+ * diagnostic somebody forgot expires by itself, and a boot-window measurement
28607
+ * survives the restart it exists to measure. `remainingMs` is 0 whenever
28608
+ * `armed` is false — a window is never reported as slightly expired.
28609
+ */
28610
+ var DiagnosticWindowSchema = object({
28611
+ id: DiagnosticIdSchema,
28612
+ armed: boolean(),
28613
+ /** Epoch ms the window closes at. 0 when disarmed. */
28614
+ armedUntilMs: number(),
28615
+ /** Ms left before it expires on its own. 0 when disarmed. */
28616
+ remainingMs: number(),
28617
+ /** Whether the stored deadline is the one the live diagnostic is running —
28618
+ * i.e. whether this window would survive a restart. */
28619
+ persisted: boolean()
28620
+ });
28621
+ /**
28622
+ * `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
28623
+ * server — there is no maximum here on purpose: a bound repeated in a schema
28624
+ * is a second knob that disagrees with the first the day one of them moves.
28625
+ */
28626
+ var DiagnosticWindowPatchSchema = object({
28627
+ id: DiagnosticIdSchema,
28628
+ armMs: number().int().min(0),
28629
+ /** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
28630
+ reportEveryMs: number().int().positive().optional()
28631
+ });
28632
+ /**
28633
+ * A PATCH, and patches MERGE.
28634
+ *
28635
+ * A field absent from the patch is left exactly as it was — arming a
28636
+ * diagnostic never resets a level, and setting a level never disarms a window.
28637
+ * The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
28638
+ * `setAll` already merges, and rebuilding the object is how an absent field
28639
+ * turns into an erased one.
28640
+ */
28641
+ var LoggingSettingsPatchSchema = object({
28642
+ /**
28643
+ * Absent leaves the level untouched. `null` CLEARS the explicit value at the
28644
+ * addressed scope so it inherits again. A value sets it.
28645
+ */
28646
+ level: LogLevelSchema$1.nullable().optional(),
28647
+ /**
28648
+ * Only the diagnostics NAMED here change. An armed window that is not listed
28649
+ * keeps running — a patch is never a full replacement.
28650
+ */
28651
+ diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
28652
+ });
28653
+ /**
28654
+ * Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
28655
+ *
28656
+ * Deliberately NOT called `nodeId`: that key is reserved on every cap method
28657
+ * input — the generated router strips it and uses it to resolve the PROVIDER
28658
+ * on that node (`resolveProvider(cap, nodeId, …)`). A document about
28659
+ * `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
28660
+ * by an agent that holds no cluster document at all. The hub is the single
28661
+ * authority over the whole hierarchy and answers for every layer, so the
28662
+ * layer selector needs a name the transport does not already own.
28663
+ */
28664
+ var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
28665
+ var SetLoggingSettingsInputSchema = object({
28666
+ scopeNodeId: string().optional(),
28667
+ patch: LoggingSettingsPatchSchema
28668
+ });
28669
+ /**
28670
+ * The whole document, as read and as returned after every write.
28671
+ *
28672
+ * `persisted: false` means the settings store could not be read or written.
28673
+ * The in-memory mirror still governs behaviour and is unchanged by the
28674
+ * failure — a read that fails neither switches a level nor disarms a window
28675
+ * (D49) — but the operator is told that what they are looking at would not
28676
+ * survive a restart.
28677
+ */
28678
+ var LoggingSettingsStateSchema = object({
28679
+ /** The layer this document was read at. `null` = the cluster layer. */
28680
+ scopeNodeId: string().nullable(),
28681
+ effective: LoggingEffectiveSchema,
28682
+ explicit: LoggingExplicitSchema,
28683
+ activeWindows: array(DiagnosticWindowSchema).readonly(),
28684
+ persisted: boolean()
28685
+ });
28308
28686
  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(), {
28309
28687
  kind: "mutation",
28310
28688
  auth: "admin"
@@ -28317,6 +28695,9 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
28317
28695
  }), method(_void(), SiteLocationStatusSchema, {
28318
28696
  kind: "mutation",
28319
28697
  auth: "admin"
28698
+ }), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
28699
+ kind: "mutation",
28700
+ auth: "admin"
28320
28701
  });
28321
28702
  /**
28322
28703
  * Tamper / case-open detection sensor. Drives Home Assistant
@@ -35556,6 +35937,18 @@ Object.freeze({
35556
35937
  addonId: null,
35557
35938
  access: "create"
35558
35939
  },
35940
+ "system.getLoggingSettings": {
35941
+ capName: "system",
35942
+ capScope: "system",
35943
+ addonId: null,
35944
+ access: "view"
35945
+ },
35946
+ "system.getRequestCensus": {
35947
+ capName: "system",
35948
+ capScope: "system",
35949
+ addonId: null,
35950
+ access: "view"
35951
+ },
35559
35952
  "system.getRetentionConfig": {
35560
35953
  capName: "system",
35561
35954
  capScope: "system",
@@ -35586,6 +35979,12 @@ Object.freeze({
35586
35979
  addonId: null,
35587
35980
  access: "view"
35588
35981
  },
35982
+ "system.setLoggingSettings": {
35983
+ capName: "system",
35984
+ capScope: "system",
35985
+ addonId: null,
35986
+ access: "create"
35987
+ },
35589
35988
  "system.setRetentionConfig": {
35590
35989
  capName: "system",
35591
35990
  capScope: "system",
@@ -36741,6 +37140,10 @@ Object.freeze({
36741
37140
  name: "deviceId",
36742
37141
  form: "single",
36743
37142
  optional: true
37143
+ }, {
37144
+ name: "deviceIds",
37145
+ form: "array",
37146
+ optional: true
36744
37147
  }],
36745
37148
  "fanControl.setDirection": [{
36746
37149
  name: "deviceId",
@@ -38351,7 +38754,38 @@ object({
38351
38754
  * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
38352
38755
  * reproduce that.
38353
38756
  */
38354
- tileBudgetMb: number().int().min(0).max(1024)
38757
+ tileBudgetMb: number().int().min(0).max(1024),
38758
+ /**
38759
+ * RAM ceiling per decode worker, in MB, for the SCENE TILES — one
38760
+ * JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
38761
+ * subject tiles, on frames that detected something.
38762
+ *
38763
+ * It exists because a subject tile cannot answer a FULL-FRAME request:
38764
+ * containment is strict by design, so the native `keyFrame`, the detail
38765
+ * plane's `frameJpeg` rung and the display-crop fallback had no rung at all
38766
+ * below the hold. Measured on the live cluster: 23.3% of key-frame captures
38767
+ * missed, 95.7% of them with `worker-lease-gone` — the raster released one
38768
+ * frame-time after delivery, with the request only p50 367 ms behind it.
38769
+ *
38770
+ * Sizing, and why this is a budget and not a duration: a scene tile is
38771
+ * ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
38772
+ * ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
38773
+ * camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
38774
+ * frames, i.e. the store's 30 s TTL binds at the steady state and the budget
38775
+ * binds only through a detection burst, where it still covers well past the
38776
+ * measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
38777
+ * would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
38778
+ * whole shape exists to avoid.
38779
+ *
38780
+ * A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
38781
+ * subject tile, so one shared budget would let a busy camera's key frames
38782
+ * evict the face/plate tiles the recognisers depend on. Two budgets make that
38783
+ * impossible rather than unlikely. `0` DISABLES scene tiles and restores the
38784
+ * pre-existing behaviour, where a late full-frame request had nothing but the
38785
+ * ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
38786
+ * nothing.
38787
+ */
38788
+ sceneBudgetMb: number().int().min(0).max(1024)
38355
38789
  });
38356
38790
  /**
38357
38791
  * The values in force when the operator has set nothing.
@@ -38367,12 +38801,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
38367
38801
  budgetMb: 1024,
38368
38802
  activityMs: 15e3,
38369
38803
  tileBudgetMb: 64,
38804
+ sceneBudgetMb: 48,
38370
38805
  admission: "inferred"
38371
38806
  };
38372
38807
  DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
38373
38808
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
38374
38809
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
38375
38810
  DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
38811
+ DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
38376
38812
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
38377
38813
  /**
38378
38814
  * Pure fuzzy matcher for adoption location import. Normalized
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-homematic",
3
- "version": "1.2.32",
3
+ "version": "1.2.33",
4
4
  "description": "Homematic / HomematicIP (CCU3 / RaspberryMatic) device-provider addon for CamStack — wraps the nodehomematic library",
5
5
  "keywords": [
6
6
  "camstack",