@camstack/addon-model-studio 1.1.45 → 1.1.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (18) hide show
  1. package/dist/{MotionZonesSettings-BA2jeOR6.mjs → MotionZonesSettings-DatYL4fO.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-Bf1hFhGN.mjs → PrivacyMaskSettings-B-voWing.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-DcKcwKsJ.mjs → SceneMonitorEditor-B9pWKzVY.mjs} +3 -3
  4. package/dist/_stub.js +336 -336
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-B-ZMvrf0.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-DuCWAiYv.mjs} +4 -4
  6. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-hvsEgbZS.mjs +26 -0
  7. package/dist/{hostInit-BZM9cD30.mjs → hostInit-NwYsxI8A.mjs} +3 -3
  8. package/dist/model-studio.addon.js +495 -59
  9. package/dist/model-studio.addon.mjs +495 -59
  10. package/dist/{player-overlays-CUJ2regU.mjs → player-overlays-BpSi3fah.mjs} +1 -1
  11. package/dist/remoteEntry.js +1 -1
  12. package/dist/{responsive-pq6YOPGN.mjs → responsive-CpGiOR9P.mjs} +1 -1
  13. package/dist/{square-BFrlalUj.mjs → square-BuNcSEVL.mjs} +1 -1
  14. package/dist/{trash-2-KCXgMJqK.mjs → trash-2-DgoF37KH.mjs} +1 -1
  15. package/dist/{use-device-snapshot-C9mtUHIM.mjs → use-device-snapshot-pFUT6-FP.mjs} +1 -1
  16. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-DlP1RQa1.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-Ddkj3KLy.mjs} +1 -1
  17. package/package.json +1 -1
  18. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-C3sZIjJ6.mjs +0 -26
@@ -8188,6 +8188,66 @@ var OpsLogQueryInputSchema = object({
8188
8188
  /** Max rows returned, newest-first. */
8189
8189
  limit: number().int().min(1).max(1e3).optional()
8190
8190
  });
8191
+ var LabelDefinitionSchema = object({
8192
+ id: string(),
8193
+ name: string(),
8194
+ category: string().optional(),
8195
+ description: string().optional(),
8196
+ icon: string().optional()
8197
+ });
8198
+ /** Detection-macro targets a catalog `classMap` may resolve to. */
8199
+ var CLASS_MAP_MACRO_TARGETS = [
8200
+ "person",
8201
+ "vehicle",
8202
+ "animal",
8203
+ "package"
8204
+ ];
8205
+ /**
8206
+ * Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
8207
+ * un operatore può selezionare.
8208
+ *
8209
+ * Sono le tre offerte dallo step `object-detection`
8210
+ * (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
8211
+ * `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
8212
+ * `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
8213
+ * `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
8214
+ * stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
8215
+ * (suitcase/backpack/handbag) lasciando spento il detector dedicato.
8216
+ *
8217
+ * UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
8218
+ * dello step e una seconda volta come union `FirstLevelMacro`
8219
+ * (`types/detection.ts`); una terza copia per il trigger di registrazione
8220
+ * (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
8221
+ * successiva.
8222
+ */
8223
+ var FIRST_LEVEL_MACRO_CLASSES = [
8224
+ "person",
8225
+ "vehicle",
8226
+ "animal"
8227
+ ];
8228
+ /**
8229
+ * Wire schema for a per-model CATALOG classMap override
8230
+ * (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
8231
+ * restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
8232
+ * detection pipeline executor actually routes.
8233
+ *
8234
+ * This is deliberately a DIFFERENT, narrower shape than the general-purpose
8235
+ * `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
8236
+ * and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
8237
+ * enum) — the two used to share the name `ClassMapDefinition`/
8238
+ * `ClassMapDefinitionSchema`, which made the schema-type-twin guard
8239
+ * (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
8240
+ * are not: it is two different concepts colliding on a name. Keep this type
8241
+ * under its own name rather than reusing `ClassMapDefinition` — reusing it
8242
+ * would either narrow every `ClassMapDefinition` consumer to the four
8243
+ * detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
8244
+ * schema exists for (see the "rejects a classMap whose target is not a
8245
+ * detection macro" test in `model-catalog-schema.test.ts`).
8246
+ */
8247
+ var DetectionCatalogClassMapSchema = object({
8248
+ mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
8249
+ preserveOriginal: boolean()
8250
+ });
8191
8251
  /**
8192
8252
  * Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
8193
8253
  * Named `RecordingWeekday` to avoid collision with the string-union
@@ -8210,10 +8270,55 @@ var RecordingStorageModeSchema = _enum([
8210
8270
  "events",
8211
8271
  "continuous"
8212
8272
  ]);
8273
+ /**
8274
+ * Le macro classi che possono aprire una finestra di registrazione — le stesse
8275
+ * tre offerte dallo step `object-detection`, da UNA lista
8276
+ * ({@link FIRST_LEVEL_MACRO_CLASSES}).
8277
+ */
8278
+ var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
8279
+ /**
8280
+ * True quando `values` non ripete un elemento.
8281
+ *
8282
+ * Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
8283
+ * diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
8284
+ * conterebbe due volte le sue finestre in `segmentMissedByMs`.
8285
+ */
8286
+ var noDuplicates = (values) => new Set(values).size === values.length;
8213
8287
  /** Which detectors trigger an `events`-mode band. */
8214
8288
  var RecordingTriggersSchema = object({
8215
8289
  motion: boolean().optional(),
8216
- audioThresholdDbfs: number().optional()
8290
+ audioThresholdDbfs: number().optional(),
8291
+ /**
8292
+ * Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
8293
+ * non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
8294
+ * object acceso, nessuna classe" è la stessa forma "abilitata e non registra
8295
+ * nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
8296
+ *
8297
+ * Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
8298
+ * quelle che hanno attraversato `enabledMacroClasses`, i
8299
+ * `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
8300
+ * (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
8301
+ * finestre — vedi `recorder/object-trigger.ts`.
8302
+ */
8303
+ objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
8304
+ /**
8305
+ * I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
8306
+ * non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
8307
+ * `objectClasses`.
8308
+ *
8309
+ * Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
8310
+ * percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
8311
+ * non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
8312
+ * si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
8313
+ * device (D12) — mai un elenco globale di cap.
8314
+ *
8315
+ * Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
8316
+ * `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
8317
+ * la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
8318
+ * il livello: un contatto trovato già aperto al riavvio del runner non fa
8319
+ * registrare.
8320
+ */
8321
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
8217
8322
  });
8218
8323
  /**
8219
8324
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -8665,41 +8770,6 @@ var DecoderSessionConfigSchema = object({
8665
8770
  */
8666
8771
  debug: boolean().optional()
8667
8772
  });
8668
- var LabelDefinitionSchema = object({
8669
- id: string(),
8670
- name: string(),
8671
- category: string().optional(),
8672
- description: string().optional(),
8673
- icon: string().optional()
8674
- });
8675
- /**
8676
- * Wire schema for a per-model CATALOG classMap override
8677
- * (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
8678
- * restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
8679
- * detection pipeline executor actually routes.
8680
- *
8681
- * This is deliberately a DIFFERENT, narrower shape than the general-purpose
8682
- * `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
8683
- * and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
8684
- * enum) — the two used to share the name `ClassMapDefinition`/
8685
- * `ClassMapDefinitionSchema`, which made the schema-type-twin guard
8686
- * (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
8687
- * are not: it is two different concepts colliding on a name. Keep this type
8688
- * under its own name rather than reusing `ClassMapDefinition` — reusing it
8689
- * would either narrow every `ClassMapDefinition` consumer to the four
8690
- * detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
8691
- * schema exists for (see the "rejects a classMap whose target is not a
8692
- * detection macro" test in `model-catalog-schema.test.ts`).
8693
- */
8694
- var DetectionCatalogClassMapSchema = object({
8695
- mapping: record(string(), _enum([
8696
- "person",
8697
- "vehicle",
8698
- "animal",
8699
- "package"
8700
- ])),
8701
- preserveOriginal: boolean()
8702
- });
8703
8773
  var MODEL_FORMATS = [
8704
8774
  "onnx",
8705
8775
  "coreml",
@@ -21535,7 +21605,7 @@ var lifecycleJobSchema = object({
21535
21605
  * `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
21536
21606
  * as every other cap.
21537
21607
  */
21538
- var LogLevelSchema$1 = _enum([
21608
+ var LogLevelSchema$2 = _enum([
21539
21609
  "debug",
21540
21610
  "info",
21541
21611
  "warn",
@@ -21742,7 +21812,7 @@ var CustomActionInputSchema = object({
21742
21812
  method(_void(), array(AddonListItemSchema).readonly()), method(object({
21743
21813
  addonId: string(),
21744
21814
  limit: number().min(1).max(500).default(100),
21745
- level: LogLevelSchema$1.optional()
21815
+ level: LogLevelSchema$2.optional()
21746
21816
  }), array(LogQueryEntrySchema)), method(_void(), array(InstalledPackageSchema).readonly()), method(object({
21747
21817
  packageName: string(),
21748
21818
  version: string().optional()
@@ -21840,7 +21910,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
21840
21910
  auth: "admin"
21841
21911
  }), method(object({
21842
21912
  addonId: string(),
21843
- level: LogLevelSchema$1.optional()
21913
+ level: LogLevelSchema$2.optional()
21844
21914
  }), LogStreamEntrySchema, { kind: "subscription" });
21845
21915
  object({
21846
21916
  /** Carbon dioxide concentration in ppm. */
@@ -22834,6 +22904,35 @@ var FaceFilterEnum = _enum([
22834
22904
  "identified",
22835
22905
  "all"
22836
22906
  ]);
22907
+ /**
22908
+ * What a `listRecentFaces` page is ORDERED BY.
22909
+ *
22910
+ * - `timestamp` — when the face was seen. The historical (and default) order.
22911
+ * - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
22912
+ * cosine of the face's SUGGESTED identity. This is the "review by certainty"
22913
+ * order: it puts the suggestions an operator can confirm with one tap at the
22914
+ * top, and it is the reason this enum exists — a client that ranked a capped
22915
+ * page client-side was ranking the newest N, never the most certain N.
22916
+ *
22917
+ * A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
22918
+ * auto-assigned face, or a face below the suggestion band) has no certainty to
22919
+ * compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
22920
+ * — flipping the direction reorders the rows that HAVE a certainty and never
22921
+ * floods the page with the ones that do not. `addon-post-analysis`'s
22922
+ * `store/face-sort.ts` is the single implementation, tiebreaks newest-first
22923
+ * then by faceId, and is what makes this a total order instead of the
22924
+ * backend's NULL-collation accident.
22925
+ */
22926
+ var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
22927
+ var FaceSortDirectionEnum = _enum(["asc", "desc"]);
22928
+ /** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
22929
+ * never leaves the server. */
22930
+ var FaceClusterSchema = object({
22931
+ faceIds: array(string()).readonly(),
22932
+ representativeFaceId: string(),
22933
+ size: number().int(),
22934
+ cohesion: number()
22935
+ });
22837
22936
  var MediaFileLiteSchema$1 = object({
22838
22937
  key: string(),
22839
22938
  kind: string(),
@@ -22880,24 +22979,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
22880
22979
  kind: "mutation",
22881
22980
  auth: "admin"
22882
22981
  }), method(object({
22883
- /** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
22982
+ /**
22983
+ * Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
22984
+ *
22985
+ * The legacy single-camera form, kept verbatim for every caller that
22986
+ * already sends it. A caller that wants a SET sends {@link deviceIds}
22987
+ * instead — never both: `deviceIds` is the authority whenever it is
22988
+ * present, and this field is then ignored rather than unioned, so
22989
+ * there is exactly one answer to "which cameras did I ask for".
22990
+ */
22884
22991
  deviceId: number().int().optional(),
22992
+ /**
22993
+ * Restrict to a SET of cameras — the review UI's camera filter, which
22994
+ * until now had to fetch the cluster-wide page and drop rows in the
22995
+ * client (so the `limit` it asked for was spent on cameras it was
22996
+ * about to discard).
22997
+ *
22998
+ * An **empty array reads NOTHING** — `[]` is an empty page, never
22999
+ * "every camera". A request for no devices is a request, not an
23000
+ * omission; same contract as `deviceManager.listFleet` and
23001
+ * `pipelineAnalytics.listRecentTracks`.
23002
+ *
23003
+ * Absent (`undefined`) is the omission, and keeps the cluster-wide view.
23004
+ */
23005
+ deviceIds: array(number().int()).optional(),
22885
23006
  limit: number().int().positive().optional(),
22886
23007
  filter: FaceFilterEnum.optional(),
22887
23008
  /**
22888
- * Inline the base64 crop on every row. Default `true` — the existing
22889
- * behaviour, kept so no caller breaks.
23009
+ * Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
23010
+ * Absent means no lower bound.
23011
+ */
23012
+ since: number().int().optional(),
23013
+ /**
23014
+ * Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
23015
+ * Absent means no upper bound.
23016
+ */
23017
+ until: number().int().optional(),
23018
+ /**
23019
+ * Order the page by time or by suggestion certainty. Default
23020
+ * `'timestamp'` — the historical order, unchanged for every caller
23021
+ * that does not ask.
22890
23022
  *
22891
- * Set `false` once the caller renders {@link FaceInfo.cropUrl}: that
22892
- * drops ~2.87 MiB per 500-row page to a few KiB of metadata and lets
22893
- * the browser cache the images.
23023
+ * See {@link FaceSortFieldEnum} for what a row with no suggestion
23024
+ * does under `'suggestionConfidence'`.
22894
23025
  *
22895
- * **This is an INPUT field, so it does not reach the addon until the
22896
- * next train.** The hub router validates cap inputs against its own
22897
- * compiled Zod, which strips a key it does not know verified today
22898
- * on the OUTPUT side, where an additive field DOES arrive immediately
22899
- * (`Track.hasFace`). Until the train ships, sending `false` is
22900
- * harmless and simply keeps the crops inline.
23026
+ * Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
23027
+ * index and stops reading as soon as `limit` rows have PASSED the
23028
+ * filter. `'suggestionConfidence'` cannot stop earlythe most
23029
+ * certain row may be the oldest so it walks the window. Narrow it
23030
+ * with {@link since} / {@link until}.
23031
+ */
23032
+ sortBy: FaceSortFieldEnum.optional(),
23033
+ /** Sort direction for {@link sortBy}. Default `'desc'`. */
23034
+ sortDirection: FaceSortDirectionEnum.optional(),
23035
+ /**
23036
+ * Inline the base64 crop on every row.
23037
+ *
23038
+ * Default `false` since the 2026-08-25 inversion — see
23039
+ * `include-crops-default.ts`, which is the ONE place that resolves
23040
+ * this for every gallery, and which records why the inline shape had
23041
+ * to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
23042
+ * The doc here used to still say `true`; it was wrong, and a leftover
23043
+ * that describes the old design reads as permission to rely on it.
23044
+ *
23045
+ * Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
23046
+ * which the browser fetches off the `event-media` plane in parallel,
23047
+ * cached and ETagged.
22901
23048
  */
22902
23049
  includeCrops: boolean().optional()
22903
23050
  }).optional(), array(FaceInfoSchema).readonly()), method(object({
@@ -22933,13 +23080,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
22933
23080
  }), method(object({
22934
23081
  threshold: number().min(0).max(1).optional(),
22935
23082
  minClusterSize: number().int().min(2).optional(),
22936
- limit: number().int().positive().optional()
22937
- }).optional(), array(object({
22938
- faceIds: array(string()).readonly(),
22939
- representativeFaceId: string(),
22940
- size: number().int(),
22941
- cohesion: number()
22942
- })).readonly());
23083
+ /**
23084
+ * Cap on the number of CLUSTERS returned. Renamed from `limit`,
23085
+ * which read as though it bounded the work — it never did.
23086
+ *
23087
+ * Wins over {@link limit} when both are sent.
23088
+ */
23089
+ maxClusters: number().int().positive().optional(),
23090
+ /**
23091
+ * @deprecated Ambiguous name for {@link maxClusters} — it cuts the
23092
+ * RESULT, not the scan. Kept so existing callers keep working; send
23093
+ * `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
23094
+ */
23095
+ limit: number().int().positive().optional(),
23096
+ /**
23097
+ * Cap on the number of unassigned faces READ AND CLUSTERED — the
23098
+ * POOL, not the result.
23099
+ *
23100
+ * This is the knob {@link maxClusters} was mistaken for. Clustering
23101
+ * used to read every unassigned face on the hub no matter what the
23102
+ * caller asked for, because the only bound cut the finished clusters
23103
+ * afterwards; a UI showing a window of 100 paid for a scan of the
23104
+ * whole corpus, on an addon whose disk is under contention.
23105
+ *
23106
+ * The pool is the NEWEST matching faces first — the same order the
23107
+ * gallery shows — so a bound here shortens the horizon, it does not
23108
+ * sample it randomly.
23109
+ *
23110
+ * Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
23111
+ * so the live corpus — 372 face rows — is unaffected while the
23112
+ * unbounded scan can never come back as the table grows.
23113
+ */
23114
+ maxFacesScanned: number().int().positive().optional()
23115
+ }).optional(), array(FaceClusterSchema).readonly());
22943
23116
  /**
22944
23117
  * Fan-control cap. Models HA `fan.*` entity-specific surfaces:
22945
23118
  * speed percentage, preset modes, ceiling-fan direction, and
@@ -26662,6 +26835,211 @@ var SetSiteLocationInputSchema = object({
26662
26835
  latitude: number().min(-90).max(90),
26663
26836
  longitude: number().min(-180).max(180)
26664
26837
  }).nullable();
26838
+ /**
26839
+ * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
26840
+ * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
26841
+ * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
26842
+ * already prints - never a token, never an `Authorization` header.
26843
+ */
26844
+ var RequestCensusGroupSchema = object({
26845
+ procedure: string(),
26846
+ userAgent: string(),
26847
+ ip: string(),
26848
+ principal: string(),
26849
+ calls: number(),
26850
+ perMin: number()
26851
+ });
26852
+ /**
26853
+ * A procedure's TOTAL over the window, across every caller.
26854
+ *
26855
+ * This block, not the group list, is what answers "did these calls arrive over
26856
+ * HTTP at all". A total far BELOW what a store-side census counted over the
26857
+ * same window excludes the HTTP plane, which is a result, not a failure.
26858
+ */
26859
+ var RequestCensusProcedureSchema = object({
26860
+ procedure: string(),
26861
+ calls: number(),
26862
+ perMin: number()
26863
+ });
26864
+ /**
26865
+ * The census as an operator sees it.
26866
+ *
26867
+ * `persisted` is the honest answer to "will this survive the restart I am
26868
+ * about to do": the arm deadline is written to `system-settings` so a window
26869
+ * armed now can measure the NEXT boot, and a write that failed must not look
26870
+ * like one that succeeded.
26871
+ */
26872
+ var RequestCensusStatusSchema = object({
26873
+ armed: boolean(),
26874
+ /** How long the current - or just-closed - window collected, in ms. */
26875
+ elapsedMs: number(),
26876
+ /** The window actually armed, after the server clamped the request. */
26877
+ windowMs: number(),
26878
+ /** Epoch ms the window closes at. 0 when disarmed. */
26879
+ armedUntilMs: number(),
26880
+ httpRequests: number(),
26881
+ batchedRequests: number(),
26882
+ /**
26883
+ * Procedure invocations. Higher than `httpRequests` whenever tRPC batching
26884
+ * is in play (`?batch=1` carries several procedures in one request); this is
26885
+ * the number comparable with a store-side call count.
26886
+ */
26887
+ procedureCalls: number(),
26888
+ /**
26889
+ * tRPC WebSocket connections opened during the window. NOT calls - the WS
26890
+ * transport resolves one context per connection - but the number that says
26891
+ * whether a plane this census cannot see was busy while HTTP was quiet.
26892
+ */
26893
+ wsConnections: number(),
26894
+ distinctGroups: number(),
26895
+ /** Calls counted in the totals whose group attribution was shed at the
26896
+ * cardinality bound. */
26897
+ unattributedCalls: number(),
26898
+ procedures: array(RequestCensusProcedureSchema).readonly(),
26899
+ groups: array(RequestCensusGroupSchema).readonly()
26900
+ }).extend({ persisted: boolean() });
26901
+ /** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
26902
+ var LogLevelSchema$1 = _enum([
26903
+ "debug",
26904
+ "info",
26905
+ "warn",
26906
+ "error"
26907
+ ]);
26908
+ /**
26909
+ * The diagnostics that can be ARMED for a window. Exactly one today.
26910
+ *
26911
+ * A diagnostic is anything whose cost is only worth paying while a question is
26912
+ * open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
26913
+ */
26914
+ var DiagnosticIdSchema = _enum(["request-census"]);
26915
+ /**
26916
+ * The layers of the level hierarchy, general → specific. The most specific
26917
+ * layer that carries an explicit value wins.
26918
+ *
26919
+ * `component` is DECLARED and not yet resolvable: the per-component channels
26920
+ * are a later slice of the same plan, and a `levelSource` enum that has to
26921
+ * grow later would force every consumer of this document to change with it.
26922
+ * Nothing returns `component` today.
26923
+ */
26924
+ var LoggingScopeKindSchema = _enum([
26925
+ "cluster",
26926
+ "node",
26927
+ "component"
26928
+ ]);
26929
+ /** Where an effective level came from. `default` = nothing is set anywhere. */
26930
+ var LoggingLevelSourceSchema = _enum([
26931
+ "default",
26932
+ "cluster",
26933
+ "node",
26934
+ "component"
26935
+ ]);
26936
+ /**
26937
+ * One layer of the hierarchy as it actually STANDS.
26938
+ *
26939
+ * `level: null` is the whole reason this array is returned: it is the
26940
+ * difference between "this node is at `info` because I decided it" and
26941
+ * "...because it inherits". An operator who clears an override believing they
26942
+ * are clearing an inherited value has been handed the same defect as the two
26943
+ * contradicting knobs this document exists to remove, moved one floor up.
26944
+ */
26945
+ var LoggingLevelLayerSchema = object({
26946
+ scope: LoggingScopeKindSchema,
26947
+ /** The node this layer speaks for; `null` on the cluster layer. */
26948
+ nodeId: string().nullable(),
26949
+ /** Explicitly set here, or `null` when this layer inherits. */
26950
+ level: LogLevelSchema$1.nullable()
26951
+ });
26952
+ /** What a line is judged against, and WHICH layer decided it. */
26953
+ var LoggingEffectiveSchema = object({
26954
+ level: LogLevelSchema$1,
26955
+ levelSource: LoggingLevelSourceSchema
26956
+ });
26957
+ /** Every layer, general → specific. Never collapsed into the effective value. */
26958
+ var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
26959
+ /**
26960
+ * An armed diagnostic, with its DEADLINE.
26961
+ *
26962
+ * The shape of ADR-0244: what is stored is a deadline and never a flag, so a
26963
+ * diagnostic somebody forgot expires by itself, and a boot-window measurement
26964
+ * survives the restart it exists to measure. `remainingMs` is 0 whenever
26965
+ * `armed` is false — a window is never reported as slightly expired.
26966
+ */
26967
+ var DiagnosticWindowSchema = object({
26968
+ id: DiagnosticIdSchema,
26969
+ armed: boolean(),
26970
+ /** Epoch ms the window closes at. 0 when disarmed. */
26971
+ armedUntilMs: number(),
26972
+ /** Ms left before it expires on its own. 0 when disarmed. */
26973
+ remainingMs: number(),
26974
+ /** Whether the stored deadline is the one the live diagnostic is running —
26975
+ * i.e. whether this window would survive a restart. */
26976
+ persisted: boolean()
26977
+ });
26978
+ /**
26979
+ * `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
26980
+ * server — there is no maximum here on purpose: a bound repeated in a schema
26981
+ * is a second knob that disagrees with the first the day one of them moves.
26982
+ */
26983
+ var DiagnosticWindowPatchSchema = object({
26984
+ id: DiagnosticIdSchema,
26985
+ armMs: number().int().min(0),
26986
+ /** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
26987
+ reportEveryMs: number().int().positive().optional()
26988
+ });
26989
+ /**
26990
+ * A PATCH, and patches MERGE.
26991
+ *
26992
+ * A field absent from the patch is left exactly as it was — arming a
26993
+ * diagnostic never resets a level, and setting a level never disarms a window.
26994
+ * The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
26995
+ * `setAll` already merges, and rebuilding the object is how an absent field
26996
+ * turns into an erased one.
26997
+ */
26998
+ var LoggingSettingsPatchSchema = object({
26999
+ /**
27000
+ * Absent leaves the level untouched. `null` CLEARS the explicit value at the
27001
+ * addressed scope so it inherits again. A value sets it.
27002
+ */
27003
+ level: LogLevelSchema$1.nullable().optional(),
27004
+ /**
27005
+ * Only the diagnostics NAMED here change. An armed window that is not listed
27006
+ * keeps running — a patch is never a full replacement.
27007
+ */
27008
+ diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
27009
+ });
27010
+ /**
27011
+ * Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
27012
+ *
27013
+ * Deliberately NOT called `nodeId`: that key is reserved on every cap method
27014
+ * input — the generated router strips it and uses it to resolve the PROVIDER
27015
+ * on that node (`resolveProvider(cap, nodeId, …)`). A document about
27016
+ * `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
27017
+ * by an agent that holds no cluster document at all. The hub is the single
27018
+ * authority over the whole hierarchy and answers for every layer, so the
27019
+ * layer selector needs a name the transport does not already own.
27020
+ */
27021
+ var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
27022
+ var SetLoggingSettingsInputSchema = object({
27023
+ scopeNodeId: string().optional(),
27024
+ patch: LoggingSettingsPatchSchema
27025
+ });
27026
+ /**
27027
+ * The whole document, as read and as returned after every write.
27028
+ *
27029
+ * `persisted: false` means the settings store could not be read or written.
27030
+ * The in-memory mirror still governs behaviour and is unchanged by the
27031
+ * failure — a read that fails neither switches a level nor disarms a window
27032
+ * (D49) — but the operator is told that what they are looking at would not
27033
+ * survive a restart.
27034
+ */
27035
+ var LoggingSettingsStateSchema = object({
27036
+ /** The layer this document was read at. `null` = the cluster layer. */
27037
+ scopeNodeId: string().nullable(),
27038
+ effective: LoggingEffectiveSchema,
27039
+ explicit: LoggingExplicitSchema,
27040
+ activeWindows: array(DiagnosticWindowSchema).readonly(),
27041
+ persisted: boolean()
27042
+ });
26665
27043
  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(), {
26666
27044
  kind: "mutation",
26667
27045
  auth: "admin"
@@ -26674,6 +27052,9 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
26674
27052
  }), method(_void(), SiteLocationStatusSchema, {
26675
27053
  kind: "mutation",
26676
27054
  auth: "admin"
27055
+ }), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
27056
+ kind: "mutation",
27057
+ auth: "admin"
26677
27058
  });
26678
27059
  object({
26679
27060
  /** True when the device's tamper switch / case-open contact is
@@ -32505,6 +32886,18 @@ Object.freeze({
32505
32886
  addonId: null,
32506
32887
  access: "create"
32507
32888
  },
32889
+ "system.getLoggingSettings": {
32890
+ capName: "system",
32891
+ capScope: "system",
32892
+ addonId: null,
32893
+ access: "view"
32894
+ },
32895
+ "system.getRequestCensus": {
32896
+ capName: "system",
32897
+ capScope: "system",
32898
+ addonId: null,
32899
+ access: "view"
32900
+ },
32508
32901
  "system.getRetentionConfig": {
32509
32902
  capName: "system",
32510
32903
  capScope: "system",
@@ -32535,6 +32928,12 @@ Object.freeze({
32535
32928
  addonId: null,
32536
32929
  access: "view"
32537
32930
  },
32931
+ "system.setLoggingSettings": {
32932
+ capName: "system",
32933
+ capScope: "system",
32934
+ addonId: null,
32935
+ access: "create"
32936
+ },
32538
32937
  "system.setRetentionConfig": {
32539
32938
  capName: "system",
32540
32939
  capScope: "system",
@@ -33690,6 +34089,10 @@ Object.freeze({
33690
34089
  name: "deviceId",
33691
34090
  form: "single",
33692
34091
  optional: true
34092
+ }, {
34093
+ name: "deviceIds",
34094
+ form: "array",
34095
+ optional: true
33693
34096
  }],
33694
34097
  "fanControl.setDirection": [{
33695
34098
  name: "deviceId",
@@ -35300,7 +35703,38 @@ object({
35300
35703
  * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
35301
35704
  * reproduce that.
35302
35705
  */
35303
- tileBudgetMb: number().int().min(0).max(1024)
35706
+ tileBudgetMb: number().int().min(0).max(1024),
35707
+ /**
35708
+ * RAM ceiling per decode worker, in MB, for the SCENE TILES — one
35709
+ * JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
35710
+ * subject tiles, on frames that detected something.
35711
+ *
35712
+ * It exists because a subject tile cannot answer a FULL-FRAME request:
35713
+ * containment is strict by design, so the native `keyFrame`, the detail
35714
+ * plane's `frameJpeg` rung and the display-crop fallback had no rung at all
35715
+ * below the hold. Measured on the live cluster: 23.3% of key-frame captures
35716
+ * missed, 95.7% of them with `worker-lease-gone` — the raster released one
35717
+ * frame-time after delivery, with the request only p50 367 ms behind it.
35718
+ *
35719
+ * Sizing, and why this is a budget and not a duration: a scene tile is
35720
+ * ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
35721
+ * ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
35722
+ * camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
35723
+ * frames, i.e. the store's 30 s TTL binds at the steady state and the budget
35724
+ * binds only through a detection burst, where it still covers well past the
35725
+ * measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
35726
+ * would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
35727
+ * whole shape exists to avoid.
35728
+ *
35729
+ * A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
35730
+ * subject tile, so one shared budget would let a busy camera's key frames
35731
+ * evict the face/plate tiles the recognisers depend on. Two budgets make that
35732
+ * impossible rather than unlikely. `0` DISABLES scene tiles and restores the
35733
+ * pre-existing behaviour, where a late full-frame request had nothing but the
35734
+ * ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
35735
+ * nothing.
35736
+ */
35737
+ sceneBudgetMb: number().int().min(0).max(1024)
35304
35738
  });
35305
35739
  /**
35306
35740
  * The values in force when the operator has set nothing.
@@ -35316,12 +35750,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
35316
35750
  budgetMb: 1024,
35317
35751
  activityMs: 15e3,
35318
35752
  tileBudgetMb: 64,
35753
+ sceneBudgetMb: 48,
35319
35754
  admission: "inferred"
35320
35755
  };
35321
35756
  DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
35322
35757
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
35323
35758
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
35324
35759
  DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
35760
+ DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
35325
35761
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
35326
35762
  var MB = 1024 * 1024;
35327
35763
  1024 * MB, 3072 * MB;