@camstack/addon-remote-storage 1.2.30 → 1.2.31

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.
@@ -7534,6 +7534,66 @@ var OpsLogQueryInputSchema = object({
7534
7534
  /** Max rows returned, newest-first. */
7535
7535
  limit: number().int().min(1).max(1e3).optional()
7536
7536
  });
7537
+ var LabelDefinitionSchema = object({
7538
+ id: string(),
7539
+ name: string(),
7540
+ category: string().optional(),
7541
+ description: string().optional(),
7542
+ icon: string().optional()
7543
+ });
7544
+ /** Detection-macro targets a catalog `classMap` may resolve to. */
7545
+ var CLASS_MAP_MACRO_TARGETS = [
7546
+ "person",
7547
+ "vehicle",
7548
+ "animal",
7549
+ "package"
7550
+ ];
7551
+ /**
7552
+ * Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
7553
+ * un operatore può selezionare.
7554
+ *
7555
+ * Sono le tre offerte dallo step `object-detection`
7556
+ * (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
7557
+ * `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
7558
+ * `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
7559
+ * `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
7560
+ * stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
7561
+ * (suitcase/backpack/handbag) lasciando spento il detector dedicato.
7562
+ *
7563
+ * UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
7564
+ * dello step e una seconda volta come union `FirstLevelMacro`
7565
+ * (`types/detection.ts`); una terza copia per il trigger di registrazione
7566
+ * (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
7567
+ * successiva.
7568
+ */
7569
+ var FIRST_LEVEL_MACRO_CLASSES = [
7570
+ "person",
7571
+ "vehicle",
7572
+ "animal"
7573
+ ];
7574
+ /**
7575
+ * Wire schema for a per-model CATALOG classMap override
7576
+ * (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
7577
+ * restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
7578
+ * detection pipeline executor actually routes.
7579
+ *
7580
+ * This is deliberately a DIFFERENT, narrower shape than the general-purpose
7581
+ * `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
7582
+ * and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
7583
+ * enum) — the two used to share the name `ClassMapDefinition`/
7584
+ * `ClassMapDefinitionSchema`, which made the schema-type-twin guard
7585
+ * (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
7586
+ * are not: it is two different concepts colliding on a name. Keep this type
7587
+ * under its own name rather than reusing `ClassMapDefinition` — reusing it
7588
+ * would either narrow every `ClassMapDefinition` consumer to the four
7589
+ * detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
7590
+ * schema exists for (see the "rejects a classMap whose target is not a
7591
+ * detection macro" test in `model-catalog-schema.test.ts`).
7592
+ */
7593
+ var DetectionCatalogClassMapSchema = object({
7594
+ mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
7595
+ preserveOriginal: boolean()
7596
+ });
7537
7597
  /**
7538
7598
  * Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
7539
7599
  * Named `RecordingWeekday` to avoid collision with the string-union
@@ -7556,10 +7616,55 @@ var RecordingStorageModeSchema = _enum([
7556
7616
  "events",
7557
7617
  "continuous"
7558
7618
  ]);
7619
+ /**
7620
+ * Le macro classi che possono aprire una finestra di registrazione — le stesse
7621
+ * tre offerte dallo step `object-detection`, da UNA lista
7622
+ * ({@link FIRST_LEVEL_MACRO_CLASSES}).
7623
+ */
7624
+ var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
7625
+ /**
7626
+ * True quando `values` non ripete un elemento.
7627
+ *
7628
+ * Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
7629
+ * diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
7630
+ * conterebbe due volte le sue finestre in `segmentMissedByMs`.
7631
+ */
7632
+ var noDuplicates = (values) => new Set(values).size === values.length;
7559
7633
  /** Which detectors trigger an `events`-mode band. */
7560
7634
  var RecordingTriggersSchema = object({
7561
7635
  motion: boolean().optional(),
7562
- audioThresholdDbfs: number().optional()
7636
+ audioThresholdDbfs: number().optional(),
7637
+ /**
7638
+ * Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
7639
+ * non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
7640
+ * object acceso, nessuna classe" è la stessa forma "abilitata e non registra
7641
+ * nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
7642
+ *
7643
+ * Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
7644
+ * quelle che hanno attraversato `enabledMacroClasses`, i
7645
+ * `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
7646
+ * (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
7647
+ * finestre — vedi `recorder/object-trigger.ts`.
7648
+ */
7649
+ objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
7650
+ /**
7651
+ * I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
7652
+ * non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
7653
+ * `objectClasses`.
7654
+ *
7655
+ * Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
7656
+ * percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
7657
+ * non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
7658
+ * si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
7659
+ * device (D12) — mai un elenco globale di cap.
7660
+ *
7661
+ * Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
7662
+ * `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
7663
+ * la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
7664
+ * il livello: un contatto trovato già aperto al riavvio del runner non fa
7665
+ * registrare.
7666
+ */
7667
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7563
7668
  });
7564
7669
  /**
7565
7670
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -8011,41 +8116,6 @@ var DecoderSessionConfigSchema = object({
8011
8116
  */
8012
8117
  debug: boolean().optional()
8013
8118
  });
8014
- var LabelDefinitionSchema = object({
8015
- id: string(),
8016
- name: string(),
8017
- category: string().optional(),
8018
- description: string().optional(),
8019
- icon: string().optional()
8020
- });
8021
- /**
8022
- * Wire schema for a per-model CATALOG classMap override
8023
- * (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
8024
- * restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
8025
- * detection pipeline executor actually routes.
8026
- *
8027
- * This is deliberately a DIFFERENT, narrower shape than the general-purpose
8028
- * `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
8029
- * and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
8030
- * enum) — the two used to share the name `ClassMapDefinition`/
8031
- * `ClassMapDefinitionSchema`, which made the schema-type-twin guard
8032
- * (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
8033
- * are not: it is two different concepts colliding on a name. Keep this type
8034
- * under its own name rather than reusing `ClassMapDefinition` — reusing it
8035
- * would either narrow every `ClassMapDefinition` consumer to the four
8036
- * detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
8037
- * schema exists for (see the "rejects a classMap whose target is not a
8038
- * detection macro" test in `model-catalog-schema.test.ts`).
8039
- */
8040
- var DetectionCatalogClassMapSchema = object({
8041
- mapping: record(string(), _enum([
8042
- "person",
8043
- "vehicle",
8044
- "animal",
8045
- "package"
8046
- ])),
8047
- preserveOriginal: boolean()
8048
- });
8049
8119
  var MODEL_FORMATS = [
8050
8120
  "onnx",
8051
8121
  "coreml",
@@ -20879,7 +20949,7 @@ var lifecycleJobSchema = object({
20879
20949
  * `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
20880
20950
  * as every other cap.
20881
20951
  */
20882
- var LogLevelSchema$1 = _enum([
20952
+ var LogLevelSchema$2 = _enum([
20883
20953
  "debug",
20884
20954
  "info",
20885
20955
  "warn",
@@ -21086,7 +21156,7 @@ var CustomActionInputSchema = object({
21086
21156
  method(_void(), array(AddonListItemSchema).readonly()), method(object({
21087
21157
  addonId: string(),
21088
21158
  limit: number().min(1).max(500).default(100),
21089
- level: LogLevelSchema$1.optional()
21159
+ level: LogLevelSchema$2.optional()
21090
21160
  }), array(LogQueryEntrySchema)), method(_void(), array(InstalledPackageSchema).readonly()), method(object({
21091
21161
  packageName: string(),
21092
21162
  version: string().optional()
@@ -21184,7 +21254,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
21184
21254
  auth: "admin"
21185
21255
  }), method(object({
21186
21256
  addonId: string(),
21187
- level: LogLevelSchema$1.optional()
21257
+ level: LogLevelSchema$2.optional()
21188
21258
  }), LogStreamEntrySchema, { kind: "subscription" });
21189
21259
  object({
21190
21260
  /** Carbon dioxide concentration in ppm. */
@@ -22178,6 +22248,35 @@ var FaceFilterEnum = _enum([
22178
22248
  "identified",
22179
22249
  "all"
22180
22250
  ]);
22251
+ /**
22252
+ * What a `listRecentFaces` page is ORDERED BY.
22253
+ *
22254
+ * - `timestamp` — when the face was seen. The historical (and default) order.
22255
+ * - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
22256
+ * cosine of the face's SUGGESTED identity. This is the "review by certainty"
22257
+ * order: it puts the suggestions an operator can confirm with one tap at the
22258
+ * top, and it is the reason this enum exists — a client that ranked a capped
22259
+ * page client-side was ranking the newest N, never the most certain N.
22260
+ *
22261
+ * A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
22262
+ * auto-assigned face, or a face below the suggestion band) has no certainty to
22263
+ * compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
22264
+ * — flipping the direction reorders the rows that HAVE a certainty and never
22265
+ * floods the page with the ones that do not. `addon-post-analysis`'s
22266
+ * `store/face-sort.ts` is the single implementation, tiebreaks newest-first
22267
+ * then by faceId, and is what makes this a total order instead of the
22268
+ * backend's NULL-collation accident.
22269
+ */
22270
+ var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
22271
+ var FaceSortDirectionEnum = _enum(["asc", "desc"]);
22272
+ /** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
22273
+ * never leaves the server. */
22274
+ var FaceClusterSchema = object({
22275
+ faceIds: array(string()).readonly(),
22276
+ representativeFaceId: string(),
22277
+ size: number().int(),
22278
+ cohesion: number()
22279
+ });
22181
22280
  var MediaFileLiteSchema$1 = object({
22182
22281
  key: string(),
22183
22282
  kind: string(),
@@ -22224,24 +22323,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
22224
22323
  kind: "mutation",
22225
22324
  auth: "admin"
22226
22325
  }), method(object({
22227
- /** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
22326
+ /**
22327
+ * Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
22328
+ *
22329
+ * The legacy single-camera form, kept verbatim for every caller that
22330
+ * already sends it. A caller that wants a SET sends {@link deviceIds}
22331
+ * instead — never both: `deviceIds` is the authority whenever it is
22332
+ * present, and this field is then ignored rather than unioned, so
22333
+ * there is exactly one answer to "which cameras did I ask for".
22334
+ */
22228
22335
  deviceId: number().int().optional(),
22336
+ /**
22337
+ * Restrict to a SET of cameras — the review UI's camera filter, which
22338
+ * until now had to fetch the cluster-wide page and drop rows in the
22339
+ * client (so the `limit` it asked for was spent on cameras it was
22340
+ * about to discard).
22341
+ *
22342
+ * An **empty array reads NOTHING** — `[]` is an empty page, never
22343
+ * "every camera". A request for no devices is a request, not an
22344
+ * omission; same contract as `deviceManager.listFleet` and
22345
+ * `pipelineAnalytics.listRecentTracks`.
22346
+ *
22347
+ * Absent (`undefined`) is the omission, and keeps the cluster-wide view.
22348
+ */
22349
+ deviceIds: array(number().int()).optional(),
22229
22350
  limit: number().int().positive().optional(),
22230
22351
  filter: FaceFilterEnum.optional(),
22231
22352
  /**
22232
- * Inline the base64 crop on every row. Default `true` — the existing
22233
- * behaviour, kept so no caller breaks.
22353
+ * Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
22354
+ * Absent means no lower bound.
22355
+ */
22356
+ since: number().int().optional(),
22357
+ /**
22358
+ * Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
22359
+ * Absent means no upper bound.
22360
+ */
22361
+ until: number().int().optional(),
22362
+ /**
22363
+ * Order the page by time or by suggestion certainty. Default
22364
+ * `'timestamp'` — the historical order, unchanged for every caller
22365
+ * that does not ask.
22234
22366
  *
22235
- * Set `false` once the caller renders {@link FaceInfo.cropUrl}: that
22236
- * drops ~2.87 MiB per 500-row page to a few KiB of metadata and lets
22237
- * the browser cache the images.
22367
+ * See {@link FaceSortFieldEnum} for what a row with no suggestion
22368
+ * does under `'suggestionConfidence'`.
22238
22369
  *
22239
- * **This is an INPUT field, so it does not reach the addon until the
22240
- * next train.** The hub router validates cap inputs against its own
22241
- * compiled Zod, which strips a key it does not know verified today
22242
- * on the OUTPUT side, where an additive field DOES arrive immediately
22243
- * (`Track.hasFace`). Until the train ships, sending `false` is
22244
- * harmless and simply keeps the crops inline.
22370
+ * Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
22371
+ * index and stops reading as soon as `limit` rows have PASSED the
22372
+ * filter. `'suggestionConfidence'` cannot stop earlythe most
22373
+ * certain row may be the oldest so it walks the window. Narrow it
22374
+ * with {@link since} / {@link until}.
22375
+ */
22376
+ sortBy: FaceSortFieldEnum.optional(),
22377
+ /** Sort direction for {@link sortBy}. Default `'desc'`. */
22378
+ sortDirection: FaceSortDirectionEnum.optional(),
22379
+ /**
22380
+ * Inline the base64 crop on every row.
22381
+ *
22382
+ * Default `false` since the 2026-08-25 inversion — see
22383
+ * `include-crops-default.ts`, which is the ONE place that resolves
22384
+ * this for every gallery, and which records why the inline shape had
22385
+ * to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
22386
+ * The doc here used to still say `true`; it was wrong, and a leftover
22387
+ * that describes the old design reads as permission to rely on it.
22388
+ *
22389
+ * Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
22390
+ * which the browser fetches off the `event-media` plane in parallel,
22391
+ * cached and ETagged.
22245
22392
  */
22246
22393
  includeCrops: boolean().optional()
22247
22394
  }).optional(), array(FaceInfoSchema).readonly()), method(object({
@@ -22277,13 +22424,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
22277
22424
  }), method(object({
22278
22425
  threshold: number().min(0).max(1).optional(),
22279
22426
  minClusterSize: number().int().min(2).optional(),
22280
- limit: number().int().positive().optional()
22281
- }).optional(), array(object({
22282
- faceIds: array(string()).readonly(),
22283
- representativeFaceId: string(),
22284
- size: number().int(),
22285
- cohesion: number()
22286
- })).readonly());
22427
+ /**
22428
+ * Cap on the number of CLUSTERS returned. Renamed from `limit`,
22429
+ * which read as though it bounded the work — it never did.
22430
+ *
22431
+ * Wins over {@link limit} when both are sent.
22432
+ */
22433
+ maxClusters: number().int().positive().optional(),
22434
+ /**
22435
+ * @deprecated Ambiguous name for {@link maxClusters} — it cuts the
22436
+ * RESULT, not the scan. Kept so existing callers keep working; send
22437
+ * `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
22438
+ */
22439
+ limit: number().int().positive().optional(),
22440
+ /**
22441
+ * Cap on the number of unassigned faces READ AND CLUSTERED — the
22442
+ * POOL, not the result.
22443
+ *
22444
+ * This is the knob {@link maxClusters} was mistaken for. Clustering
22445
+ * used to read every unassigned face on the hub no matter what the
22446
+ * caller asked for, because the only bound cut the finished clusters
22447
+ * afterwards; a UI showing a window of 100 paid for a scan of the
22448
+ * whole corpus, on an addon whose disk is under contention.
22449
+ *
22450
+ * The pool is the NEWEST matching faces first — the same order the
22451
+ * gallery shows — so a bound here shortens the horizon, it does not
22452
+ * sample it randomly.
22453
+ *
22454
+ * Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
22455
+ * so the live corpus — 372 face rows — is unaffected while the
22456
+ * unbounded scan can never come back as the table grows.
22457
+ */
22458
+ maxFacesScanned: number().int().positive().optional()
22459
+ }).optional(), array(FaceClusterSchema).readonly());
22287
22460
  /**
22288
22461
  * Fan-control cap. Models HA `fan.*` entity-specific surfaces:
22289
22462
  * speed percentage, preset modes, ceiling-fan direction, and
@@ -26006,6 +26179,211 @@ var SetSiteLocationInputSchema = object({
26006
26179
  latitude: number().min(-90).max(90),
26007
26180
  longitude: number().min(-180).max(180)
26008
26181
  }).nullable();
26182
+ /**
26183
+ * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
26184
+ * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
26185
+ * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
26186
+ * already prints - never a token, never an `Authorization` header.
26187
+ */
26188
+ var RequestCensusGroupSchema = object({
26189
+ procedure: string(),
26190
+ userAgent: string(),
26191
+ ip: string(),
26192
+ principal: string(),
26193
+ calls: number(),
26194
+ perMin: number()
26195
+ });
26196
+ /**
26197
+ * A procedure's TOTAL over the window, across every caller.
26198
+ *
26199
+ * This block, not the group list, is what answers "did these calls arrive over
26200
+ * HTTP at all". A total far BELOW what a store-side census counted over the
26201
+ * same window excludes the HTTP plane, which is a result, not a failure.
26202
+ */
26203
+ var RequestCensusProcedureSchema = object({
26204
+ procedure: string(),
26205
+ calls: number(),
26206
+ perMin: number()
26207
+ });
26208
+ /**
26209
+ * The census as an operator sees it.
26210
+ *
26211
+ * `persisted` is the honest answer to "will this survive the restart I am
26212
+ * about to do": the arm deadline is written to `system-settings` so a window
26213
+ * armed now can measure the NEXT boot, and a write that failed must not look
26214
+ * like one that succeeded.
26215
+ */
26216
+ var RequestCensusStatusSchema = object({
26217
+ armed: boolean(),
26218
+ /** How long the current - or just-closed - window collected, in ms. */
26219
+ elapsedMs: number(),
26220
+ /** The window actually armed, after the server clamped the request. */
26221
+ windowMs: number(),
26222
+ /** Epoch ms the window closes at. 0 when disarmed. */
26223
+ armedUntilMs: number(),
26224
+ httpRequests: number(),
26225
+ batchedRequests: number(),
26226
+ /**
26227
+ * Procedure invocations. Higher than `httpRequests` whenever tRPC batching
26228
+ * is in play (`?batch=1` carries several procedures in one request); this is
26229
+ * the number comparable with a store-side call count.
26230
+ */
26231
+ procedureCalls: number(),
26232
+ /**
26233
+ * tRPC WebSocket connections opened during the window. NOT calls - the WS
26234
+ * transport resolves one context per connection - but the number that says
26235
+ * whether a plane this census cannot see was busy while HTTP was quiet.
26236
+ */
26237
+ wsConnections: number(),
26238
+ distinctGroups: number(),
26239
+ /** Calls counted in the totals whose group attribution was shed at the
26240
+ * cardinality bound. */
26241
+ unattributedCalls: number(),
26242
+ procedures: array(RequestCensusProcedureSchema).readonly(),
26243
+ groups: array(RequestCensusGroupSchema).readonly()
26244
+ }).extend({ persisted: boolean() });
26245
+ /** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
26246
+ var LogLevelSchema$1 = _enum([
26247
+ "debug",
26248
+ "info",
26249
+ "warn",
26250
+ "error"
26251
+ ]);
26252
+ /**
26253
+ * The diagnostics that can be ARMED for a window. Exactly one today.
26254
+ *
26255
+ * A diagnostic is anything whose cost is only worth paying while a question is
26256
+ * open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
26257
+ */
26258
+ var DiagnosticIdSchema = _enum(["request-census"]);
26259
+ /**
26260
+ * The layers of the level hierarchy, general → specific. The most specific
26261
+ * layer that carries an explicit value wins.
26262
+ *
26263
+ * `component` is DECLARED and not yet resolvable: the per-component channels
26264
+ * are a later slice of the same plan, and a `levelSource` enum that has to
26265
+ * grow later would force every consumer of this document to change with it.
26266
+ * Nothing returns `component` today.
26267
+ */
26268
+ var LoggingScopeKindSchema = _enum([
26269
+ "cluster",
26270
+ "node",
26271
+ "component"
26272
+ ]);
26273
+ /** Where an effective level came from. `default` = nothing is set anywhere. */
26274
+ var LoggingLevelSourceSchema = _enum([
26275
+ "default",
26276
+ "cluster",
26277
+ "node",
26278
+ "component"
26279
+ ]);
26280
+ /**
26281
+ * One layer of the hierarchy as it actually STANDS.
26282
+ *
26283
+ * `level: null` is the whole reason this array is returned: it is the
26284
+ * difference between "this node is at `info` because I decided it" and
26285
+ * "...because it inherits". An operator who clears an override believing they
26286
+ * are clearing an inherited value has been handed the same defect as the two
26287
+ * contradicting knobs this document exists to remove, moved one floor up.
26288
+ */
26289
+ var LoggingLevelLayerSchema = object({
26290
+ scope: LoggingScopeKindSchema,
26291
+ /** The node this layer speaks for; `null` on the cluster layer. */
26292
+ nodeId: string().nullable(),
26293
+ /** Explicitly set here, or `null` when this layer inherits. */
26294
+ level: LogLevelSchema$1.nullable()
26295
+ });
26296
+ /** What a line is judged against, and WHICH layer decided it. */
26297
+ var LoggingEffectiveSchema = object({
26298
+ level: LogLevelSchema$1,
26299
+ levelSource: LoggingLevelSourceSchema
26300
+ });
26301
+ /** Every layer, general → specific. Never collapsed into the effective value. */
26302
+ var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
26303
+ /**
26304
+ * An armed diagnostic, with its DEADLINE.
26305
+ *
26306
+ * The shape of ADR-0244: what is stored is a deadline and never a flag, so a
26307
+ * diagnostic somebody forgot expires by itself, and a boot-window measurement
26308
+ * survives the restart it exists to measure. `remainingMs` is 0 whenever
26309
+ * `armed` is false — a window is never reported as slightly expired.
26310
+ */
26311
+ var DiagnosticWindowSchema = object({
26312
+ id: DiagnosticIdSchema,
26313
+ armed: boolean(),
26314
+ /** Epoch ms the window closes at. 0 when disarmed. */
26315
+ armedUntilMs: number(),
26316
+ /** Ms left before it expires on its own. 0 when disarmed. */
26317
+ remainingMs: number(),
26318
+ /** Whether the stored deadline is the one the live diagnostic is running —
26319
+ * i.e. whether this window would survive a restart. */
26320
+ persisted: boolean()
26321
+ });
26322
+ /**
26323
+ * `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
26324
+ * server — there is no maximum here on purpose: a bound repeated in a schema
26325
+ * is a second knob that disagrees with the first the day one of them moves.
26326
+ */
26327
+ var DiagnosticWindowPatchSchema = object({
26328
+ id: DiagnosticIdSchema,
26329
+ armMs: number().int().min(0),
26330
+ /** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
26331
+ reportEveryMs: number().int().positive().optional()
26332
+ });
26333
+ /**
26334
+ * A PATCH, and patches MERGE.
26335
+ *
26336
+ * A field absent from the patch is left exactly as it was — arming a
26337
+ * diagnostic never resets a level, and setting a level never disarms a window.
26338
+ * The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
26339
+ * `setAll` already merges, and rebuilding the object is how an absent field
26340
+ * turns into an erased one.
26341
+ */
26342
+ var LoggingSettingsPatchSchema = object({
26343
+ /**
26344
+ * Absent leaves the level untouched. `null` CLEARS the explicit value at the
26345
+ * addressed scope so it inherits again. A value sets it.
26346
+ */
26347
+ level: LogLevelSchema$1.nullable().optional(),
26348
+ /**
26349
+ * Only the diagnostics NAMED here change. An armed window that is not listed
26350
+ * keeps running — a patch is never a full replacement.
26351
+ */
26352
+ diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
26353
+ });
26354
+ /**
26355
+ * Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
26356
+ *
26357
+ * Deliberately NOT called `nodeId`: that key is reserved on every cap method
26358
+ * input — the generated router strips it and uses it to resolve the PROVIDER
26359
+ * on that node (`resolveProvider(cap, nodeId, …)`). A document about
26360
+ * `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
26361
+ * by an agent that holds no cluster document at all. The hub is the single
26362
+ * authority over the whole hierarchy and answers for every layer, so the
26363
+ * layer selector needs a name the transport does not already own.
26364
+ */
26365
+ var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
26366
+ var SetLoggingSettingsInputSchema = object({
26367
+ scopeNodeId: string().optional(),
26368
+ patch: LoggingSettingsPatchSchema
26369
+ });
26370
+ /**
26371
+ * The whole document, as read and as returned after every write.
26372
+ *
26373
+ * `persisted: false` means the settings store could not be read or written.
26374
+ * The in-memory mirror still governs behaviour and is unchanged by the
26375
+ * failure — a read that fails neither switches a level nor disarms a window
26376
+ * (D49) — but the operator is told that what they are looking at would not
26377
+ * survive a restart.
26378
+ */
26379
+ var LoggingSettingsStateSchema = object({
26380
+ /** The layer this document was read at. `null` = the cluster layer. */
26381
+ scopeNodeId: string().nullable(),
26382
+ effective: LoggingEffectiveSchema,
26383
+ explicit: LoggingExplicitSchema,
26384
+ activeWindows: array(DiagnosticWindowSchema).readonly(),
26385
+ persisted: boolean()
26386
+ });
26009
26387
  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(), {
26010
26388
  kind: "mutation",
26011
26389
  auth: "admin"
@@ -26018,6 +26396,9 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
26018
26396
  }), method(_void(), SiteLocationStatusSchema, {
26019
26397
  kind: "mutation",
26020
26398
  auth: "admin"
26399
+ }), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
26400
+ kind: "mutation",
26401
+ auth: "admin"
26021
26402
  });
26022
26403
  object({
26023
26404
  /** True when the device's tamper switch / case-open contact is
@@ -31849,6 +32230,18 @@ Object.freeze({
31849
32230
  addonId: null,
31850
32231
  access: "create"
31851
32232
  },
32233
+ "system.getLoggingSettings": {
32234
+ capName: "system",
32235
+ capScope: "system",
32236
+ addonId: null,
32237
+ access: "view"
32238
+ },
32239
+ "system.getRequestCensus": {
32240
+ capName: "system",
32241
+ capScope: "system",
32242
+ addonId: null,
32243
+ access: "view"
32244
+ },
31852
32245
  "system.getRetentionConfig": {
31853
32246
  capName: "system",
31854
32247
  capScope: "system",
@@ -31879,6 +32272,12 @@ Object.freeze({
31879
32272
  addonId: null,
31880
32273
  access: "view"
31881
32274
  },
32275
+ "system.setLoggingSettings": {
32276
+ capName: "system",
32277
+ capScope: "system",
32278
+ addonId: null,
32279
+ access: "create"
32280
+ },
31882
32281
  "system.setRetentionConfig": {
31883
32282
  capName: "system",
31884
32283
  capScope: "system",
@@ -33034,6 +33433,10 @@ Object.freeze({
33034
33433
  name: "deviceId",
33035
33434
  form: "single",
33036
33435
  optional: true
33436
+ }, {
33437
+ name: "deviceIds",
33438
+ form: "array",
33439
+ optional: true
33037
33440
  }],
33038
33441
  "fanControl.setDirection": [{
33039
33442
  name: "deviceId",
@@ -34644,7 +35047,38 @@ object({
34644
35047
  * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
34645
35048
  * reproduce that.
34646
35049
  */
34647
- tileBudgetMb: number().int().min(0).max(1024)
35050
+ tileBudgetMb: number().int().min(0).max(1024),
35051
+ /**
35052
+ * RAM ceiling per decode worker, in MB, for the SCENE TILES — one
35053
+ * JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
35054
+ * subject tiles, on frames that detected something.
35055
+ *
35056
+ * It exists because a subject tile cannot answer a FULL-FRAME request:
35057
+ * containment is strict by design, so the native `keyFrame`, the detail
35058
+ * plane's `frameJpeg` rung and the display-crop fallback had no rung at all
35059
+ * below the hold. Measured on the live cluster: 23.3% of key-frame captures
35060
+ * missed, 95.7% of them with `worker-lease-gone` — the raster released one
35061
+ * frame-time after delivery, with the request only p50 367 ms behind it.
35062
+ *
35063
+ * Sizing, and why this is a budget and not a duration: a scene tile is
35064
+ * ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
35065
+ * ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
35066
+ * camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
35067
+ * frames, i.e. the store's 30 s TTL binds at the steady state and the budget
35068
+ * binds only through a detection burst, where it still covers well past the
35069
+ * measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
35070
+ * would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
35071
+ * whole shape exists to avoid.
35072
+ *
35073
+ * A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
35074
+ * subject tile, so one shared budget would let a busy camera's key frames
35075
+ * evict the face/plate tiles the recognisers depend on. Two budgets make that
35076
+ * impossible rather than unlikely. `0` DISABLES scene tiles and restores the
35077
+ * pre-existing behaviour, where a late full-frame request had nothing but the
35078
+ * ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
35079
+ * nothing.
35080
+ */
35081
+ sceneBudgetMb: number().int().min(0).max(1024)
34648
35082
  });
34649
35083
  /**
34650
35084
  * The values in force when the operator has set nothing.
@@ -34660,12 +35094,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
34660
35094
  budgetMb: 1024,
34661
35095
  activityMs: 15e3,
34662
35096
  tileBudgetMb: 64,
35097
+ sceneBudgetMb: 48,
34663
35098
  admission: "inferred"
34664
35099
  };
34665
35100
  DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
34666
35101
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
34667
35102
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
34668
35103
  DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
35104
+ DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
34669
35105
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
34670
35106
  var MB = 1024 * 1024;
34671
35107
  1024 * MB, 3072 * MB;