@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.
@@ -7511,6 +7511,66 @@ var OpsLogQueryInputSchema = object({
7511
7511
  /** Max rows returned, newest-first. */
7512
7512
  limit: number().int().min(1).max(1e3).optional()
7513
7513
  });
7514
+ var LabelDefinitionSchema = object({
7515
+ id: string(),
7516
+ name: string(),
7517
+ category: string().optional(),
7518
+ description: string().optional(),
7519
+ icon: string().optional()
7520
+ });
7521
+ /** Detection-macro targets a catalog `classMap` may resolve to. */
7522
+ var CLASS_MAP_MACRO_TARGETS = [
7523
+ "person",
7524
+ "vehicle",
7525
+ "animal",
7526
+ "package"
7527
+ ];
7528
+ /**
7529
+ * Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
7530
+ * un operatore può selezionare.
7531
+ *
7532
+ * Sono le tre offerte dallo step `object-detection`
7533
+ * (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
7534
+ * `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
7535
+ * `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
7536
+ * `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
7537
+ * stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
7538
+ * (suitcase/backpack/handbag) lasciando spento il detector dedicato.
7539
+ *
7540
+ * UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
7541
+ * dello step e una seconda volta come union `FirstLevelMacro`
7542
+ * (`types/detection.ts`); una terza copia per il trigger di registrazione
7543
+ * (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
7544
+ * successiva.
7545
+ */
7546
+ var FIRST_LEVEL_MACRO_CLASSES = [
7547
+ "person",
7548
+ "vehicle",
7549
+ "animal"
7550
+ ];
7551
+ /**
7552
+ * Wire schema for a per-model CATALOG classMap override
7553
+ * (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
7554
+ * restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
7555
+ * detection pipeline executor actually routes.
7556
+ *
7557
+ * This is deliberately a DIFFERENT, narrower shape than the general-purpose
7558
+ * `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
7559
+ * and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
7560
+ * enum) — the two used to share the name `ClassMapDefinition`/
7561
+ * `ClassMapDefinitionSchema`, which made the schema-type-twin guard
7562
+ * (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
7563
+ * are not: it is two different concepts colliding on a name. Keep this type
7564
+ * under its own name rather than reusing `ClassMapDefinition` — reusing it
7565
+ * would either narrow every `ClassMapDefinition` consumer to the four
7566
+ * detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
7567
+ * schema exists for (see the "rejects a classMap whose target is not a
7568
+ * detection macro" test in `model-catalog-schema.test.ts`).
7569
+ */
7570
+ var DetectionCatalogClassMapSchema = object({
7571
+ mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
7572
+ preserveOriginal: boolean()
7573
+ });
7514
7574
  /**
7515
7575
  * Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
7516
7576
  * Named `RecordingWeekday` to avoid collision with the string-union
@@ -7533,10 +7593,55 @@ var RecordingStorageModeSchema = _enum([
7533
7593
  "events",
7534
7594
  "continuous"
7535
7595
  ]);
7596
+ /**
7597
+ * Le macro classi che possono aprire una finestra di registrazione — le stesse
7598
+ * tre offerte dallo step `object-detection`, da UNA lista
7599
+ * ({@link FIRST_LEVEL_MACRO_CLASSES}).
7600
+ */
7601
+ var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
7602
+ /**
7603
+ * True quando `values` non ripete un elemento.
7604
+ *
7605
+ * Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
7606
+ * diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
7607
+ * conterebbe due volte le sue finestre in `segmentMissedByMs`.
7608
+ */
7609
+ var noDuplicates = (values) => new Set(values).size === values.length;
7536
7610
  /** Which detectors trigger an `events`-mode band. */
7537
7611
  var RecordingTriggersSchema = object({
7538
7612
  motion: boolean().optional(),
7539
- audioThresholdDbfs: number().optional()
7613
+ audioThresholdDbfs: number().optional(),
7614
+ /**
7615
+ * Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
7616
+ * non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
7617
+ * object acceso, nessuna classe" è la stessa forma "abilitata e non registra
7618
+ * nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
7619
+ *
7620
+ * Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
7621
+ * quelle che hanno attraversato `enabledMacroClasses`, i
7622
+ * `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
7623
+ * (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
7624
+ * finestre — vedi `recorder/object-trigger.ts`.
7625
+ */
7626
+ objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
7627
+ /**
7628
+ * I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
7629
+ * non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
7630
+ * `objectClasses`.
7631
+ *
7632
+ * Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
7633
+ * percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
7634
+ * non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
7635
+ * si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
7636
+ * device (D12) — mai un elenco globale di cap.
7637
+ *
7638
+ * Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
7639
+ * `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
7640
+ * la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
7641
+ * il livello: un contatto trovato già aperto al riavvio del runner non fa
7642
+ * registrare.
7643
+ */
7644
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7540
7645
  });
7541
7646
  /**
7542
7647
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -7988,41 +8093,6 @@ var DecoderSessionConfigSchema = object({
7988
8093
  */
7989
8094
  debug: boolean().optional()
7990
8095
  });
7991
- var LabelDefinitionSchema = object({
7992
- id: string(),
7993
- name: string(),
7994
- category: string().optional(),
7995
- description: string().optional(),
7996
- icon: string().optional()
7997
- });
7998
- /**
7999
- * Wire schema for a per-model CATALOG classMap override
8000
- * (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
8001
- * restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
8002
- * detection pipeline executor actually routes.
8003
- *
8004
- * This is deliberately a DIFFERENT, narrower shape than the general-purpose
8005
- * `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
8006
- * and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
8007
- * enum) — the two used to share the name `ClassMapDefinition`/
8008
- * `ClassMapDefinitionSchema`, which made the schema-type-twin guard
8009
- * (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
8010
- * are not: it is two different concepts colliding on a name. Keep this type
8011
- * under its own name rather than reusing `ClassMapDefinition` — reusing it
8012
- * would either narrow every `ClassMapDefinition` consumer to the four
8013
- * detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
8014
- * schema exists for (see the "rejects a classMap whose target is not a
8015
- * detection macro" test in `model-catalog-schema.test.ts`).
8016
- */
8017
- var DetectionCatalogClassMapSchema = object({
8018
- mapping: record(string(), _enum([
8019
- "person",
8020
- "vehicle",
8021
- "animal",
8022
- "package"
8023
- ])),
8024
- preserveOriginal: boolean()
8025
- });
8026
8096
  var MODEL_FORMATS = [
8027
8097
  "onnx",
8028
8098
  "coreml",
@@ -20856,7 +20926,7 @@ var lifecycleJobSchema = object({
20856
20926
  * `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
20857
20927
  * as every other cap.
20858
20928
  */
20859
- var LogLevelSchema$1 = _enum([
20929
+ var LogLevelSchema$2 = _enum([
20860
20930
  "debug",
20861
20931
  "info",
20862
20932
  "warn",
@@ -21063,7 +21133,7 @@ var CustomActionInputSchema = object({
21063
21133
  method(_void(), array(AddonListItemSchema).readonly()), method(object({
21064
21134
  addonId: string(),
21065
21135
  limit: number().min(1).max(500).default(100),
21066
- level: LogLevelSchema$1.optional()
21136
+ level: LogLevelSchema$2.optional()
21067
21137
  }), array(LogQueryEntrySchema)), method(_void(), array(InstalledPackageSchema).readonly()), method(object({
21068
21138
  packageName: string(),
21069
21139
  version: string().optional()
@@ -21161,7 +21231,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
21161
21231
  auth: "admin"
21162
21232
  }), method(object({
21163
21233
  addonId: string(),
21164
- level: LogLevelSchema$1.optional()
21234
+ level: LogLevelSchema$2.optional()
21165
21235
  }), LogStreamEntrySchema, { kind: "subscription" });
21166
21236
  object({
21167
21237
  /** Carbon dioxide concentration in ppm. */
@@ -22155,6 +22225,35 @@ var FaceFilterEnum = _enum([
22155
22225
  "identified",
22156
22226
  "all"
22157
22227
  ]);
22228
+ /**
22229
+ * What a `listRecentFaces` page is ORDERED BY.
22230
+ *
22231
+ * - `timestamp` — when the face was seen. The historical (and default) order.
22232
+ * - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
22233
+ * cosine of the face's SUGGESTED identity. This is the "review by certainty"
22234
+ * order: it puts the suggestions an operator can confirm with one tap at the
22235
+ * top, and it is the reason this enum exists — a client that ranked a capped
22236
+ * page client-side was ranking the newest N, never the most certain N.
22237
+ *
22238
+ * A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
22239
+ * auto-assigned face, or a face below the suggestion band) has no certainty to
22240
+ * compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
22241
+ * — flipping the direction reorders the rows that HAVE a certainty and never
22242
+ * floods the page with the ones that do not. `addon-post-analysis`'s
22243
+ * `store/face-sort.ts` is the single implementation, tiebreaks newest-first
22244
+ * then by faceId, and is what makes this a total order instead of the
22245
+ * backend's NULL-collation accident.
22246
+ */
22247
+ var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
22248
+ var FaceSortDirectionEnum = _enum(["asc", "desc"]);
22249
+ /** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
22250
+ * never leaves the server. */
22251
+ var FaceClusterSchema = object({
22252
+ faceIds: array(string()).readonly(),
22253
+ representativeFaceId: string(),
22254
+ size: number().int(),
22255
+ cohesion: number()
22256
+ });
22158
22257
  var MediaFileLiteSchema$1 = object({
22159
22258
  key: string(),
22160
22259
  kind: string(),
@@ -22201,24 +22300,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
22201
22300
  kind: "mutation",
22202
22301
  auth: "admin"
22203
22302
  }), method(object({
22204
- /** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
22303
+ /**
22304
+ * Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
22305
+ *
22306
+ * The legacy single-camera form, kept verbatim for every caller that
22307
+ * already sends it. A caller that wants a SET sends {@link deviceIds}
22308
+ * instead — never both: `deviceIds` is the authority whenever it is
22309
+ * present, and this field is then ignored rather than unioned, so
22310
+ * there is exactly one answer to "which cameras did I ask for".
22311
+ */
22205
22312
  deviceId: number().int().optional(),
22313
+ /**
22314
+ * Restrict to a SET of cameras — the review UI's camera filter, which
22315
+ * until now had to fetch the cluster-wide page and drop rows in the
22316
+ * client (so the `limit` it asked for was spent on cameras it was
22317
+ * about to discard).
22318
+ *
22319
+ * An **empty array reads NOTHING** — `[]` is an empty page, never
22320
+ * "every camera". A request for no devices is a request, not an
22321
+ * omission; same contract as `deviceManager.listFleet` and
22322
+ * `pipelineAnalytics.listRecentTracks`.
22323
+ *
22324
+ * Absent (`undefined`) is the omission, and keeps the cluster-wide view.
22325
+ */
22326
+ deviceIds: array(number().int()).optional(),
22206
22327
  limit: number().int().positive().optional(),
22207
22328
  filter: FaceFilterEnum.optional(),
22208
22329
  /**
22209
- * Inline the base64 crop on every row. Default `true` — the existing
22210
- * behaviour, kept so no caller breaks.
22330
+ * Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
22331
+ * Absent means no lower bound.
22332
+ */
22333
+ since: number().int().optional(),
22334
+ /**
22335
+ * Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
22336
+ * Absent means no upper bound.
22337
+ */
22338
+ until: number().int().optional(),
22339
+ /**
22340
+ * Order the page by time or by suggestion certainty. Default
22341
+ * `'timestamp'` — the historical order, unchanged for every caller
22342
+ * that does not ask.
22211
22343
  *
22212
- * Set `false` once the caller renders {@link FaceInfo.cropUrl}: that
22213
- * drops ~2.87 MiB per 500-row page to a few KiB of metadata and lets
22214
- * the browser cache the images.
22344
+ * See {@link FaceSortFieldEnum} for what a row with no suggestion
22345
+ * does under `'suggestionConfidence'`.
22215
22346
  *
22216
- * **This is an INPUT field, so it does not reach the addon until the
22217
- * next train.** The hub router validates cap inputs against its own
22218
- * compiled Zod, which strips a key it does not know verified today
22219
- * on the OUTPUT side, where an additive field DOES arrive immediately
22220
- * (`Track.hasFace`). Until the train ships, sending `false` is
22221
- * harmless and simply keeps the crops inline.
22347
+ * Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
22348
+ * index and stops reading as soon as `limit` rows have PASSED the
22349
+ * filter. `'suggestionConfidence'` cannot stop earlythe most
22350
+ * certain row may be the oldest so it walks the window. Narrow it
22351
+ * with {@link since} / {@link until}.
22352
+ */
22353
+ sortBy: FaceSortFieldEnum.optional(),
22354
+ /** Sort direction for {@link sortBy}. Default `'desc'`. */
22355
+ sortDirection: FaceSortDirectionEnum.optional(),
22356
+ /**
22357
+ * Inline the base64 crop on every row.
22358
+ *
22359
+ * Default `false` since the 2026-08-25 inversion — see
22360
+ * `include-crops-default.ts`, which is the ONE place that resolves
22361
+ * this for every gallery, and which records why the inline shape had
22362
+ * to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
22363
+ * The doc here used to still say `true`; it was wrong, and a leftover
22364
+ * that describes the old design reads as permission to rely on it.
22365
+ *
22366
+ * Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
22367
+ * which the browser fetches off the `event-media` plane in parallel,
22368
+ * cached and ETagged.
22222
22369
  */
22223
22370
  includeCrops: boolean().optional()
22224
22371
  }).optional(), array(FaceInfoSchema).readonly()), method(object({
@@ -22254,13 +22401,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
22254
22401
  }), method(object({
22255
22402
  threshold: number().min(0).max(1).optional(),
22256
22403
  minClusterSize: number().int().min(2).optional(),
22257
- limit: number().int().positive().optional()
22258
- }).optional(), array(object({
22259
- faceIds: array(string()).readonly(),
22260
- representativeFaceId: string(),
22261
- size: number().int(),
22262
- cohesion: number()
22263
- })).readonly());
22404
+ /**
22405
+ * Cap on the number of CLUSTERS returned. Renamed from `limit`,
22406
+ * which read as though it bounded the work — it never did.
22407
+ *
22408
+ * Wins over {@link limit} when both are sent.
22409
+ */
22410
+ maxClusters: number().int().positive().optional(),
22411
+ /**
22412
+ * @deprecated Ambiguous name for {@link maxClusters} — it cuts the
22413
+ * RESULT, not the scan. Kept so existing callers keep working; send
22414
+ * `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
22415
+ */
22416
+ limit: number().int().positive().optional(),
22417
+ /**
22418
+ * Cap on the number of unassigned faces READ AND CLUSTERED — the
22419
+ * POOL, not the result.
22420
+ *
22421
+ * This is the knob {@link maxClusters} was mistaken for. Clustering
22422
+ * used to read every unassigned face on the hub no matter what the
22423
+ * caller asked for, because the only bound cut the finished clusters
22424
+ * afterwards; a UI showing a window of 100 paid for a scan of the
22425
+ * whole corpus, on an addon whose disk is under contention.
22426
+ *
22427
+ * The pool is the NEWEST matching faces first — the same order the
22428
+ * gallery shows — so a bound here shortens the horizon, it does not
22429
+ * sample it randomly.
22430
+ *
22431
+ * Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
22432
+ * so the live corpus — 372 face rows — is unaffected while the
22433
+ * unbounded scan can never come back as the table grows.
22434
+ */
22435
+ maxFacesScanned: number().int().positive().optional()
22436
+ }).optional(), array(FaceClusterSchema).readonly());
22264
22437
  /**
22265
22438
  * Fan-control cap. Models HA `fan.*` entity-specific surfaces:
22266
22439
  * speed percentage, preset modes, ceiling-fan direction, and
@@ -25983,6 +26156,211 @@ var SetSiteLocationInputSchema = object({
25983
26156
  latitude: number().min(-90).max(90),
25984
26157
  longitude: number().min(-180).max(180)
25985
26158
  }).nullable();
26159
+ /**
26160
+ * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
26161
+ * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
26162
+ * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
26163
+ * already prints - never a token, never an `Authorization` header.
26164
+ */
26165
+ var RequestCensusGroupSchema = object({
26166
+ procedure: string(),
26167
+ userAgent: string(),
26168
+ ip: string(),
26169
+ principal: string(),
26170
+ calls: number(),
26171
+ perMin: number()
26172
+ });
26173
+ /**
26174
+ * A procedure's TOTAL over the window, across every caller.
26175
+ *
26176
+ * This block, not the group list, is what answers "did these calls arrive over
26177
+ * HTTP at all". A total far BELOW what a store-side census counted over the
26178
+ * same window excludes the HTTP plane, which is a result, not a failure.
26179
+ */
26180
+ var RequestCensusProcedureSchema = object({
26181
+ procedure: string(),
26182
+ calls: number(),
26183
+ perMin: number()
26184
+ });
26185
+ /**
26186
+ * The census as an operator sees it.
26187
+ *
26188
+ * `persisted` is the honest answer to "will this survive the restart I am
26189
+ * about to do": the arm deadline is written to `system-settings` so a window
26190
+ * armed now can measure the NEXT boot, and a write that failed must not look
26191
+ * like one that succeeded.
26192
+ */
26193
+ var RequestCensusStatusSchema = object({
26194
+ armed: boolean(),
26195
+ /** How long the current - or just-closed - window collected, in ms. */
26196
+ elapsedMs: number(),
26197
+ /** The window actually armed, after the server clamped the request. */
26198
+ windowMs: number(),
26199
+ /** Epoch ms the window closes at. 0 when disarmed. */
26200
+ armedUntilMs: number(),
26201
+ httpRequests: number(),
26202
+ batchedRequests: number(),
26203
+ /**
26204
+ * Procedure invocations. Higher than `httpRequests` whenever tRPC batching
26205
+ * is in play (`?batch=1` carries several procedures in one request); this is
26206
+ * the number comparable with a store-side call count.
26207
+ */
26208
+ procedureCalls: number(),
26209
+ /**
26210
+ * tRPC WebSocket connections opened during the window. NOT calls - the WS
26211
+ * transport resolves one context per connection - but the number that says
26212
+ * whether a plane this census cannot see was busy while HTTP was quiet.
26213
+ */
26214
+ wsConnections: number(),
26215
+ distinctGroups: number(),
26216
+ /** Calls counted in the totals whose group attribution was shed at the
26217
+ * cardinality bound. */
26218
+ unattributedCalls: number(),
26219
+ procedures: array(RequestCensusProcedureSchema).readonly(),
26220
+ groups: array(RequestCensusGroupSchema).readonly()
26221
+ }).extend({ persisted: boolean() });
26222
+ /** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
26223
+ var LogLevelSchema$1 = _enum([
26224
+ "debug",
26225
+ "info",
26226
+ "warn",
26227
+ "error"
26228
+ ]);
26229
+ /**
26230
+ * The diagnostics that can be ARMED for a window. Exactly one today.
26231
+ *
26232
+ * A diagnostic is anything whose cost is only worth paying while a question is
26233
+ * open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
26234
+ */
26235
+ var DiagnosticIdSchema = _enum(["request-census"]);
26236
+ /**
26237
+ * The layers of the level hierarchy, general → specific. The most specific
26238
+ * layer that carries an explicit value wins.
26239
+ *
26240
+ * `component` is DECLARED and not yet resolvable: the per-component channels
26241
+ * are a later slice of the same plan, and a `levelSource` enum that has to
26242
+ * grow later would force every consumer of this document to change with it.
26243
+ * Nothing returns `component` today.
26244
+ */
26245
+ var LoggingScopeKindSchema = _enum([
26246
+ "cluster",
26247
+ "node",
26248
+ "component"
26249
+ ]);
26250
+ /** Where an effective level came from. `default` = nothing is set anywhere. */
26251
+ var LoggingLevelSourceSchema = _enum([
26252
+ "default",
26253
+ "cluster",
26254
+ "node",
26255
+ "component"
26256
+ ]);
26257
+ /**
26258
+ * One layer of the hierarchy as it actually STANDS.
26259
+ *
26260
+ * `level: null` is the whole reason this array is returned: it is the
26261
+ * difference between "this node is at `info` because I decided it" and
26262
+ * "...because it inherits". An operator who clears an override believing they
26263
+ * are clearing an inherited value has been handed the same defect as the two
26264
+ * contradicting knobs this document exists to remove, moved one floor up.
26265
+ */
26266
+ var LoggingLevelLayerSchema = object({
26267
+ scope: LoggingScopeKindSchema,
26268
+ /** The node this layer speaks for; `null` on the cluster layer. */
26269
+ nodeId: string().nullable(),
26270
+ /** Explicitly set here, or `null` when this layer inherits. */
26271
+ level: LogLevelSchema$1.nullable()
26272
+ });
26273
+ /** What a line is judged against, and WHICH layer decided it. */
26274
+ var LoggingEffectiveSchema = object({
26275
+ level: LogLevelSchema$1,
26276
+ levelSource: LoggingLevelSourceSchema
26277
+ });
26278
+ /** Every layer, general → specific. Never collapsed into the effective value. */
26279
+ var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
26280
+ /**
26281
+ * An armed diagnostic, with its DEADLINE.
26282
+ *
26283
+ * The shape of ADR-0244: what is stored is a deadline and never a flag, so a
26284
+ * diagnostic somebody forgot expires by itself, and a boot-window measurement
26285
+ * survives the restart it exists to measure. `remainingMs` is 0 whenever
26286
+ * `armed` is false — a window is never reported as slightly expired.
26287
+ */
26288
+ var DiagnosticWindowSchema = object({
26289
+ id: DiagnosticIdSchema,
26290
+ armed: boolean(),
26291
+ /** Epoch ms the window closes at. 0 when disarmed. */
26292
+ armedUntilMs: number(),
26293
+ /** Ms left before it expires on its own. 0 when disarmed. */
26294
+ remainingMs: number(),
26295
+ /** Whether the stored deadline is the one the live diagnostic is running —
26296
+ * i.e. whether this window would survive a restart. */
26297
+ persisted: boolean()
26298
+ });
26299
+ /**
26300
+ * `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
26301
+ * server — there is no maximum here on purpose: a bound repeated in a schema
26302
+ * is a second knob that disagrees with the first the day one of them moves.
26303
+ */
26304
+ var DiagnosticWindowPatchSchema = object({
26305
+ id: DiagnosticIdSchema,
26306
+ armMs: number().int().min(0),
26307
+ /** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
26308
+ reportEveryMs: number().int().positive().optional()
26309
+ });
26310
+ /**
26311
+ * A PATCH, and patches MERGE.
26312
+ *
26313
+ * A field absent from the patch is left exactly as it was — arming a
26314
+ * diagnostic never resets a level, and setting a level never disarms a window.
26315
+ * The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
26316
+ * `setAll` already merges, and rebuilding the object is how an absent field
26317
+ * turns into an erased one.
26318
+ */
26319
+ var LoggingSettingsPatchSchema = object({
26320
+ /**
26321
+ * Absent leaves the level untouched. `null` CLEARS the explicit value at the
26322
+ * addressed scope so it inherits again. A value sets it.
26323
+ */
26324
+ level: LogLevelSchema$1.nullable().optional(),
26325
+ /**
26326
+ * Only the diagnostics NAMED here change. An armed window that is not listed
26327
+ * keeps running — a patch is never a full replacement.
26328
+ */
26329
+ diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
26330
+ });
26331
+ /**
26332
+ * Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
26333
+ *
26334
+ * Deliberately NOT called `nodeId`: that key is reserved on every cap method
26335
+ * input — the generated router strips it and uses it to resolve the PROVIDER
26336
+ * on that node (`resolveProvider(cap, nodeId, …)`). A document about
26337
+ * `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
26338
+ * by an agent that holds no cluster document at all. The hub is the single
26339
+ * authority over the whole hierarchy and answers for every layer, so the
26340
+ * layer selector needs a name the transport does not already own.
26341
+ */
26342
+ var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
26343
+ var SetLoggingSettingsInputSchema = object({
26344
+ scopeNodeId: string().optional(),
26345
+ patch: LoggingSettingsPatchSchema
26346
+ });
26347
+ /**
26348
+ * The whole document, as read and as returned after every write.
26349
+ *
26350
+ * `persisted: false` means the settings store could not be read or written.
26351
+ * The in-memory mirror still governs behaviour and is unchanged by the
26352
+ * failure — a read that fails neither switches a level nor disarms a window
26353
+ * (D49) — but the operator is told that what they are looking at would not
26354
+ * survive a restart.
26355
+ */
26356
+ var LoggingSettingsStateSchema = object({
26357
+ /** The layer this document was read at. `null` = the cluster layer. */
26358
+ scopeNodeId: string().nullable(),
26359
+ effective: LoggingEffectiveSchema,
26360
+ explicit: LoggingExplicitSchema,
26361
+ activeWindows: array(DiagnosticWindowSchema).readonly(),
26362
+ persisted: boolean()
26363
+ });
25986
26364
  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(), {
25987
26365
  kind: "mutation",
25988
26366
  auth: "admin"
@@ -25995,6 +26373,9 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
25995
26373
  }), method(_void(), SiteLocationStatusSchema, {
25996
26374
  kind: "mutation",
25997
26375
  auth: "admin"
26376
+ }), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
26377
+ kind: "mutation",
26378
+ auth: "admin"
25998
26379
  });
25999
26380
  object({
26000
26381
  /** True when the device's tamper switch / case-open contact is
@@ -31826,6 +32207,18 @@ Object.freeze({
31826
32207
  addonId: null,
31827
32208
  access: "create"
31828
32209
  },
32210
+ "system.getLoggingSettings": {
32211
+ capName: "system",
32212
+ capScope: "system",
32213
+ addonId: null,
32214
+ access: "view"
32215
+ },
32216
+ "system.getRequestCensus": {
32217
+ capName: "system",
32218
+ capScope: "system",
32219
+ addonId: null,
32220
+ access: "view"
32221
+ },
31829
32222
  "system.getRetentionConfig": {
31830
32223
  capName: "system",
31831
32224
  capScope: "system",
@@ -31856,6 +32249,12 @@ Object.freeze({
31856
32249
  addonId: null,
31857
32250
  access: "view"
31858
32251
  },
32252
+ "system.setLoggingSettings": {
32253
+ capName: "system",
32254
+ capScope: "system",
32255
+ addonId: null,
32256
+ access: "create"
32257
+ },
31859
32258
  "system.setRetentionConfig": {
31860
32259
  capName: "system",
31861
32260
  capScope: "system",
@@ -33011,6 +33410,10 @@ Object.freeze({
33011
33410
  name: "deviceId",
33012
33411
  form: "single",
33013
33412
  optional: true
33413
+ }, {
33414
+ name: "deviceIds",
33415
+ form: "array",
33416
+ optional: true
33014
33417
  }],
33015
33418
  "fanControl.setDirection": [{
33016
33419
  name: "deviceId",
@@ -34621,7 +35024,38 @@ object({
34621
35024
  * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
34622
35025
  * reproduce that.
34623
35026
  */
34624
- tileBudgetMb: number().int().min(0).max(1024)
35027
+ tileBudgetMb: number().int().min(0).max(1024),
35028
+ /**
35029
+ * RAM ceiling per decode worker, in MB, for the SCENE TILES — one
35030
+ * JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
35031
+ * subject tiles, on frames that detected something.
35032
+ *
35033
+ * It exists because a subject tile cannot answer a FULL-FRAME request:
35034
+ * containment is strict by design, so the native `keyFrame`, the detail
35035
+ * plane's `frameJpeg` rung and the display-crop fallback had no rung at all
35036
+ * below the hold. Measured on the live cluster: 23.3% of key-frame captures
35037
+ * missed, 95.7% of them with `worker-lease-gone` — the raster released one
35038
+ * frame-time after delivery, with the request only p50 367 ms behind it.
35039
+ *
35040
+ * Sizing, and why this is a budget and not a duration: a scene tile is
35041
+ * ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
35042
+ * ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
35043
+ * camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
35044
+ * frames, i.e. the store's 30 s TTL binds at the steady state and the budget
35045
+ * binds only through a detection burst, where it still covers well past the
35046
+ * measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
35047
+ * would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
35048
+ * whole shape exists to avoid.
35049
+ *
35050
+ * A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
35051
+ * subject tile, so one shared budget would let a busy camera's key frames
35052
+ * evict the face/plate tiles the recognisers depend on. Two budgets make that
35053
+ * impossible rather than unlikely. `0` DISABLES scene tiles and restores the
35054
+ * pre-existing behaviour, where a late full-frame request had nothing but the
35055
+ * ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
35056
+ * nothing.
35057
+ */
35058
+ sceneBudgetMb: number().int().min(0).max(1024)
34625
35059
  });
34626
35060
  /**
34627
35061
  * The values in force when the operator has set nothing.
@@ -34637,12 +35071,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
34637
35071
  budgetMb: 1024,
34638
35072
  activityMs: 15e3,
34639
35073
  tileBudgetMb: 64,
35074
+ sceneBudgetMb: 48,
34640
35075
  admission: "inferred"
34641
35076
  };
34642
35077
  DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
34643
35078
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
34644
35079
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
34645
35080
  DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
35081
+ DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
34646
35082
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
34647
35083
  var MB = 1024 * 1024;
34648
35084
  1024 * MB, 3072 * MB;
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_shared = require("./shared-CjXJLI0c.js");
5
+ const require_shared = require("./shared-Dry6vSuS.js");
6
6
  let node_stream = require("node:stream");
7
7
  let webdav = require("webdav");
8
8
  //#region src/providers/webdav/webdav-config-schema.ts