@camstack/addon-provider-rtsp 1.2.31 → 1.2.32

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
@@ -7582,6 +7582,66 @@ var OpsLogQueryInputSchema = object({
7582
7582
  /** Max rows returned, newest-first. */
7583
7583
  limit: number().int().min(1).max(1e3).optional()
7584
7584
  });
7585
+ var LabelDefinitionSchema = object({
7586
+ id: string(),
7587
+ name: string(),
7588
+ category: string().optional(),
7589
+ description: string().optional(),
7590
+ icon: string().optional()
7591
+ });
7592
+ /** Detection-macro targets a catalog `classMap` may resolve to. */
7593
+ var CLASS_MAP_MACRO_TARGETS = [
7594
+ "person",
7595
+ "vehicle",
7596
+ "animal",
7597
+ "package"
7598
+ ];
7599
+ /**
7600
+ * Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
7601
+ * un operatore può selezionare.
7602
+ *
7603
+ * Sono le tre offerte dallo step `object-detection`
7604
+ * (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
7605
+ * `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
7606
+ * `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
7607
+ * `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
7608
+ * stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
7609
+ * (suitcase/backpack/handbag) lasciando spento il detector dedicato.
7610
+ *
7611
+ * UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
7612
+ * dello step e una seconda volta come union `FirstLevelMacro`
7613
+ * (`types/detection.ts`); una terza copia per il trigger di registrazione
7614
+ * (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
7615
+ * successiva.
7616
+ */
7617
+ var FIRST_LEVEL_MACRO_CLASSES = [
7618
+ "person",
7619
+ "vehicle",
7620
+ "animal"
7621
+ ];
7622
+ /**
7623
+ * Wire schema for a per-model CATALOG classMap override
7624
+ * (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
7625
+ * restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
7626
+ * detection pipeline executor actually routes.
7627
+ *
7628
+ * This is deliberately a DIFFERENT, narrower shape than the general-purpose
7629
+ * `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
7630
+ * and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
7631
+ * enum) — the two used to share the name `ClassMapDefinition`/
7632
+ * `ClassMapDefinitionSchema`, which made the schema-type-twin guard
7633
+ * (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
7634
+ * are not: it is two different concepts colliding on a name. Keep this type
7635
+ * under its own name rather than reusing `ClassMapDefinition` — reusing it
7636
+ * would either narrow every `ClassMapDefinition` consumer to the four
7637
+ * detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
7638
+ * schema exists for (see the "rejects a classMap whose target is not a
7639
+ * detection macro" test in `model-catalog-schema.test.ts`).
7640
+ */
7641
+ var DetectionCatalogClassMapSchema = object({
7642
+ mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
7643
+ preserveOriginal: boolean()
7644
+ });
7585
7645
  /**
7586
7646
  * Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
7587
7647
  * Named `RecordingWeekday` to avoid collision with the string-union
@@ -7604,10 +7664,55 @@ var RecordingStorageModeSchema = _enum([
7604
7664
  "events",
7605
7665
  "continuous"
7606
7666
  ]);
7667
+ /**
7668
+ * Le macro classi che possono aprire una finestra di registrazione — le stesse
7669
+ * tre offerte dallo step `object-detection`, da UNA lista
7670
+ * ({@link FIRST_LEVEL_MACRO_CLASSES}).
7671
+ */
7672
+ var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
7673
+ /**
7674
+ * True quando `values` non ripete un elemento.
7675
+ *
7676
+ * Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
7677
+ * diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
7678
+ * conterebbe due volte le sue finestre in `segmentMissedByMs`.
7679
+ */
7680
+ var noDuplicates = (values) => new Set(values).size === values.length;
7607
7681
  /** Which detectors trigger an `events`-mode band. */
7608
7682
  var RecordingTriggersSchema = object({
7609
7683
  motion: boolean().optional(),
7610
- audioThresholdDbfs: number().optional()
7684
+ audioThresholdDbfs: number().optional(),
7685
+ /**
7686
+ * Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
7687
+ * non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
7688
+ * object acceso, nessuna classe" è la stessa forma "abilitata e non registra
7689
+ * nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
7690
+ *
7691
+ * Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
7692
+ * quelle che hanno attraversato `enabledMacroClasses`, i
7693
+ * `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
7694
+ * (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
7695
+ * finestre — vedi `recorder/object-trigger.ts`.
7696
+ */
7697
+ objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
7698
+ /**
7699
+ * I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
7700
+ * non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
7701
+ * `objectClasses`.
7702
+ *
7703
+ * Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
7704
+ * percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
7705
+ * non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
7706
+ * si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
7707
+ * device (D12) — mai un elenco globale di cap.
7708
+ *
7709
+ * Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
7710
+ * `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
7711
+ * la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
7712
+ * il livello: un contatto trovato già aperto al riavvio del runner non fa
7713
+ * registrare.
7714
+ */
7715
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7611
7716
  });
7612
7717
  /**
7613
7718
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -8059,41 +8164,6 @@ var DecoderSessionConfigSchema = object({
8059
8164
  */
8060
8165
  debug: boolean().optional()
8061
8166
  });
8062
- var LabelDefinitionSchema = object({
8063
- id: string(),
8064
- name: string(),
8065
- category: string().optional(),
8066
- description: string().optional(),
8067
- icon: string().optional()
8068
- });
8069
- /**
8070
- * Wire schema for a per-model CATALOG classMap override
8071
- * (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
8072
- * restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
8073
- * detection pipeline executor actually routes.
8074
- *
8075
- * This is deliberately a DIFFERENT, narrower shape than the general-purpose
8076
- * `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
8077
- * and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
8078
- * enum) — the two used to share the name `ClassMapDefinition`/
8079
- * `ClassMapDefinitionSchema`, which made the schema-type-twin guard
8080
- * (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
8081
- * are not: it is two different concepts colliding on a name. Keep this type
8082
- * under its own name rather than reusing `ClassMapDefinition` — reusing it
8083
- * would either narrow every `ClassMapDefinition` consumer to the four
8084
- * detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
8085
- * schema exists for (see the "rejects a classMap whose target is not a
8086
- * detection macro" test in `model-catalog-schema.test.ts`).
8087
- */
8088
- var DetectionCatalogClassMapSchema = object({
8089
- mapping: record(string(), _enum([
8090
- "person",
8091
- "vehicle",
8092
- "animal",
8093
- "package"
8094
- ])),
8095
- preserveOriginal: boolean()
8096
- });
8097
8167
  var MODEL_FORMATS = [
8098
8168
  "onnx",
8099
8169
  "coreml",
@@ -21313,7 +21383,7 @@ var lifecycleJobSchema = object({
21313
21383
  * `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
21314
21384
  * as every other cap.
21315
21385
  */
21316
- var LogLevelSchema$1 = _enum([
21386
+ var LogLevelSchema$2 = _enum([
21317
21387
  "debug",
21318
21388
  "info",
21319
21389
  "warn",
@@ -21520,7 +21590,7 @@ var CustomActionInputSchema = object({
21520
21590
  method(_void(), array(AddonListItemSchema).readonly()), method(object({
21521
21591
  addonId: string(),
21522
21592
  limit: number().min(1).max(500).default(100),
21523
- level: LogLevelSchema$1.optional()
21593
+ level: LogLevelSchema$2.optional()
21524
21594
  }), array(LogQueryEntrySchema)), method(_void(), array(InstalledPackageSchema).readonly()), method(object({
21525
21595
  packageName: string(),
21526
21596
  version: string().optional()
@@ -21618,7 +21688,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
21618
21688
  auth: "admin"
21619
21689
  }), method(object({
21620
21690
  addonId: string(),
21621
- level: LogLevelSchema$1.optional()
21691
+ level: LogLevelSchema$2.optional()
21622
21692
  }), LogStreamEntrySchema, { kind: "subscription" });
21623
21693
  /**
21624
21694
  * Multi-metric air-quality slice. Covers CO₂, total VOCs, particulate
@@ -23350,6 +23420,35 @@ var FaceFilterEnum = _enum([
23350
23420
  "identified",
23351
23421
  "all"
23352
23422
  ]);
23423
+ /**
23424
+ * What a `listRecentFaces` page is ORDERED BY.
23425
+ *
23426
+ * - `timestamp` — when the face was seen. The historical (and default) order.
23427
+ * - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
23428
+ * cosine of the face's SUGGESTED identity. This is the "review by certainty"
23429
+ * order: it puts the suggestions an operator can confirm with one tap at the
23430
+ * top, and it is the reason this enum exists — a client that ranked a capped
23431
+ * page client-side was ranking the newest N, never the most certain N.
23432
+ *
23433
+ * A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
23434
+ * auto-assigned face, or a face below the suggestion band) has no certainty to
23435
+ * compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
23436
+ * — flipping the direction reorders the rows that HAVE a certainty and never
23437
+ * floods the page with the ones that do not. `addon-post-analysis`'s
23438
+ * `store/face-sort.ts` is the single implementation, tiebreaks newest-first
23439
+ * then by faceId, and is what makes this a total order instead of the
23440
+ * backend's NULL-collation accident.
23441
+ */
23442
+ var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
23443
+ var FaceSortDirectionEnum = _enum(["asc", "desc"]);
23444
+ /** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
23445
+ * never leaves the server. */
23446
+ var FaceClusterSchema = object({
23447
+ faceIds: array(string()).readonly(),
23448
+ representativeFaceId: string(),
23449
+ size: number().int(),
23450
+ cohesion: number()
23451
+ });
23353
23452
  var MediaFileLiteSchema$1 = object({
23354
23453
  key: string(),
23355
23454
  kind: string(),
@@ -23396,24 +23495,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
23396
23495
  kind: "mutation",
23397
23496
  auth: "admin"
23398
23497
  }), method(object({
23399
- /** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
23498
+ /**
23499
+ * Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
23500
+ *
23501
+ * The legacy single-camera form, kept verbatim for every caller that
23502
+ * already sends it. A caller that wants a SET sends {@link deviceIds}
23503
+ * instead — never both: `deviceIds` is the authority whenever it is
23504
+ * present, and this field is then ignored rather than unioned, so
23505
+ * there is exactly one answer to "which cameras did I ask for".
23506
+ */
23400
23507
  deviceId: number().int().optional(),
23508
+ /**
23509
+ * Restrict to a SET of cameras — the review UI's camera filter, which
23510
+ * until now had to fetch the cluster-wide page and drop rows in the
23511
+ * client (so the `limit` it asked for was spent on cameras it was
23512
+ * about to discard).
23513
+ *
23514
+ * An **empty array reads NOTHING** — `[]` is an empty page, never
23515
+ * "every camera". A request for no devices is a request, not an
23516
+ * omission; same contract as `deviceManager.listFleet` and
23517
+ * `pipelineAnalytics.listRecentTracks`.
23518
+ *
23519
+ * Absent (`undefined`) is the omission, and keeps the cluster-wide view.
23520
+ */
23521
+ deviceIds: array(number().int()).optional(),
23401
23522
  limit: number().int().positive().optional(),
23402
23523
  filter: FaceFilterEnum.optional(),
23403
23524
  /**
23404
- * Inline the base64 crop on every row. Default `true` — the existing
23405
- * behaviour, kept so no caller breaks.
23525
+ * Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
23526
+ * Absent means no lower bound.
23527
+ */
23528
+ since: number().int().optional(),
23529
+ /**
23530
+ * Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
23531
+ * Absent means no upper bound.
23532
+ */
23533
+ until: number().int().optional(),
23534
+ /**
23535
+ * Order the page by time or by suggestion certainty. Default
23536
+ * `'timestamp'` — the historical order, unchanged for every caller
23537
+ * that does not ask.
23406
23538
  *
23407
- * Set `false` once the caller renders {@link FaceInfo.cropUrl}: that
23408
- * drops ~2.87 MiB per 500-row page to a few KiB of metadata and lets
23409
- * the browser cache the images.
23539
+ * See {@link FaceSortFieldEnum} for what a row with no suggestion
23540
+ * does under `'suggestionConfidence'`.
23410
23541
  *
23411
- * **This is an INPUT field, so it does not reach the addon until the
23412
- * next train.** The hub router validates cap inputs against its own
23413
- * compiled Zod, which strips a key it does not know verified today
23414
- * on the OUTPUT side, where an additive field DOES arrive immediately
23415
- * (`Track.hasFace`). Until the train ships, sending `false` is
23416
- * harmless and simply keeps the crops inline.
23542
+ * Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
23543
+ * index and stops reading as soon as `limit` rows have PASSED the
23544
+ * filter. `'suggestionConfidence'` cannot stop earlythe most
23545
+ * certain row may be the oldest so it walks the window. Narrow it
23546
+ * with {@link since} / {@link until}.
23547
+ */
23548
+ sortBy: FaceSortFieldEnum.optional(),
23549
+ /** Sort direction for {@link sortBy}. Default `'desc'`. */
23550
+ sortDirection: FaceSortDirectionEnum.optional(),
23551
+ /**
23552
+ * Inline the base64 crop on every row.
23553
+ *
23554
+ * Default `false` since the 2026-08-25 inversion — see
23555
+ * `include-crops-default.ts`, which is the ONE place that resolves
23556
+ * this for every gallery, and which records why the inline shape had
23557
+ * to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
23558
+ * The doc here used to still say `true`; it was wrong, and a leftover
23559
+ * that describes the old design reads as permission to rely on it.
23560
+ *
23561
+ * Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
23562
+ * which the browser fetches off the `event-media` plane in parallel,
23563
+ * cached and ETagged.
23417
23564
  */
23418
23565
  includeCrops: boolean().optional()
23419
23566
  }).optional(), array(FaceInfoSchema).readonly()), method(object({
@@ -23449,13 +23596,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
23449
23596
  }), method(object({
23450
23597
  threshold: number().min(0).max(1).optional(),
23451
23598
  minClusterSize: number().int().min(2).optional(),
23452
- limit: number().int().positive().optional()
23453
- }).optional(), array(object({
23454
- faceIds: array(string()).readonly(),
23455
- representativeFaceId: string(),
23456
- size: number().int(),
23457
- cohesion: number()
23458
- })).readonly());
23599
+ /**
23600
+ * Cap on the number of CLUSTERS returned. Renamed from `limit`,
23601
+ * which read as though it bounded the work — it never did.
23602
+ *
23603
+ * Wins over {@link limit} when both are sent.
23604
+ */
23605
+ maxClusters: number().int().positive().optional(),
23606
+ /**
23607
+ * @deprecated Ambiguous name for {@link maxClusters} — it cuts the
23608
+ * RESULT, not the scan. Kept so existing callers keep working; send
23609
+ * `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
23610
+ */
23611
+ limit: number().int().positive().optional(),
23612
+ /**
23613
+ * Cap on the number of unassigned faces READ AND CLUSTERED — the
23614
+ * POOL, not the result.
23615
+ *
23616
+ * This is the knob {@link maxClusters} was mistaken for. Clustering
23617
+ * used to read every unassigned face on the hub no matter what the
23618
+ * caller asked for, because the only bound cut the finished clusters
23619
+ * afterwards; a UI showing a window of 100 paid for a scan of the
23620
+ * whole corpus, on an addon whose disk is under contention.
23621
+ *
23622
+ * The pool is the NEWEST matching faces first — the same order the
23623
+ * gallery shows — so a bound here shortens the horizon, it does not
23624
+ * sample it randomly.
23625
+ *
23626
+ * Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
23627
+ * so the live corpus — 372 face rows — is unaffected while the
23628
+ * unbounded scan can never come back as the table grows.
23629
+ */
23630
+ maxFacesScanned: number().int().positive().optional()
23631
+ }).optional(), array(FaceClusterSchema).readonly());
23459
23632
  /**
23460
23633
  * Fan-control cap. Models HA `fan.*` entity-specific surfaces:
23461
23634
  * speed percentage, preset modes, ceiling-fan direction, and
@@ -28397,6 +28570,211 @@ var SetSiteLocationInputSchema = object({
28397
28570
  latitude: number().min(-90).max(90),
28398
28571
  longitude: number().min(-180).max(180)
28399
28572
  }).nullable();
28573
+ /**
28574
+ * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
28575
+ * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
28576
+ * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
28577
+ * already prints - never a token, never an `Authorization` header.
28578
+ */
28579
+ var RequestCensusGroupSchema = object({
28580
+ procedure: string(),
28581
+ userAgent: string(),
28582
+ ip: string(),
28583
+ principal: string(),
28584
+ calls: number(),
28585
+ perMin: number()
28586
+ });
28587
+ /**
28588
+ * A procedure's TOTAL over the window, across every caller.
28589
+ *
28590
+ * This block, not the group list, is what answers "did these calls arrive over
28591
+ * HTTP at all". A total far BELOW what a store-side census counted over the
28592
+ * same window excludes the HTTP plane, which is a result, not a failure.
28593
+ */
28594
+ var RequestCensusProcedureSchema = object({
28595
+ procedure: string(),
28596
+ calls: number(),
28597
+ perMin: number()
28598
+ });
28599
+ /**
28600
+ * The census as an operator sees it.
28601
+ *
28602
+ * `persisted` is the honest answer to "will this survive the restart I am
28603
+ * about to do": the arm deadline is written to `system-settings` so a window
28604
+ * armed now can measure the NEXT boot, and a write that failed must not look
28605
+ * like one that succeeded.
28606
+ */
28607
+ var RequestCensusStatusSchema = object({
28608
+ armed: boolean(),
28609
+ /** How long the current - or just-closed - window collected, in ms. */
28610
+ elapsedMs: number(),
28611
+ /** The window actually armed, after the server clamped the request. */
28612
+ windowMs: number(),
28613
+ /** Epoch ms the window closes at. 0 when disarmed. */
28614
+ armedUntilMs: number(),
28615
+ httpRequests: number(),
28616
+ batchedRequests: number(),
28617
+ /**
28618
+ * Procedure invocations. Higher than `httpRequests` whenever tRPC batching
28619
+ * is in play (`?batch=1` carries several procedures in one request); this is
28620
+ * the number comparable with a store-side call count.
28621
+ */
28622
+ procedureCalls: number(),
28623
+ /**
28624
+ * tRPC WebSocket connections opened during the window. NOT calls - the WS
28625
+ * transport resolves one context per connection - but the number that says
28626
+ * whether a plane this census cannot see was busy while HTTP was quiet.
28627
+ */
28628
+ wsConnections: number(),
28629
+ distinctGroups: number(),
28630
+ /** Calls counted in the totals whose group attribution was shed at the
28631
+ * cardinality bound. */
28632
+ unattributedCalls: number(),
28633
+ procedures: array(RequestCensusProcedureSchema).readonly(),
28634
+ groups: array(RequestCensusGroupSchema).readonly()
28635
+ }).extend({ persisted: boolean() });
28636
+ /** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
28637
+ var LogLevelSchema$1 = _enum([
28638
+ "debug",
28639
+ "info",
28640
+ "warn",
28641
+ "error"
28642
+ ]);
28643
+ /**
28644
+ * The diagnostics that can be ARMED for a window. Exactly one today.
28645
+ *
28646
+ * A diagnostic is anything whose cost is only worth paying while a question is
28647
+ * open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
28648
+ */
28649
+ var DiagnosticIdSchema = _enum(["request-census"]);
28650
+ /**
28651
+ * The layers of the level hierarchy, general → specific. The most specific
28652
+ * layer that carries an explicit value wins.
28653
+ *
28654
+ * `component` is DECLARED and not yet resolvable: the per-component channels
28655
+ * are a later slice of the same plan, and a `levelSource` enum that has to
28656
+ * grow later would force every consumer of this document to change with it.
28657
+ * Nothing returns `component` today.
28658
+ */
28659
+ var LoggingScopeKindSchema = _enum([
28660
+ "cluster",
28661
+ "node",
28662
+ "component"
28663
+ ]);
28664
+ /** Where an effective level came from. `default` = nothing is set anywhere. */
28665
+ var LoggingLevelSourceSchema = _enum([
28666
+ "default",
28667
+ "cluster",
28668
+ "node",
28669
+ "component"
28670
+ ]);
28671
+ /**
28672
+ * One layer of the hierarchy as it actually STANDS.
28673
+ *
28674
+ * `level: null` is the whole reason this array is returned: it is the
28675
+ * difference between "this node is at `info` because I decided it" and
28676
+ * "...because it inherits". An operator who clears an override believing they
28677
+ * are clearing an inherited value has been handed the same defect as the two
28678
+ * contradicting knobs this document exists to remove, moved one floor up.
28679
+ */
28680
+ var LoggingLevelLayerSchema = object({
28681
+ scope: LoggingScopeKindSchema,
28682
+ /** The node this layer speaks for; `null` on the cluster layer. */
28683
+ nodeId: string().nullable(),
28684
+ /** Explicitly set here, or `null` when this layer inherits. */
28685
+ level: LogLevelSchema$1.nullable()
28686
+ });
28687
+ /** What a line is judged against, and WHICH layer decided it. */
28688
+ var LoggingEffectiveSchema = object({
28689
+ level: LogLevelSchema$1,
28690
+ levelSource: LoggingLevelSourceSchema
28691
+ });
28692
+ /** Every layer, general → specific. Never collapsed into the effective value. */
28693
+ var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
28694
+ /**
28695
+ * An armed diagnostic, with its DEADLINE.
28696
+ *
28697
+ * The shape of ADR-0244: what is stored is a deadline and never a flag, so a
28698
+ * diagnostic somebody forgot expires by itself, and a boot-window measurement
28699
+ * survives the restart it exists to measure. `remainingMs` is 0 whenever
28700
+ * `armed` is false — a window is never reported as slightly expired.
28701
+ */
28702
+ var DiagnosticWindowSchema = object({
28703
+ id: DiagnosticIdSchema,
28704
+ armed: boolean(),
28705
+ /** Epoch ms the window closes at. 0 when disarmed. */
28706
+ armedUntilMs: number(),
28707
+ /** Ms left before it expires on its own. 0 when disarmed. */
28708
+ remainingMs: number(),
28709
+ /** Whether the stored deadline is the one the live diagnostic is running —
28710
+ * i.e. whether this window would survive a restart. */
28711
+ persisted: boolean()
28712
+ });
28713
+ /**
28714
+ * `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
28715
+ * server — there is no maximum here on purpose: a bound repeated in a schema
28716
+ * is a second knob that disagrees with the first the day one of them moves.
28717
+ */
28718
+ var DiagnosticWindowPatchSchema = object({
28719
+ id: DiagnosticIdSchema,
28720
+ armMs: number().int().min(0),
28721
+ /** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
28722
+ reportEveryMs: number().int().positive().optional()
28723
+ });
28724
+ /**
28725
+ * A PATCH, and patches MERGE.
28726
+ *
28727
+ * A field absent from the patch is left exactly as it was — arming a
28728
+ * diagnostic never resets a level, and setting a level never disarms a window.
28729
+ * The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
28730
+ * `setAll` already merges, and rebuilding the object is how an absent field
28731
+ * turns into an erased one.
28732
+ */
28733
+ var LoggingSettingsPatchSchema = object({
28734
+ /**
28735
+ * Absent leaves the level untouched. `null` CLEARS the explicit value at the
28736
+ * addressed scope so it inherits again. A value sets it.
28737
+ */
28738
+ level: LogLevelSchema$1.nullable().optional(),
28739
+ /**
28740
+ * Only the diagnostics NAMED here change. An armed window that is not listed
28741
+ * keeps running — a patch is never a full replacement.
28742
+ */
28743
+ diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
28744
+ });
28745
+ /**
28746
+ * Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
28747
+ *
28748
+ * Deliberately NOT called `nodeId`: that key is reserved on every cap method
28749
+ * input — the generated router strips it and uses it to resolve the PROVIDER
28750
+ * on that node (`resolveProvider(cap, nodeId, …)`). A document about
28751
+ * `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
28752
+ * by an agent that holds no cluster document at all. The hub is the single
28753
+ * authority over the whole hierarchy and answers for every layer, so the
28754
+ * layer selector needs a name the transport does not already own.
28755
+ */
28756
+ var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
28757
+ var SetLoggingSettingsInputSchema = object({
28758
+ scopeNodeId: string().optional(),
28759
+ patch: LoggingSettingsPatchSchema
28760
+ });
28761
+ /**
28762
+ * The whole document, as read and as returned after every write.
28763
+ *
28764
+ * `persisted: false` means the settings store could not be read or written.
28765
+ * The in-memory mirror still governs behaviour and is unchanged by the
28766
+ * failure — a read that fails neither switches a level nor disarms a window
28767
+ * (D49) — but the operator is told that what they are looking at would not
28768
+ * survive a restart.
28769
+ */
28770
+ var LoggingSettingsStateSchema = object({
28771
+ /** The layer this document was read at. `null` = the cluster layer. */
28772
+ scopeNodeId: string().nullable(),
28773
+ effective: LoggingEffectiveSchema,
28774
+ explicit: LoggingExplicitSchema,
28775
+ activeWindows: array(DiagnosticWindowSchema).readonly(),
28776
+ persisted: boolean()
28777
+ });
28400
28778
  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(), {
28401
28779
  kind: "mutation",
28402
28780
  auth: "admin"
@@ -28409,6 +28787,9 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
28409
28787
  }), method(_void(), SiteLocationStatusSchema, {
28410
28788
  kind: "mutation",
28411
28789
  auth: "admin"
28790
+ }), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
28791
+ kind: "mutation",
28792
+ auth: "admin"
28412
28793
  });
28413
28794
  /**
28414
28795
  * Tamper / case-open detection sensor. Drives Home Assistant
@@ -35714,6 +36095,18 @@ Object.freeze({
35714
36095
  addonId: null,
35715
36096
  access: "create"
35716
36097
  },
36098
+ "system.getLoggingSettings": {
36099
+ capName: "system",
36100
+ capScope: "system",
36101
+ addonId: null,
36102
+ access: "view"
36103
+ },
36104
+ "system.getRequestCensus": {
36105
+ capName: "system",
36106
+ capScope: "system",
36107
+ addonId: null,
36108
+ access: "view"
36109
+ },
35717
36110
  "system.getRetentionConfig": {
35718
36111
  capName: "system",
35719
36112
  capScope: "system",
@@ -35744,6 +36137,12 @@ Object.freeze({
35744
36137
  addonId: null,
35745
36138
  access: "view"
35746
36139
  },
36140
+ "system.setLoggingSettings": {
36141
+ capName: "system",
36142
+ capScope: "system",
36143
+ addonId: null,
36144
+ access: "create"
36145
+ },
35747
36146
  "system.setRetentionConfig": {
35748
36147
  capName: "system",
35749
36148
  capScope: "system",
@@ -36899,6 +37298,10 @@ Object.freeze({
36899
37298
  name: "deviceId",
36900
37299
  form: "single",
36901
37300
  optional: true
37301
+ }, {
37302
+ name: "deviceIds",
37303
+ form: "array",
37304
+ optional: true
36902
37305
  }],
36903
37306
  "fanControl.setDirection": [{
36904
37307
  name: "deviceId",
@@ -38509,7 +38912,38 @@ object({
38509
38912
  * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
38510
38913
  * reproduce that.
38511
38914
  */
38512
- tileBudgetMb: number().int().min(0).max(1024)
38915
+ tileBudgetMb: number().int().min(0).max(1024),
38916
+ /**
38917
+ * RAM ceiling per decode worker, in MB, for the SCENE TILES — one
38918
+ * JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
38919
+ * subject tiles, on frames that detected something.
38920
+ *
38921
+ * It exists because a subject tile cannot answer a FULL-FRAME request:
38922
+ * containment is strict by design, so the native `keyFrame`, the detail
38923
+ * plane's `frameJpeg` rung and the display-crop fallback had no rung at all
38924
+ * below the hold. Measured on the live cluster: 23.3% of key-frame captures
38925
+ * missed, 95.7% of them with `worker-lease-gone` — the raster released one
38926
+ * frame-time after delivery, with the request only p50 367 ms behind it.
38927
+ *
38928
+ * Sizing, and why this is a budget and not a duration: a scene tile is
38929
+ * ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
38930
+ * ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
38931
+ * camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
38932
+ * frames, i.e. the store's 30 s TTL binds at the steady state and the budget
38933
+ * binds only through a detection burst, where it still covers well past the
38934
+ * measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
38935
+ * would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
38936
+ * whole shape exists to avoid.
38937
+ *
38938
+ * A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
38939
+ * subject tile, so one shared budget would let a busy camera's key frames
38940
+ * evict the face/plate tiles the recognisers depend on. Two budgets make that
38941
+ * impossible rather than unlikely. `0` DISABLES scene tiles and restores the
38942
+ * pre-existing behaviour, where a late full-frame request had nothing but the
38943
+ * ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
38944
+ * nothing.
38945
+ */
38946
+ sceneBudgetMb: number().int().min(0).max(1024)
38513
38947
  });
38514
38948
  /**
38515
38949
  * The values in force when the operator has set nothing.
@@ -38525,12 +38959,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
38525
38959
  budgetMb: 1024,
38526
38960
  activityMs: 15e3,
38527
38961
  tileBudgetMb: 64,
38962
+ sceneBudgetMb: 48,
38528
38963
  admission: "inferred"
38529
38964
  };
38530
38965
  DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
38531
38966
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
38532
38967
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
38533
38968
  DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
38969
+ DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
38534
38970
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
38535
38971
  /**
38536
38972
  * Names that, when used as URL query parameters, almost certainly carry
package/dist/addon.mjs CHANGED
@@ -7558,6 +7558,66 @@ var OpsLogQueryInputSchema = object({
7558
7558
  /** Max rows returned, newest-first. */
7559
7559
  limit: number().int().min(1).max(1e3).optional()
7560
7560
  });
7561
+ var LabelDefinitionSchema = object({
7562
+ id: string(),
7563
+ name: string(),
7564
+ category: string().optional(),
7565
+ description: string().optional(),
7566
+ icon: string().optional()
7567
+ });
7568
+ /** Detection-macro targets a catalog `classMap` may resolve to. */
7569
+ var CLASS_MAP_MACRO_TARGETS = [
7570
+ "person",
7571
+ "vehicle",
7572
+ "animal",
7573
+ "package"
7574
+ ];
7575
+ /**
7576
+ * Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
7577
+ * un operatore può selezionare.
7578
+ *
7579
+ * Sono le tre offerte dallo step `object-detection`
7580
+ * (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
7581
+ * `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
7582
+ * `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
7583
+ * `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
7584
+ * stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
7585
+ * (suitcase/backpack/handbag) lasciando spento il detector dedicato.
7586
+ *
7587
+ * UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
7588
+ * dello step e una seconda volta come union `FirstLevelMacro`
7589
+ * (`types/detection.ts`); una terza copia per il trigger di registrazione
7590
+ * (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
7591
+ * successiva.
7592
+ */
7593
+ var FIRST_LEVEL_MACRO_CLASSES = [
7594
+ "person",
7595
+ "vehicle",
7596
+ "animal"
7597
+ ];
7598
+ /**
7599
+ * Wire schema for a per-model CATALOG classMap override
7600
+ * (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
7601
+ * restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
7602
+ * detection pipeline executor actually routes.
7603
+ *
7604
+ * This is deliberately a DIFFERENT, narrower shape than the general-purpose
7605
+ * `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
7606
+ * and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
7607
+ * enum) — the two used to share the name `ClassMapDefinition`/
7608
+ * `ClassMapDefinitionSchema`, which made the schema-type-twin guard
7609
+ * (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
7610
+ * are not: it is two different concepts colliding on a name. Keep this type
7611
+ * under its own name rather than reusing `ClassMapDefinition` — reusing it
7612
+ * would either narrow every `ClassMapDefinition` consumer to the four
7613
+ * detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
7614
+ * schema exists for (see the "rejects a classMap whose target is not a
7615
+ * detection macro" test in `model-catalog-schema.test.ts`).
7616
+ */
7617
+ var DetectionCatalogClassMapSchema = object({
7618
+ mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
7619
+ preserveOriginal: boolean()
7620
+ });
7561
7621
  /**
7562
7622
  * Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
7563
7623
  * Named `RecordingWeekday` to avoid collision with the string-union
@@ -7580,10 +7640,55 @@ var RecordingStorageModeSchema = _enum([
7580
7640
  "events",
7581
7641
  "continuous"
7582
7642
  ]);
7643
+ /**
7644
+ * Le macro classi che possono aprire una finestra di registrazione — le stesse
7645
+ * tre offerte dallo step `object-detection`, da UNA lista
7646
+ * ({@link FIRST_LEVEL_MACRO_CLASSES}).
7647
+ */
7648
+ var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
7649
+ /**
7650
+ * True quando `values` non ripete un elemento.
7651
+ *
7652
+ * Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
7653
+ * diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
7654
+ * conterebbe due volte le sue finestre in `segmentMissedByMs`.
7655
+ */
7656
+ var noDuplicates = (values) => new Set(values).size === values.length;
7583
7657
  /** Which detectors trigger an `events`-mode band. */
7584
7658
  var RecordingTriggersSchema = object({
7585
7659
  motion: boolean().optional(),
7586
- audioThresholdDbfs: number().optional()
7660
+ audioThresholdDbfs: number().optional(),
7661
+ /**
7662
+ * Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
7663
+ * non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
7664
+ * object acceso, nessuna classe" è la stessa forma "abilitata e non registra
7665
+ * nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
7666
+ *
7667
+ * Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
7668
+ * quelle che hanno attraversato `enabledMacroClasses`, i
7669
+ * `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
7670
+ * (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
7671
+ * finestre — vedi `recorder/object-trigger.ts`.
7672
+ */
7673
+ objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
7674
+ /**
7675
+ * I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
7676
+ * non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
7677
+ * `objectClasses`.
7678
+ *
7679
+ * Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
7680
+ * percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
7681
+ * non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
7682
+ * si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
7683
+ * device (D12) — mai un elenco globale di cap.
7684
+ *
7685
+ * Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
7686
+ * `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
7687
+ * la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
7688
+ * il livello: un contatto trovato già aperto al riavvio del runner non fa
7689
+ * registrare.
7690
+ */
7691
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7587
7692
  });
7588
7693
  /**
7589
7694
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -8035,41 +8140,6 @@ var DecoderSessionConfigSchema = object({
8035
8140
  */
8036
8141
  debug: boolean().optional()
8037
8142
  });
8038
- var LabelDefinitionSchema = object({
8039
- id: string(),
8040
- name: string(),
8041
- category: string().optional(),
8042
- description: string().optional(),
8043
- icon: string().optional()
8044
- });
8045
- /**
8046
- * Wire schema for a per-model CATALOG classMap override
8047
- * (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
8048
- * restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
8049
- * detection pipeline executor actually routes.
8050
- *
8051
- * This is deliberately a DIFFERENT, narrower shape than the general-purpose
8052
- * `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
8053
- * and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
8054
- * enum) — the two used to share the name `ClassMapDefinition`/
8055
- * `ClassMapDefinitionSchema`, which made the schema-type-twin guard
8056
- * (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
8057
- * are not: it is two different concepts colliding on a name. Keep this type
8058
- * under its own name rather than reusing `ClassMapDefinition` — reusing it
8059
- * would either narrow every `ClassMapDefinition` consumer to the four
8060
- * detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
8061
- * schema exists for (see the "rejects a classMap whose target is not a
8062
- * detection macro" test in `model-catalog-schema.test.ts`).
8063
- */
8064
- var DetectionCatalogClassMapSchema = object({
8065
- mapping: record(string(), _enum([
8066
- "person",
8067
- "vehicle",
8068
- "animal",
8069
- "package"
8070
- ])),
8071
- preserveOriginal: boolean()
8072
- });
8073
8143
  var MODEL_FORMATS = [
8074
8144
  "onnx",
8075
8145
  "coreml",
@@ -21289,7 +21359,7 @@ var lifecycleJobSchema = object({
21289
21359
  * `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
21290
21360
  * as every other cap.
21291
21361
  */
21292
- var LogLevelSchema$1 = _enum([
21362
+ var LogLevelSchema$2 = _enum([
21293
21363
  "debug",
21294
21364
  "info",
21295
21365
  "warn",
@@ -21496,7 +21566,7 @@ var CustomActionInputSchema = object({
21496
21566
  method(_void(), array(AddonListItemSchema).readonly()), method(object({
21497
21567
  addonId: string(),
21498
21568
  limit: number().min(1).max(500).default(100),
21499
- level: LogLevelSchema$1.optional()
21569
+ level: LogLevelSchema$2.optional()
21500
21570
  }), array(LogQueryEntrySchema)), method(_void(), array(InstalledPackageSchema).readonly()), method(object({
21501
21571
  packageName: string(),
21502
21572
  version: string().optional()
@@ -21594,7 +21664,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
21594
21664
  auth: "admin"
21595
21665
  }), method(object({
21596
21666
  addonId: string(),
21597
- level: LogLevelSchema$1.optional()
21667
+ level: LogLevelSchema$2.optional()
21598
21668
  }), LogStreamEntrySchema, { kind: "subscription" });
21599
21669
  /**
21600
21670
  * Multi-metric air-quality slice. Covers CO₂, total VOCs, particulate
@@ -23326,6 +23396,35 @@ var FaceFilterEnum = _enum([
23326
23396
  "identified",
23327
23397
  "all"
23328
23398
  ]);
23399
+ /**
23400
+ * What a `listRecentFaces` page is ORDERED BY.
23401
+ *
23402
+ * - `timestamp` — when the face was seen. The historical (and default) order.
23403
+ * - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
23404
+ * cosine of the face's SUGGESTED identity. This is the "review by certainty"
23405
+ * order: it puts the suggestions an operator can confirm with one tap at the
23406
+ * top, and it is the reason this enum exists — a client that ranked a capped
23407
+ * page client-side was ranking the newest N, never the most certain N.
23408
+ *
23409
+ * A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
23410
+ * auto-assigned face, or a face below the suggestion band) has no certainty to
23411
+ * compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
23412
+ * — flipping the direction reorders the rows that HAVE a certainty and never
23413
+ * floods the page with the ones that do not. `addon-post-analysis`'s
23414
+ * `store/face-sort.ts` is the single implementation, tiebreaks newest-first
23415
+ * then by faceId, and is what makes this a total order instead of the
23416
+ * backend's NULL-collation accident.
23417
+ */
23418
+ var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
23419
+ var FaceSortDirectionEnum = _enum(["asc", "desc"]);
23420
+ /** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
23421
+ * never leaves the server. */
23422
+ var FaceClusterSchema = object({
23423
+ faceIds: array(string()).readonly(),
23424
+ representativeFaceId: string(),
23425
+ size: number().int(),
23426
+ cohesion: number()
23427
+ });
23329
23428
  var MediaFileLiteSchema$1 = object({
23330
23429
  key: string(),
23331
23430
  kind: string(),
@@ -23372,24 +23471,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
23372
23471
  kind: "mutation",
23373
23472
  auth: "admin"
23374
23473
  }), method(object({
23375
- /** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
23474
+ /**
23475
+ * Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
23476
+ *
23477
+ * The legacy single-camera form, kept verbatim for every caller that
23478
+ * already sends it. A caller that wants a SET sends {@link deviceIds}
23479
+ * instead — never both: `deviceIds` is the authority whenever it is
23480
+ * present, and this field is then ignored rather than unioned, so
23481
+ * there is exactly one answer to "which cameras did I ask for".
23482
+ */
23376
23483
  deviceId: number().int().optional(),
23484
+ /**
23485
+ * Restrict to a SET of cameras — the review UI's camera filter, which
23486
+ * until now had to fetch the cluster-wide page and drop rows in the
23487
+ * client (so the `limit` it asked for was spent on cameras it was
23488
+ * about to discard).
23489
+ *
23490
+ * An **empty array reads NOTHING** — `[]` is an empty page, never
23491
+ * "every camera". A request for no devices is a request, not an
23492
+ * omission; same contract as `deviceManager.listFleet` and
23493
+ * `pipelineAnalytics.listRecentTracks`.
23494
+ *
23495
+ * Absent (`undefined`) is the omission, and keeps the cluster-wide view.
23496
+ */
23497
+ deviceIds: array(number().int()).optional(),
23377
23498
  limit: number().int().positive().optional(),
23378
23499
  filter: FaceFilterEnum.optional(),
23379
23500
  /**
23380
- * Inline the base64 crop on every row. Default `true` — the existing
23381
- * behaviour, kept so no caller breaks.
23501
+ * Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
23502
+ * Absent means no lower bound.
23503
+ */
23504
+ since: number().int().optional(),
23505
+ /**
23506
+ * Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
23507
+ * Absent means no upper bound.
23508
+ */
23509
+ until: number().int().optional(),
23510
+ /**
23511
+ * Order the page by time or by suggestion certainty. Default
23512
+ * `'timestamp'` — the historical order, unchanged for every caller
23513
+ * that does not ask.
23382
23514
  *
23383
- * Set `false` once the caller renders {@link FaceInfo.cropUrl}: that
23384
- * drops ~2.87 MiB per 500-row page to a few KiB of metadata and lets
23385
- * the browser cache the images.
23515
+ * See {@link FaceSortFieldEnum} for what a row with no suggestion
23516
+ * does under `'suggestionConfidence'`.
23386
23517
  *
23387
- * **This is an INPUT field, so it does not reach the addon until the
23388
- * next train.** The hub router validates cap inputs against its own
23389
- * compiled Zod, which strips a key it does not know verified today
23390
- * on the OUTPUT side, where an additive field DOES arrive immediately
23391
- * (`Track.hasFace`). Until the train ships, sending `false` is
23392
- * harmless and simply keeps the crops inline.
23518
+ * Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
23519
+ * index and stops reading as soon as `limit` rows have PASSED the
23520
+ * filter. `'suggestionConfidence'` cannot stop earlythe most
23521
+ * certain row may be the oldest so it walks the window. Narrow it
23522
+ * with {@link since} / {@link until}.
23523
+ */
23524
+ sortBy: FaceSortFieldEnum.optional(),
23525
+ /** Sort direction for {@link sortBy}. Default `'desc'`. */
23526
+ sortDirection: FaceSortDirectionEnum.optional(),
23527
+ /**
23528
+ * Inline the base64 crop on every row.
23529
+ *
23530
+ * Default `false` since the 2026-08-25 inversion — see
23531
+ * `include-crops-default.ts`, which is the ONE place that resolves
23532
+ * this for every gallery, and which records why the inline shape had
23533
+ * to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
23534
+ * The doc here used to still say `true`; it was wrong, and a leftover
23535
+ * that describes the old design reads as permission to rely on it.
23536
+ *
23537
+ * Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
23538
+ * which the browser fetches off the `event-media` plane in parallel,
23539
+ * cached and ETagged.
23393
23540
  */
23394
23541
  includeCrops: boolean().optional()
23395
23542
  }).optional(), array(FaceInfoSchema).readonly()), method(object({
@@ -23425,13 +23572,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
23425
23572
  }), method(object({
23426
23573
  threshold: number().min(0).max(1).optional(),
23427
23574
  minClusterSize: number().int().min(2).optional(),
23428
- limit: number().int().positive().optional()
23429
- }).optional(), array(object({
23430
- faceIds: array(string()).readonly(),
23431
- representativeFaceId: string(),
23432
- size: number().int(),
23433
- cohesion: number()
23434
- })).readonly());
23575
+ /**
23576
+ * Cap on the number of CLUSTERS returned. Renamed from `limit`,
23577
+ * which read as though it bounded the work — it never did.
23578
+ *
23579
+ * Wins over {@link limit} when both are sent.
23580
+ */
23581
+ maxClusters: number().int().positive().optional(),
23582
+ /**
23583
+ * @deprecated Ambiguous name for {@link maxClusters} — it cuts the
23584
+ * RESULT, not the scan. Kept so existing callers keep working; send
23585
+ * `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
23586
+ */
23587
+ limit: number().int().positive().optional(),
23588
+ /**
23589
+ * Cap on the number of unassigned faces READ AND CLUSTERED — the
23590
+ * POOL, not the result.
23591
+ *
23592
+ * This is the knob {@link maxClusters} was mistaken for. Clustering
23593
+ * used to read every unassigned face on the hub no matter what the
23594
+ * caller asked for, because the only bound cut the finished clusters
23595
+ * afterwards; a UI showing a window of 100 paid for a scan of the
23596
+ * whole corpus, on an addon whose disk is under contention.
23597
+ *
23598
+ * The pool is the NEWEST matching faces first — the same order the
23599
+ * gallery shows — so a bound here shortens the horizon, it does not
23600
+ * sample it randomly.
23601
+ *
23602
+ * Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
23603
+ * so the live corpus — 372 face rows — is unaffected while the
23604
+ * unbounded scan can never come back as the table grows.
23605
+ */
23606
+ maxFacesScanned: number().int().positive().optional()
23607
+ }).optional(), array(FaceClusterSchema).readonly());
23435
23608
  /**
23436
23609
  * Fan-control cap. Models HA `fan.*` entity-specific surfaces:
23437
23610
  * speed percentage, preset modes, ceiling-fan direction, and
@@ -28373,6 +28546,211 @@ var SetSiteLocationInputSchema = object({
28373
28546
  latitude: number().min(-90).max(90),
28374
28547
  longitude: number().min(-180).max(180)
28375
28548
  }).nullable();
28549
+ /**
28550
+ * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
28551
+ * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
28552
+ * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
28553
+ * already prints - never a token, never an `Authorization` header.
28554
+ */
28555
+ var RequestCensusGroupSchema = object({
28556
+ procedure: string(),
28557
+ userAgent: string(),
28558
+ ip: string(),
28559
+ principal: string(),
28560
+ calls: number(),
28561
+ perMin: number()
28562
+ });
28563
+ /**
28564
+ * A procedure's TOTAL over the window, across every caller.
28565
+ *
28566
+ * This block, not the group list, is what answers "did these calls arrive over
28567
+ * HTTP at all". A total far BELOW what a store-side census counted over the
28568
+ * same window excludes the HTTP plane, which is a result, not a failure.
28569
+ */
28570
+ var RequestCensusProcedureSchema = object({
28571
+ procedure: string(),
28572
+ calls: number(),
28573
+ perMin: number()
28574
+ });
28575
+ /**
28576
+ * The census as an operator sees it.
28577
+ *
28578
+ * `persisted` is the honest answer to "will this survive the restart I am
28579
+ * about to do": the arm deadline is written to `system-settings` so a window
28580
+ * armed now can measure the NEXT boot, and a write that failed must not look
28581
+ * like one that succeeded.
28582
+ */
28583
+ var RequestCensusStatusSchema = object({
28584
+ armed: boolean(),
28585
+ /** How long the current - or just-closed - window collected, in ms. */
28586
+ elapsedMs: number(),
28587
+ /** The window actually armed, after the server clamped the request. */
28588
+ windowMs: number(),
28589
+ /** Epoch ms the window closes at. 0 when disarmed. */
28590
+ armedUntilMs: number(),
28591
+ httpRequests: number(),
28592
+ batchedRequests: number(),
28593
+ /**
28594
+ * Procedure invocations. Higher than `httpRequests` whenever tRPC batching
28595
+ * is in play (`?batch=1` carries several procedures in one request); this is
28596
+ * the number comparable with a store-side call count.
28597
+ */
28598
+ procedureCalls: number(),
28599
+ /**
28600
+ * tRPC WebSocket connections opened during the window. NOT calls - the WS
28601
+ * transport resolves one context per connection - but the number that says
28602
+ * whether a plane this census cannot see was busy while HTTP was quiet.
28603
+ */
28604
+ wsConnections: number(),
28605
+ distinctGroups: number(),
28606
+ /** Calls counted in the totals whose group attribution was shed at the
28607
+ * cardinality bound. */
28608
+ unattributedCalls: number(),
28609
+ procedures: array(RequestCensusProcedureSchema).readonly(),
28610
+ groups: array(RequestCensusGroupSchema).readonly()
28611
+ }).extend({ persisted: boolean() });
28612
+ /** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
28613
+ var LogLevelSchema$1 = _enum([
28614
+ "debug",
28615
+ "info",
28616
+ "warn",
28617
+ "error"
28618
+ ]);
28619
+ /**
28620
+ * The diagnostics that can be ARMED for a window. Exactly one today.
28621
+ *
28622
+ * A diagnostic is anything whose cost is only worth paying while a question is
28623
+ * open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
28624
+ */
28625
+ var DiagnosticIdSchema = _enum(["request-census"]);
28626
+ /**
28627
+ * The layers of the level hierarchy, general → specific. The most specific
28628
+ * layer that carries an explicit value wins.
28629
+ *
28630
+ * `component` is DECLARED and not yet resolvable: the per-component channels
28631
+ * are a later slice of the same plan, and a `levelSource` enum that has to
28632
+ * grow later would force every consumer of this document to change with it.
28633
+ * Nothing returns `component` today.
28634
+ */
28635
+ var LoggingScopeKindSchema = _enum([
28636
+ "cluster",
28637
+ "node",
28638
+ "component"
28639
+ ]);
28640
+ /** Where an effective level came from. `default` = nothing is set anywhere. */
28641
+ var LoggingLevelSourceSchema = _enum([
28642
+ "default",
28643
+ "cluster",
28644
+ "node",
28645
+ "component"
28646
+ ]);
28647
+ /**
28648
+ * One layer of the hierarchy as it actually STANDS.
28649
+ *
28650
+ * `level: null` is the whole reason this array is returned: it is the
28651
+ * difference between "this node is at `info` because I decided it" and
28652
+ * "...because it inherits". An operator who clears an override believing they
28653
+ * are clearing an inherited value has been handed the same defect as the two
28654
+ * contradicting knobs this document exists to remove, moved one floor up.
28655
+ */
28656
+ var LoggingLevelLayerSchema = object({
28657
+ scope: LoggingScopeKindSchema,
28658
+ /** The node this layer speaks for; `null` on the cluster layer. */
28659
+ nodeId: string().nullable(),
28660
+ /** Explicitly set here, or `null` when this layer inherits. */
28661
+ level: LogLevelSchema$1.nullable()
28662
+ });
28663
+ /** What a line is judged against, and WHICH layer decided it. */
28664
+ var LoggingEffectiveSchema = object({
28665
+ level: LogLevelSchema$1,
28666
+ levelSource: LoggingLevelSourceSchema
28667
+ });
28668
+ /** Every layer, general → specific. Never collapsed into the effective value. */
28669
+ var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
28670
+ /**
28671
+ * An armed diagnostic, with its DEADLINE.
28672
+ *
28673
+ * The shape of ADR-0244: what is stored is a deadline and never a flag, so a
28674
+ * diagnostic somebody forgot expires by itself, and a boot-window measurement
28675
+ * survives the restart it exists to measure. `remainingMs` is 0 whenever
28676
+ * `armed` is false — a window is never reported as slightly expired.
28677
+ */
28678
+ var DiagnosticWindowSchema = object({
28679
+ id: DiagnosticIdSchema,
28680
+ armed: boolean(),
28681
+ /** Epoch ms the window closes at. 0 when disarmed. */
28682
+ armedUntilMs: number(),
28683
+ /** Ms left before it expires on its own. 0 when disarmed. */
28684
+ remainingMs: number(),
28685
+ /** Whether the stored deadline is the one the live diagnostic is running —
28686
+ * i.e. whether this window would survive a restart. */
28687
+ persisted: boolean()
28688
+ });
28689
+ /**
28690
+ * `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
28691
+ * server — there is no maximum here on purpose: a bound repeated in a schema
28692
+ * is a second knob that disagrees with the first the day one of them moves.
28693
+ */
28694
+ var DiagnosticWindowPatchSchema = object({
28695
+ id: DiagnosticIdSchema,
28696
+ armMs: number().int().min(0),
28697
+ /** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
28698
+ reportEveryMs: number().int().positive().optional()
28699
+ });
28700
+ /**
28701
+ * A PATCH, and patches MERGE.
28702
+ *
28703
+ * A field absent from the patch is left exactly as it was — arming a
28704
+ * diagnostic never resets a level, and setting a level never disarms a window.
28705
+ * The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
28706
+ * `setAll` already merges, and rebuilding the object is how an absent field
28707
+ * turns into an erased one.
28708
+ */
28709
+ var LoggingSettingsPatchSchema = object({
28710
+ /**
28711
+ * Absent leaves the level untouched. `null` CLEARS the explicit value at the
28712
+ * addressed scope so it inherits again. A value sets it.
28713
+ */
28714
+ level: LogLevelSchema$1.nullable().optional(),
28715
+ /**
28716
+ * Only the diagnostics NAMED here change. An armed window that is not listed
28717
+ * keeps running — a patch is never a full replacement.
28718
+ */
28719
+ diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
28720
+ });
28721
+ /**
28722
+ * Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
28723
+ *
28724
+ * Deliberately NOT called `nodeId`: that key is reserved on every cap method
28725
+ * input — the generated router strips it and uses it to resolve the PROVIDER
28726
+ * on that node (`resolveProvider(cap, nodeId, …)`). A document about
28727
+ * `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
28728
+ * by an agent that holds no cluster document at all. The hub is the single
28729
+ * authority over the whole hierarchy and answers for every layer, so the
28730
+ * layer selector needs a name the transport does not already own.
28731
+ */
28732
+ var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
28733
+ var SetLoggingSettingsInputSchema = object({
28734
+ scopeNodeId: string().optional(),
28735
+ patch: LoggingSettingsPatchSchema
28736
+ });
28737
+ /**
28738
+ * The whole document, as read and as returned after every write.
28739
+ *
28740
+ * `persisted: false` means the settings store could not be read or written.
28741
+ * The in-memory mirror still governs behaviour and is unchanged by the
28742
+ * failure — a read that fails neither switches a level nor disarms a window
28743
+ * (D49) — but the operator is told that what they are looking at would not
28744
+ * survive a restart.
28745
+ */
28746
+ var LoggingSettingsStateSchema = object({
28747
+ /** The layer this document was read at. `null` = the cluster layer. */
28748
+ scopeNodeId: string().nullable(),
28749
+ effective: LoggingEffectiveSchema,
28750
+ explicit: LoggingExplicitSchema,
28751
+ activeWindows: array(DiagnosticWindowSchema).readonly(),
28752
+ persisted: boolean()
28753
+ });
28376
28754
  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(), {
28377
28755
  kind: "mutation",
28378
28756
  auth: "admin"
@@ -28385,6 +28763,9 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
28385
28763
  }), method(_void(), SiteLocationStatusSchema, {
28386
28764
  kind: "mutation",
28387
28765
  auth: "admin"
28766
+ }), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
28767
+ kind: "mutation",
28768
+ auth: "admin"
28388
28769
  });
28389
28770
  /**
28390
28771
  * Tamper / case-open detection sensor. Drives Home Assistant
@@ -35690,6 +36071,18 @@ Object.freeze({
35690
36071
  addonId: null,
35691
36072
  access: "create"
35692
36073
  },
36074
+ "system.getLoggingSettings": {
36075
+ capName: "system",
36076
+ capScope: "system",
36077
+ addonId: null,
36078
+ access: "view"
36079
+ },
36080
+ "system.getRequestCensus": {
36081
+ capName: "system",
36082
+ capScope: "system",
36083
+ addonId: null,
36084
+ access: "view"
36085
+ },
35693
36086
  "system.getRetentionConfig": {
35694
36087
  capName: "system",
35695
36088
  capScope: "system",
@@ -35720,6 +36113,12 @@ Object.freeze({
35720
36113
  addonId: null,
35721
36114
  access: "view"
35722
36115
  },
36116
+ "system.setLoggingSettings": {
36117
+ capName: "system",
36118
+ capScope: "system",
36119
+ addonId: null,
36120
+ access: "create"
36121
+ },
35723
36122
  "system.setRetentionConfig": {
35724
36123
  capName: "system",
35725
36124
  capScope: "system",
@@ -36875,6 +37274,10 @@ Object.freeze({
36875
37274
  name: "deviceId",
36876
37275
  form: "single",
36877
37276
  optional: true
37277
+ }, {
37278
+ name: "deviceIds",
37279
+ form: "array",
37280
+ optional: true
36878
37281
  }],
36879
37282
  "fanControl.setDirection": [{
36880
37283
  name: "deviceId",
@@ -38485,7 +38888,38 @@ object({
38485
38888
  * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
38486
38889
  * reproduce that.
38487
38890
  */
38488
- tileBudgetMb: number().int().min(0).max(1024)
38891
+ tileBudgetMb: number().int().min(0).max(1024),
38892
+ /**
38893
+ * RAM ceiling per decode worker, in MB, for the SCENE TILES — one
38894
+ * JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
38895
+ * subject tiles, on frames that detected something.
38896
+ *
38897
+ * It exists because a subject tile cannot answer a FULL-FRAME request:
38898
+ * containment is strict by design, so the native `keyFrame`, the detail
38899
+ * plane's `frameJpeg` rung and the display-crop fallback had no rung at all
38900
+ * below the hold. Measured on the live cluster: 23.3% of key-frame captures
38901
+ * missed, 95.7% of them with `worker-lease-gone` — the raster released one
38902
+ * frame-time after delivery, with the request only p50 367 ms behind it.
38903
+ *
38904
+ * Sizing, and why this is a budget and not a duration: a scene tile is
38905
+ * ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
38906
+ * ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
38907
+ * camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
38908
+ * frames, i.e. the store's 30 s TTL binds at the steady state and the budget
38909
+ * binds only through a detection burst, where it still covers well past the
38910
+ * measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
38911
+ * would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
38912
+ * whole shape exists to avoid.
38913
+ *
38914
+ * A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
38915
+ * subject tile, so one shared budget would let a busy camera's key frames
38916
+ * evict the face/plate tiles the recognisers depend on. Two budgets make that
38917
+ * impossible rather than unlikely. `0` DISABLES scene tiles and restores the
38918
+ * pre-existing behaviour, where a late full-frame request had nothing but the
38919
+ * ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
38920
+ * nothing.
38921
+ */
38922
+ sceneBudgetMb: number().int().min(0).max(1024)
38489
38923
  });
38490
38924
  /**
38491
38925
  * The values in force when the operator has set nothing.
@@ -38501,12 +38935,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
38501
38935
  budgetMb: 1024,
38502
38936
  activityMs: 15e3,
38503
38937
  tileBudgetMb: 64,
38938
+ sceneBudgetMb: 48,
38504
38939
  admission: "inferred"
38505
38940
  };
38506
38941
  DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
38507
38942
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
38508
38943
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
38509
38944
  DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
38945
+ DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
38510
38946
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
38511
38947
  /**
38512
38948
  * Names that, when used as URL query parameters, almost certainly carry
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-rtsp",
3
- "version": "1.2.31",
3
+ "version": "1.2.32",
4
4
  "description": "Generic RTSP camera device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",