@camstack/addon-smtp-nodemailer 1.2.30 → 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.
@@ -7547,6 +7547,66 @@ var OpsLogQueryInputSchema = object({
7547
7547
  /** Max rows returned, newest-first. */
7548
7548
  limit: number().int().min(1).max(1e3).optional()
7549
7549
  });
7550
+ var LabelDefinitionSchema = object({
7551
+ id: string(),
7552
+ name: string(),
7553
+ category: string().optional(),
7554
+ description: string().optional(),
7555
+ icon: string().optional()
7556
+ });
7557
+ /** Detection-macro targets a catalog `classMap` may resolve to. */
7558
+ var CLASS_MAP_MACRO_TARGETS = [
7559
+ "person",
7560
+ "vehicle",
7561
+ "animal",
7562
+ "package"
7563
+ ];
7564
+ /**
7565
+ * Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
7566
+ * un operatore può selezionare.
7567
+ *
7568
+ * Sono le tre offerte dallo step `object-detection`
7569
+ * (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
7570
+ * `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
7571
+ * `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
7572
+ * `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
7573
+ * stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
7574
+ * (suitcase/backpack/handbag) lasciando spento il detector dedicato.
7575
+ *
7576
+ * UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
7577
+ * dello step e una seconda volta come union `FirstLevelMacro`
7578
+ * (`types/detection.ts`); una terza copia per il trigger di registrazione
7579
+ * (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
7580
+ * successiva.
7581
+ */
7582
+ var FIRST_LEVEL_MACRO_CLASSES = [
7583
+ "person",
7584
+ "vehicle",
7585
+ "animal"
7586
+ ];
7587
+ /**
7588
+ * Wire schema for a per-model CATALOG classMap override
7589
+ * (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
7590
+ * restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
7591
+ * detection pipeline executor actually routes.
7592
+ *
7593
+ * This is deliberately a DIFFERENT, narrower shape than the general-purpose
7594
+ * `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
7595
+ * and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
7596
+ * enum) — the two used to share the name `ClassMapDefinition`/
7597
+ * `ClassMapDefinitionSchema`, which made the schema-type-twin guard
7598
+ * (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
7599
+ * are not: it is two different concepts colliding on a name. Keep this type
7600
+ * under its own name rather than reusing `ClassMapDefinition` — reusing it
7601
+ * would either narrow every `ClassMapDefinition` consumer to the four
7602
+ * detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
7603
+ * schema exists for (see the "rejects a classMap whose target is not a
7604
+ * detection macro" test in `model-catalog-schema.test.ts`).
7605
+ */
7606
+ var DetectionCatalogClassMapSchema = object({
7607
+ mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
7608
+ preserveOriginal: boolean()
7609
+ });
7550
7610
  /**
7551
7611
  * Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
7552
7612
  * Named `RecordingWeekday` to avoid collision with the string-union
@@ -7569,10 +7629,55 @@ var RecordingStorageModeSchema = _enum([
7569
7629
  "events",
7570
7630
  "continuous"
7571
7631
  ]);
7632
+ /**
7633
+ * Le macro classi che possono aprire una finestra di registrazione — le stesse
7634
+ * tre offerte dallo step `object-detection`, da UNA lista
7635
+ * ({@link FIRST_LEVEL_MACRO_CLASSES}).
7636
+ */
7637
+ var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
7638
+ /**
7639
+ * True quando `values` non ripete un elemento.
7640
+ *
7641
+ * Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
7642
+ * diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
7643
+ * conterebbe due volte le sue finestre in `segmentMissedByMs`.
7644
+ */
7645
+ var noDuplicates = (values) => new Set(values).size === values.length;
7572
7646
  /** Which detectors trigger an `events`-mode band. */
7573
7647
  var RecordingTriggersSchema = object({
7574
7648
  motion: boolean().optional(),
7575
- audioThresholdDbfs: number().optional()
7649
+ audioThresholdDbfs: number().optional(),
7650
+ /**
7651
+ * Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
7652
+ * non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
7653
+ * object acceso, nessuna classe" è la stessa forma "abilitata e non registra
7654
+ * nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
7655
+ *
7656
+ * Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
7657
+ * quelle che hanno attraversato `enabledMacroClasses`, i
7658
+ * `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
7659
+ * (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
7660
+ * finestre — vedi `recorder/object-trigger.ts`.
7661
+ */
7662
+ objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
7663
+ /**
7664
+ * I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
7665
+ * non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
7666
+ * `objectClasses`.
7667
+ *
7668
+ * Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
7669
+ * percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
7670
+ * non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
7671
+ * si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
7672
+ * device (D12) — mai un elenco globale di cap.
7673
+ *
7674
+ * Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
7675
+ * `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
7676
+ * la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
7677
+ * il livello: un contatto trovato già aperto al riavvio del runner non fa
7678
+ * registrare.
7679
+ */
7680
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7576
7681
  });
7577
7682
  /**
7578
7683
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -8024,41 +8129,6 @@ var DecoderSessionConfigSchema = object({
8024
8129
  */
8025
8130
  debug: boolean().optional()
8026
8131
  });
8027
- var LabelDefinitionSchema = object({
8028
- id: string(),
8029
- name: string(),
8030
- category: string().optional(),
8031
- description: string().optional(),
8032
- icon: string().optional()
8033
- });
8034
- /**
8035
- * Wire schema for a per-model CATALOG classMap override
8036
- * (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
8037
- * restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
8038
- * detection pipeline executor actually routes.
8039
- *
8040
- * This is deliberately a DIFFERENT, narrower shape than the general-purpose
8041
- * `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
8042
- * and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
8043
- * enum) — the two used to share the name `ClassMapDefinition`/
8044
- * `ClassMapDefinitionSchema`, which made the schema-type-twin guard
8045
- * (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
8046
- * are not: it is two different concepts colliding on a name. Keep this type
8047
- * under its own name rather than reusing `ClassMapDefinition` — reusing it
8048
- * would either narrow every `ClassMapDefinition` consumer to the four
8049
- * detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
8050
- * schema exists for (see the "rejects a classMap whose target is not a
8051
- * detection macro" test in `model-catalog-schema.test.ts`).
8052
- */
8053
- var DetectionCatalogClassMapSchema = object({
8054
- mapping: record(string(), _enum([
8055
- "person",
8056
- "vehicle",
8057
- "animal",
8058
- "package"
8059
- ])),
8060
- preserveOriginal: boolean()
8061
- });
8062
8132
  var MODEL_FORMATS = [
8063
8133
  "onnx",
8064
8134
  "coreml",
@@ -20845,7 +20915,7 @@ var lifecycleJobSchema = object({
20845
20915
  * `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
20846
20916
  * as every other cap.
20847
20917
  */
20848
- var LogLevelSchema$1 = _enum([
20918
+ var LogLevelSchema$2 = _enum([
20849
20919
  "debug",
20850
20920
  "info",
20851
20921
  "warn",
@@ -21052,7 +21122,7 @@ var CustomActionInputSchema = object({
21052
21122
  method(_void(), array(AddonListItemSchema).readonly()), method(object({
21053
21123
  addonId: string(),
21054
21124
  limit: number().min(1).max(500).default(100),
21055
- level: LogLevelSchema$1.optional()
21125
+ level: LogLevelSchema$2.optional()
21056
21126
  }), array(LogQueryEntrySchema)), method(_void(), array(InstalledPackageSchema).readonly()), method(object({
21057
21127
  packageName: string(),
21058
21128
  version: string().optional()
@@ -21150,7 +21220,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
21150
21220
  auth: "admin"
21151
21221
  }), method(object({
21152
21222
  addonId: string(),
21153
- level: LogLevelSchema$1.optional()
21223
+ level: LogLevelSchema$2.optional()
21154
21224
  }), LogStreamEntrySchema, { kind: "subscription" });
21155
21225
  object({
21156
21226
  /** Carbon dioxide concentration in ppm. */
@@ -22144,6 +22214,35 @@ var FaceFilterEnum = _enum([
22144
22214
  "identified",
22145
22215
  "all"
22146
22216
  ]);
22217
+ /**
22218
+ * What a `listRecentFaces` page is ORDERED BY.
22219
+ *
22220
+ * - `timestamp` — when the face was seen. The historical (and default) order.
22221
+ * - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
22222
+ * cosine of the face's SUGGESTED identity. This is the "review by certainty"
22223
+ * order: it puts the suggestions an operator can confirm with one tap at the
22224
+ * top, and it is the reason this enum exists — a client that ranked a capped
22225
+ * page client-side was ranking the newest N, never the most certain N.
22226
+ *
22227
+ * A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
22228
+ * auto-assigned face, or a face below the suggestion band) has no certainty to
22229
+ * compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
22230
+ * — flipping the direction reorders the rows that HAVE a certainty and never
22231
+ * floods the page with the ones that do not. `addon-post-analysis`'s
22232
+ * `store/face-sort.ts` is the single implementation, tiebreaks newest-first
22233
+ * then by faceId, and is what makes this a total order instead of the
22234
+ * backend's NULL-collation accident.
22235
+ */
22236
+ var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
22237
+ var FaceSortDirectionEnum = _enum(["asc", "desc"]);
22238
+ /** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
22239
+ * never leaves the server. */
22240
+ var FaceClusterSchema = object({
22241
+ faceIds: array(string()).readonly(),
22242
+ representativeFaceId: string(),
22243
+ size: number().int(),
22244
+ cohesion: number()
22245
+ });
22147
22246
  var MediaFileLiteSchema$1 = object({
22148
22247
  key: string(),
22149
22248
  kind: string(),
@@ -22190,24 +22289,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
22190
22289
  kind: "mutation",
22191
22290
  auth: "admin"
22192
22291
  }), method(object({
22193
- /** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
22292
+ /**
22293
+ * Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
22294
+ *
22295
+ * The legacy single-camera form, kept verbatim for every caller that
22296
+ * already sends it. A caller that wants a SET sends {@link deviceIds}
22297
+ * instead — never both: `deviceIds` is the authority whenever it is
22298
+ * present, and this field is then ignored rather than unioned, so
22299
+ * there is exactly one answer to "which cameras did I ask for".
22300
+ */
22194
22301
  deviceId: number().int().optional(),
22302
+ /**
22303
+ * Restrict to a SET of cameras — the review UI's camera filter, which
22304
+ * until now had to fetch the cluster-wide page and drop rows in the
22305
+ * client (so the `limit` it asked for was spent on cameras it was
22306
+ * about to discard).
22307
+ *
22308
+ * An **empty array reads NOTHING** — `[]` is an empty page, never
22309
+ * "every camera". A request for no devices is a request, not an
22310
+ * omission; same contract as `deviceManager.listFleet` and
22311
+ * `pipelineAnalytics.listRecentTracks`.
22312
+ *
22313
+ * Absent (`undefined`) is the omission, and keeps the cluster-wide view.
22314
+ */
22315
+ deviceIds: array(number().int()).optional(),
22195
22316
  limit: number().int().positive().optional(),
22196
22317
  filter: FaceFilterEnum.optional(),
22197
22318
  /**
22198
- * Inline the base64 crop on every row. Default `true` — the existing
22199
- * behaviour, kept so no caller breaks.
22319
+ * Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
22320
+ * Absent means no lower bound.
22321
+ */
22322
+ since: number().int().optional(),
22323
+ /**
22324
+ * Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
22325
+ * Absent means no upper bound.
22326
+ */
22327
+ until: number().int().optional(),
22328
+ /**
22329
+ * Order the page by time or by suggestion certainty. Default
22330
+ * `'timestamp'` — the historical order, unchanged for every caller
22331
+ * that does not ask.
22200
22332
  *
22201
- * Set `false` once the caller renders {@link FaceInfo.cropUrl}: that
22202
- * drops ~2.87 MiB per 500-row page to a few KiB of metadata and lets
22203
- * the browser cache the images.
22333
+ * See {@link FaceSortFieldEnum} for what a row with no suggestion
22334
+ * does under `'suggestionConfidence'`.
22204
22335
  *
22205
- * **This is an INPUT field, so it does not reach the addon until the
22206
- * next train.** The hub router validates cap inputs against its own
22207
- * compiled Zod, which strips a key it does not know verified today
22208
- * on the OUTPUT side, where an additive field DOES arrive immediately
22209
- * (`Track.hasFace`). Until the train ships, sending `false` is
22210
- * harmless and simply keeps the crops inline.
22336
+ * Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
22337
+ * index and stops reading as soon as `limit` rows have PASSED the
22338
+ * filter. `'suggestionConfidence'` cannot stop earlythe most
22339
+ * certain row may be the oldest so it walks the window. Narrow it
22340
+ * with {@link since} / {@link until}.
22341
+ */
22342
+ sortBy: FaceSortFieldEnum.optional(),
22343
+ /** Sort direction for {@link sortBy}. Default `'desc'`. */
22344
+ sortDirection: FaceSortDirectionEnum.optional(),
22345
+ /**
22346
+ * Inline the base64 crop on every row.
22347
+ *
22348
+ * Default `false` since the 2026-08-25 inversion — see
22349
+ * `include-crops-default.ts`, which is the ONE place that resolves
22350
+ * this for every gallery, and which records why the inline shape had
22351
+ * to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
22352
+ * The doc here used to still say `true`; it was wrong, and a leftover
22353
+ * that describes the old design reads as permission to rely on it.
22354
+ *
22355
+ * Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
22356
+ * which the browser fetches off the `event-media` plane in parallel,
22357
+ * cached and ETagged.
22211
22358
  */
22212
22359
  includeCrops: boolean().optional()
22213
22360
  }).optional(), array(FaceInfoSchema).readonly()), method(object({
@@ -22243,13 +22390,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
22243
22390
  }), method(object({
22244
22391
  threshold: number().min(0).max(1).optional(),
22245
22392
  minClusterSize: number().int().min(2).optional(),
22246
- limit: number().int().positive().optional()
22247
- }).optional(), array(object({
22248
- faceIds: array(string()).readonly(),
22249
- representativeFaceId: string(),
22250
- size: number().int(),
22251
- cohesion: number()
22252
- })).readonly());
22393
+ /**
22394
+ * Cap on the number of CLUSTERS returned. Renamed from `limit`,
22395
+ * which read as though it bounded the work — it never did.
22396
+ *
22397
+ * Wins over {@link limit} when both are sent.
22398
+ */
22399
+ maxClusters: number().int().positive().optional(),
22400
+ /**
22401
+ * @deprecated Ambiguous name for {@link maxClusters} — it cuts the
22402
+ * RESULT, not the scan. Kept so existing callers keep working; send
22403
+ * `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
22404
+ */
22405
+ limit: number().int().positive().optional(),
22406
+ /**
22407
+ * Cap on the number of unassigned faces READ AND CLUSTERED — the
22408
+ * POOL, not the result.
22409
+ *
22410
+ * This is the knob {@link maxClusters} was mistaken for. Clustering
22411
+ * used to read every unassigned face on the hub no matter what the
22412
+ * caller asked for, because the only bound cut the finished clusters
22413
+ * afterwards; a UI showing a window of 100 paid for a scan of the
22414
+ * whole corpus, on an addon whose disk is under contention.
22415
+ *
22416
+ * The pool is the NEWEST matching faces first — the same order the
22417
+ * gallery shows — so a bound here shortens the horizon, it does not
22418
+ * sample it randomly.
22419
+ *
22420
+ * Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
22421
+ * so the live corpus — 372 face rows — is unaffected while the
22422
+ * unbounded scan can never come back as the table grows.
22423
+ */
22424
+ maxFacesScanned: number().int().positive().optional()
22425
+ }).optional(), array(FaceClusterSchema).readonly());
22253
22426
  /**
22254
22427
  * Fan-control cap. Models HA `fan.*` entity-specific surfaces:
22255
22428
  * speed percentage, preset modes, ceiling-fan direction, and
@@ -25972,6 +26145,293 @@ var SetSiteLocationInputSchema = object({
25972
26145
  latitude: number().min(-90).max(90),
25973
26146
  longitude: number().min(-180).max(180)
25974
26147
  }).nullable();
26148
+ /**
26149
+ * The TRANSPORT a call arrived on.
26150
+ *
26151
+ * Every counted call carries exactly one of these, and `unknown` is a PLANE
26152
+ * rather than a gap: a plane that cannot attribute a call declares it here, so
26153
+ * the call lands in a named bucket instead of vanishing. `planes` summing to
26154
+ * `procedureCalls` is what makes "the sum of the planes explains the total"
26155
+ * checkable rather than asserted.
26156
+ *
26157
+ * - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
26158
+ * - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
26159
+ * connection; the viewer talks to the hub over `wsLink`
26160
+ * exclusively, so this is the plane the HTTP census could not see.
26161
+ * - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
26162
+ * never touches a socket and therefore never touched a census.
26163
+ * - `unknown` — counted, plane undecidable. No hook produces it today, and
26164
+ * that is exactly what its `0` asserts: every plane the hub has can name
26165
+ * itself. It is an output bucket, never a knob — a call that arrives on a
26166
+ * plane nobody instrumented lands here instead of vanishing from the total.
26167
+ */
26168
+ var TransportPlaneSchema = _enum([
26169
+ "http",
26170
+ "ws",
26171
+ "mesh",
26172
+ "unknown"
26173
+ ]);
26174
+ /**
26175
+ * Calls per plane. Every key is always present, `0` included — an absent plane
26176
+ * reads as "not instrumented", which is the one thing this census must never
26177
+ * make an operator wonder about.
26178
+ */
26179
+ var TransportPlaneCountsSchema = object({
26180
+ http: number(),
26181
+ ws: number(),
26182
+ mesh: number(),
26183
+ unknown: number()
26184
+ });
26185
+ /**
26186
+ * One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
26187
+ * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
26188
+ * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
26189
+ * already prints - never a token, never an `Authorization` header.
26190
+ *
26191
+ * `subscriptions` is counted APART from `calls`: a subscription is opened once
26192
+ * and lives for hours, so folding it into a call count makes one long-lived
26193
+ * stream look like a storm.
26194
+ */
26195
+ var RequestCensusGroupSchema = object({
26196
+ plane: TransportPlaneSchema,
26197
+ procedure: string(),
26198
+ userAgent: string(),
26199
+ ip: string(),
26200
+ principal: string(),
26201
+ calls: number(),
26202
+ subscriptions: number(),
26203
+ perMin: number()
26204
+ });
26205
+ /**
26206
+ * A procedure's TOTAL over the window, across every caller.
26207
+ *
26208
+ * This block, not the group list, is what answers "did these calls arrive over
26209
+ * HTTP at all". A total far BELOW what a store-side census counted over the
26210
+ * same window excludes the HTTP plane, which is a result, not a failure.
26211
+ */
26212
+ var RequestCensusProcedureSchema = object({
26213
+ procedure: string(),
26214
+ calls: number(),
26215
+ /**
26216
+ * The same total, split by transport. THIS is the row that answers the
26217
+ * question the census exists for: one look at `deviceManager.listAll` says
26218
+ * which plane carried the 4 960, without joining two log lines by eye.
26219
+ */
26220
+ planes: TransportPlaneCountsSchema,
26221
+ /** Subscription STARTS on this procedure. Never folded into `calls`. */
26222
+ subscriptions: number(),
26223
+ perMin: number()
26224
+ });
26225
+ /**
26226
+ * The census as an operator sees it.
26227
+ *
26228
+ * `persisted` is the honest answer to "will this survive the restart I am
26229
+ * about to do": the arm deadline is written to `system-settings` so a window
26230
+ * armed now can measure the NEXT boot, and a write that failed must not look
26231
+ * like one that succeeded.
26232
+ */
26233
+ var RequestCensusStatusSchema = object({
26234
+ armed: boolean(),
26235
+ /** How long the current - or just-closed - window collected, in ms. */
26236
+ elapsedMs: number(),
26237
+ /** The window actually armed, after the server clamped the request. */
26238
+ windowMs: number(),
26239
+ /** Epoch ms the window closes at. 0 when disarmed. */
26240
+ armedUntilMs: number(),
26241
+ httpRequests: number(),
26242
+ batchedRequests: number(),
26243
+ /**
26244
+ * Procedure invocations. Higher than `httpRequests` whenever tRPC batching
26245
+ * is in play (`?batch=1` carries several procedures in one request); this is
26246
+ * the number comparable with a store-side call count.
26247
+ */
26248
+ procedureCalls: number(),
26249
+ /**
26250
+ * `procedureCalls` split by transport. The four keys sum to
26251
+ * `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
26252
+ * `planesExplainTotal` is that identity, checked rather than assumed.
26253
+ */
26254
+ planes: TransportPlaneCountsSchema,
26255
+ /**
26256
+ * True iff `planes` sums to `procedureCalls`. False means a call was counted
26257
+ * on no plane at all - which is a RESULT (a plane is missing from the
26258
+ * instrument), not a failure, and it has to be visible to be read as one.
26259
+ */
26260
+ planesExplainTotal: boolean(),
26261
+ /**
26262
+ * tRPC WebSocket connections opened during the window. NOT calls - the WS
26263
+ * adapter resolves one context per connection - kept because a plane's call
26264
+ * count of zero against 37 open connections says something different from a
26265
+ * plane with no connections at all.
26266
+ */
26267
+ wsConnections: number(),
26268
+ /**
26269
+ * Client frames the WS plane looked at. `wsMessages` far above
26270
+ * `planes.ws + subscriptions` means most traffic is not operations
26271
+ * (keepalives, connection params) - which is itself an answer.
26272
+ */
26273
+ wsMessages: number(),
26274
+ /**
26275
+ * Subscription STARTS across every plane, excluded from `procedureCalls` on
26276
+ * purpose: one live-events stream opened at boot and held for six hours is
26277
+ * one subscription, and counting it as a call would let a quiet plane
26278
+ * masquerade as the storm.
26279
+ */
26280
+ subscriptions: number(),
26281
+ /** `subscription.stop` frames. Starts minus stops is what is still open. */
26282
+ subscriptionStops: number(),
26283
+ distinctGroups: number(),
26284
+ /**
26285
+ * Operations counted in the totals whose CALLER attribution was shed at the
26286
+ * cardinality bound. Unrelated to the `unknown` PLANE: these calls know
26287
+ * which transport they arrived on, they just lost their group row.
26288
+ */
26289
+ unattributedCalls: number(),
26290
+ procedures: array(RequestCensusProcedureSchema).readonly(),
26291
+ groups: array(RequestCensusGroupSchema).readonly()
26292
+ }).extend({ persisted: boolean() });
26293
+ /** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
26294
+ var LogLevelSchema$1 = _enum([
26295
+ "debug",
26296
+ "info",
26297
+ "warn",
26298
+ "error"
26299
+ ]);
26300
+ /**
26301
+ * The diagnostics that can be ARMED for a window. Exactly one today.
26302
+ *
26303
+ * A diagnostic is anything whose cost is only worth paying while a question is
26304
+ * open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
26305
+ */
26306
+ var DiagnosticIdSchema = _enum(["request-census"]);
26307
+ /**
26308
+ * The layers of the level hierarchy, general → specific. The most specific
26309
+ * layer that carries an explicit value wins.
26310
+ *
26311
+ * `component` is DECLARED and not yet resolvable: the per-component channels
26312
+ * are a later slice of the same plan, and a `levelSource` enum that has to
26313
+ * grow later would force every consumer of this document to change with it.
26314
+ * Nothing returns `component` today.
26315
+ */
26316
+ var LoggingScopeKindSchema = _enum([
26317
+ "cluster",
26318
+ "node",
26319
+ "component"
26320
+ ]);
26321
+ /** Where an effective level came from. `default` = nothing is set anywhere. */
26322
+ var LoggingLevelSourceSchema = _enum([
26323
+ "default",
26324
+ "cluster",
26325
+ "node",
26326
+ "component"
26327
+ ]);
26328
+ /**
26329
+ * One layer of the hierarchy as it actually STANDS.
26330
+ *
26331
+ * `level: null` is the whole reason this array is returned: it is the
26332
+ * difference between "this node is at `info` because I decided it" and
26333
+ * "...because it inherits". An operator who clears an override believing they
26334
+ * are clearing an inherited value has been handed the same defect as the two
26335
+ * contradicting knobs this document exists to remove, moved one floor up.
26336
+ */
26337
+ var LoggingLevelLayerSchema = object({
26338
+ scope: LoggingScopeKindSchema,
26339
+ /** The node this layer speaks for; `null` on the cluster layer. */
26340
+ nodeId: string().nullable(),
26341
+ /** Explicitly set here, or `null` when this layer inherits. */
26342
+ level: LogLevelSchema$1.nullable()
26343
+ });
26344
+ /** What a line is judged against, and WHICH layer decided it. */
26345
+ var LoggingEffectiveSchema = object({
26346
+ level: LogLevelSchema$1,
26347
+ levelSource: LoggingLevelSourceSchema
26348
+ });
26349
+ /** Every layer, general → specific. Never collapsed into the effective value. */
26350
+ var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
26351
+ /**
26352
+ * An armed diagnostic, with its DEADLINE.
26353
+ *
26354
+ * The shape of ADR-0244: what is stored is a deadline and never a flag, so a
26355
+ * diagnostic somebody forgot expires by itself, and a boot-window measurement
26356
+ * survives the restart it exists to measure. `remainingMs` is 0 whenever
26357
+ * `armed` is false — a window is never reported as slightly expired.
26358
+ */
26359
+ var DiagnosticWindowSchema = object({
26360
+ id: DiagnosticIdSchema,
26361
+ armed: boolean(),
26362
+ /** Epoch ms the window closes at. 0 when disarmed. */
26363
+ armedUntilMs: number(),
26364
+ /** Ms left before it expires on its own. 0 when disarmed. */
26365
+ remainingMs: number(),
26366
+ /** Whether the stored deadline is the one the live diagnostic is running —
26367
+ * i.e. whether this window would survive a restart. */
26368
+ persisted: boolean()
26369
+ });
26370
+ /**
26371
+ * `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
26372
+ * server — there is no maximum here on purpose: a bound repeated in a schema
26373
+ * is a second knob that disagrees with the first the day one of them moves.
26374
+ */
26375
+ var DiagnosticWindowPatchSchema = object({
26376
+ id: DiagnosticIdSchema,
26377
+ armMs: number().int().min(0),
26378
+ /** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
26379
+ reportEveryMs: number().int().positive().optional()
26380
+ });
26381
+ /**
26382
+ * A PATCH, and patches MERGE.
26383
+ *
26384
+ * A field absent from the patch is left exactly as it was — arming a
26385
+ * diagnostic never resets a level, and setting a level never disarms a window.
26386
+ * The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
26387
+ * `setAll` already merges, and rebuilding the object is how an absent field
26388
+ * turns into an erased one.
26389
+ */
26390
+ var LoggingSettingsPatchSchema = object({
26391
+ /**
26392
+ * Absent leaves the level untouched. `null` CLEARS the explicit value at the
26393
+ * addressed scope so it inherits again. A value sets it.
26394
+ */
26395
+ level: LogLevelSchema$1.nullable().optional(),
26396
+ /**
26397
+ * Only the diagnostics NAMED here change. An armed window that is not listed
26398
+ * keeps running — a patch is never a full replacement.
26399
+ */
26400
+ diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
26401
+ });
26402
+ /**
26403
+ * Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
26404
+ *
26405
+ * Deliberately NOT called `nodeId`: that key is reserved on every cap method
26406
+ * input — the generated router strips it and uses it to resolve the PROVIDER
26407
+ * on that node (`resolveProvider(cap, nodeId, …)`). A document about
26408
+ * `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
26409
+ * by an agent that holds no cluster document at all. The hub is the single
26410
+ * authority over the whole hierarchy and answers for every layer, so the
26411
+ * layer selector needs a name the transport does not already own.
26412
+ */
26413
+ var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
26414
+ var SetLoggingSettingsInputSchema = object({
26415
+ scopeNodeId: string().optional(),
26416
+ patch: LoggingSettingsPatchSchema
26417
+ });
26418
+ /**
26419
+ * The whole document, as read and as returned after every write.
26420
+ *
26421
+ * `persisted: false` means the settings store could not be read or written.
26422
+ * The in-memory mirror still governs behaviour and is unchanged by the
26423
+ * failure — a read that fails neither switches a level nor disarms a window
26424
+ * (D49) — but the operator is told that what they are looking at would not
26425
+ * survive a restart.
26426
+ */
26427
+ var LoggingSettingsStateSchema = object({
26428
+ /** The layer this document was read at. `null` = the cluster layer. */
26429
+ scopeNodeId: string().nullable(),
26430
+ effective: LoggingEffectiveSchema,
26431
+ explicit: LoggingExplicitSchema,
26432
+ activeWindows: array(DiagnosticWindowSchema).readonly(),
26433
+ persisted: boolean()
26434
+ });
25975
26435
  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(), {
25976
26436
  kind: "mutation",
25977
26437
  auth: "admin"
@@ -25984,6 +26444,9 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
25984
26444
  }), method(_void(), SiteLocationStatusSchema, {
25985
26445
  kind: "mutation",
25986
26446
  auth: "admin"
26447
+ }), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
26448
+ kind: "mutation",
26449
+ auth: "admin"
25987
26450
  });
25988
26451
  object({
25989
26452
  /** True when the device's tamper switch / case-open contact is
@@ -31815,6 +32278,18 @@ Object.freeze({
31815
32278
  addonId: null,
31816
32279
  access: "create"
31817
32280
  },
32281
+ "system.getLoggingSettings": {
32282
+ capName: "system",
32283
+ capScope: "system",
32284
+ addonId: null,
32285
+ access: "view"
32286
+ },
32287
+ "system.getRequestCensus": {
32288
+ capName: "system",
32289
+ capScope: "system",
32290
+ addonId: null,
32291
+ access: "view"
32292
+ },
31818
32293
  "system.getRetentionConfig": {
31819
32294
  capName: "system",
31820
32295
  capScope: "system",
@@ -31845,6 +32320,12 @@ Object.freeze({
31845
32320
  addonId: null,
31846
32321
  access: "view"
31847
32322
  },
32323
+ "system.setLoggingSettings": {
32324
+ capName: "system",
32325
+ capScope: "system",
32326
+ addonId: null,
32327
+ access: "create"
32328
+ },
31848
32329
  "system.setRetentionConfig": {
31849
32330
  capName: "system",
31850
32331
  capScope: "system",
@@ -33000,6 +33481,10 @@ Object.freeze({
33000
33481
  name: "deviceId",
33001
33482
  form: "single",
33002
33483
  optional: true
33484
+ }, {
33485
+ name: "deviceIds",
33486
+ form: "array",
33487
+ optional: true
33003
33488
  }],
33004
33489
  "fanControl.setDirection": [{
33005
33490
  name: "deviceId",
@@ -34610,7 +35095,38 @@ object({
34610
35095
  * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
34611
35096
  * reproduce that.
34612
35097
  */
34613
- tileBudgetMb: number().int().min(0).max(1024)
35098
+ tileBudgetMb: number().int().min(0).max(1024),
35099
+ /**
35100
+ * RAM ceiling per decode worker, in MB, for the SCENE TILES — one
35101
+ * JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
35102
+ * subject tiles, on frames that detected something.
35103
+ *
35104
+ * It exists because a subject tile cannot answer a FULL-FRAME request:
35105
+ * containment is strict by design, so the native `keyFrame`, the detail
35106
+ * plane's `frameJpeg` rung and the display-crop fallback had no rung at all
35107
+ * below the hold. Measured on the live cluster: 23.3% of key-frame captures
35108
+ * missed, 95.7% of them with `worker-lease-gone` — the raster released one
35109
+ * frame-time after delivery, with the request only p50 367 ms behind it.
35110
+ *
35111
+ * Sizing, and why this is a budget and not a duration: a scene tile is
35112
+ * ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
35113
+ * ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
35114
+ * camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
35115
+ * frames, i.e. the store's 30 s TTL binds at the steady state and the budget
35116
+ * binds only through a detection burst, where it still covers well past the
35117
+ * measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
35118
+ * would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
35119
+ * whole shape exists to avoid.
35120
+ *
35121
+ * A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
35122
+ * subject tile, so one shared budget would let a busy camera's key frames
35123
+ * evict the face/plate tiles the recognisers depend on. Two budgets make that
35124
+ * impossible rather than unlikely. `0` DISABLES scene tiles and restores the
35125
+ * pre-existing behaviour, where a late full-frame request had nothing but the
35126
+ * ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
35127
+ * nothing.
35128
+ */
35129
+ sceneBudgetMb: number().int().min(0).max(1024)
34614
35130
  });
34615
35131
  /**
34616
35132
  * The values in force when the operator has set nothing.
@@ -34626,12 +35142,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
34626
35142
  budgetMb: 1024,
34627
35143
  activityMs: 15e3,
34628
35144
  tileBudgetMb: 64,
35145
+ sceneBudgetMb: 48,
34629
35146
  admission: "inferred"
34630
35147
  };
34631
35148
  DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
34632
35149
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
34633
35150
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
34634
35151
  DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
35152
+ DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
34635
35153
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
34636
35154
  var MB = 1024 * 1024;
34637
35155
  1024 * MB, 3072 * MB;