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