@camstack/addon-osd-manager 0.1.24 → 0.1.25

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-DGKPpkat.mjs → MotionZonesSettings-DGzuM4Vl.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-B-xe1lPU.mjs → PrivacyMaskSettings-CQaB7b2N.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-0NvQ7u8p.mjs → SceneMonitorEditor-Bg7JG--H.mjs} +3 -3
  4. package/dist/_stub.js +2358 -2358
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-BzlpFss2.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-DxHl-19u.mjs} +4 -4
  6. package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-B-12WGia.mjs +26 -0
  7. package/dist/{hostInit-B8Ruwadu.mjs → hostInit-0Chwaz22.mjs} +3 -3
  8. package/dist/index.js +524 -59
  9. package/dist/index.mjs +524 -59
  10. package/dist/{player-overlays-DJoIfr1y.mjs → player-overlays-CRBryJon.mjs} +1 -1
  11. package/dist/remoteEntry.js +1 -1
  12. package/dist/{responsive-C9bIj-Co.mjs → responsive-D6d5-RK_.mjs} +1 -1
  13. package/dist/{square-DN891EHD.mjs → square-DnuLIdPc.mjs} +1 -1
  14. package/dist/{trash-2-CVuZp_eM.mjs → trash-2-BFV0PX5_.mjs} +1 -1
  15. package/dist/{use-device-snapshot-BOoUcvYJ.mjs → use-device-snapshot-DKPoplKG.mjs} +1 -1
  16. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-u47fvw-t.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-dxCYIXHg.mjs} +1 -1
  17. package/package.json +1 -1
  18. package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BsLq9Hga.mjs +0 -26
package/dist/index.js CHANGED
@@ -7625,6 +7625,66 @@ var OpsLogQueryInputSchema = object({
7625
7625
  /** Max rows returned, newest-first. */
7626
7626
  limit: number().int().min(1).max(1e3).optional()
7627
7627
  });
7628
+ var LabelDefinitionSchema = object({
7629
+ id: string(),
7630
+ name: string(),
7631
+ category: string().optional(),
7632
+ description: string().optional(),
7633
+ icon: string().optional()
7634
+ });
7635
+ /** Detection-macro targets a catalog `classMap` may resolve to. */
7636
+ var CLASS_MAP_MACRO_TARGETS = [
7637
+ "person",
7638
+ "vehicle",
7639
+ "animal",
7640
+ "package"
7641
+ ];
7642
+ /**
7643
+ * Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
7644
+ * un operatore può selezionare.
7645
+ *
7646
+ * Sono le tre offerte dallo step `object-detection`
7647
+ * (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
7648
+ * `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
7649
+ * `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
7650
+ * `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
7651
+ * stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
7652
+ * (suitcase/backpack/handbag) lasciando spento il detector dedicato.
7653
+ *
7654
+ * UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
7655
+ * dello step e una seconda volta come union `FirstLevelMacro`
7656
+ * (`types/detection.ts`); una terza copia per il trigger di registrazione
7657
+ * (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
7658
+ * successiva.
7659
+ */
7660
+ var FIRST_LEVEL_MACRO_CLASSES = [
7661
+ "person",
7662
+ "vehicle",
7663
+ "animal"
7664
+ ];
7665
+ /**
7666
+ * Wire schema for a per-model CATALOG classMap override
7667
+ * (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
7668
+ * restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
7669
+ * detection pipeline executor actually routes.
7670
+ *
7671
+ * This is deliberately a DIFFERENT, narrower shape than the general-purpose
7672
+ * `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
7673
+ * and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
7674
+ * enum) — the two used to share the name `ClassMapDefinition`/
7675
+ * `ClassMapDefinitionSchema`, which made the schema-type-twin guard
7676
+ * (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
7677
+ * are not: it is two different concepts colliding on a name. Keep this type
7678
+ * under its own name rather than reusing `ClassMapDefinition` — reusing it
7679
+ * would either narrow every `ClassMapDefinition` consumer to the four
7680
+ * detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
7681
+ * schema exists for (see the "rejects a classMap whose target is not a
7682
+ * detection macro" test in `model-catalog-schema.test.ts`).
7683
+ */
7684
+ var DetectionCatalogClassMapSchema = object({
7685
+ mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
7686
+ preserveOriginal: boolean()
7687
+ });
7628
7688
  /**
7629
7689
  * Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
7630
7690
  * Named `RecordingWeekday` to avoid collision with the string-union
@@ -7647,10 +7707,55 @@ var RecordingStorageModeSchema = _enum([
7647
7707
  "events",
7648
7708
  "continuous"
7649
7709
  ]);
7710
+ /**
7711
+ * Le macro classi che possono aprire una finestra di registrazione — le stesse
7712
+ * tre offerte dallo step `object-detection`, da UNA lista
7713
+ * ({@link FIRST_LEVEL_MACRO_CLASSES}).
7714
+ */
7715
+ var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
7716
+ /**
7717
+ * True quando `values` non ripete un elemento.
7718
+ *
7719
+ * Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
7720
+ * diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
7721
+ * conterebbe due volte le sue finestre in `segmentMissedByMs`.
7722
+ */
7723
+ var noDuplicates = (values) => new Set(values).size === values.length;
7650
7724
  /** Which detectors trigger an `events`-mode band. */
7651
7725
  var RecordingTriggersSchema = object({
7652
7726
  motion: boolean().optional(),
7653
- audioThresholdDbfs: number().optional()
7727
+ audioThresholdDbfs: number().optional(),
7728
+ /**
7729
+ * Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
7730
+ * non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
7731
+ * object acceso, nessuna classe" è la stessa forma "abilitata e non registra
7732
+ * nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
7733
+ *
7734
+ * Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
7735
+ * quelle che hanno attraversato `enabledMacroClasses`, i
7736
+ * `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
7737
+ * (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
7738
+ * finestre — vedi `recorder/object-trigger.ts`.
7739
+ */
7740
+ objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
7741
+ /**
7742
+ * I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
7743
+ * non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
7744
+ * `objectClasses`.
7745
+ *
7746
+ * Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
7747
+ * percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
7748
+ * non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
7749
+ * si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
7750
+ * device (D12) — mai un elenco globale di cap.
7751
+ *
7752
+ * Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
7753
+ * `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
7754
+ * la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
7755
+ * il livello: un contatto trovato già aperto al riavvio del runner non fa
7756
+ * registrare.
7757
+ */
7758
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7654
7759
  });
7655
7760
  /**
7656
7761
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -8102,41 +8207,6 @@ var DecoderSessionConfigSchema = object({
8102
8207
  */
8103
8208
  debug: boolean().optional()
8104
8209
  });
8105
- var LabelDefinitionSchema = object({
8106
- id: string(),
8107
- name: string(),
8108
- category: string().optional(),
8109
- description: string().optional(),
8110
- icon: string().optional()
8111
- });
8112
- /**
8113
- * Wire schema for a per-model CATALOG classMap override
8114
- * (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
8115
- * restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
8116
- * detection pipeline executor actually routes.
8117
- *
8118
- * This is deliberately a DIFFERENT, narrower shape than the general-purpose
8119
- * `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
8120
- * and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
8121
- * enum) — the two used to share the name `ClassMapDefinition`/
8122
- * `ClassMapDefinitionSchema`, which made the schema-type-twin guard
8123
- * (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
8124
- * are not: it is two different concepts colliding on a name. Keep this type
8125
- * under its own name rather than reusing `ClassMapDefinition` — reusing it
8126
- * would either narrow every `ClassMapDefinition` consumer to the four
8127
- * detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
8128
- * schema exists for (see the "rejects a classMap whose target is not a
8129
- * detection macro" test in `model-catalog-schema.test.ts`).
8130
- */
8131
- var DetectionCatalogClassMapSchema = object({
8132
- mapping: record(string(), _enum([
8133
- "person",
8134
- "vehicle",
8135
- "animal",
8136
- "package"
8137
- ])),
8138
- preserveOriginal: boolean()
8139
- });
8140
8210
  var MODEL_FORMATS = [
8141
8211
  "onnx",
8142
8212
  "coreml",
@@ -25104,7 +25174,7 @@ var lifecycleJobSchema = object({
25104
25174
  * `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
25105
25175
  * as every other cap.
25106
25176
  */
25107
- var LogLevelSchema$1 = _enum([
25177
+ var LogLevelSchema$2 = _enum([
25108
25178
  "debug",
25109
25179
  "info",
25110
25180
  "warn",
@@ -25331,7 +25401,7 @@ var addonsCapability = {
25331
25401
  getLogs: method(object({
25332
25402
  addonId: string(),
25333
25403
  limit: number().min(1).max(500).default(100),
25334
- level: LogLevelSchema$1.optional()
25404
+ level: LogLevelSchema$2.optional()
25335
25405
  }), array(LogQueryEntrySchema)),
25336
25406
  listPackages: method(_void(), array(InstalledPackageSchema).readonly()),
25337
25407
  installPackage: method(object({
@@ -25569,7 +25639,7 @@ var addonsCapability = {
25569
25639
  }),
25570
25640
  onAddonLogs: method(object({
25571
25641
  addonId: string(),
25572
- level: LogLevelSchema$1.optional()
25642
+ level: LogLevelSchema$2.optional()
25573
25643
  }), LogStreamEntrySchema, { kind: "subscription" })
25574
25644
  },
25575
25645
  /** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
@@ -27356,6 +27426,35 @@ var FaceFilterEnum = _enum([
27356
27426
  "identified",
27357
27427
  "all"
27358
27428
  ]);
27429
+ /**
27430
+ * What a `listRecentFaces` page is ORDERED BY.
27431
+ *
27432
+ * - `timestamp` — when the face was seen. The historical (and default) order.
27433
+ * - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
27434
+ * cosine of the face's SUGGESTED identity. This is the "review by certainty"
27435
+ * order: it puts the suggestions an operator can confirm with one tap at the
27436
+ * top, and it is the reason this enum exists — a client that ranked a capped
27437
+ * page client-side was ranking the newest N, never the most certain N.
27438
+ *
27439
+ * A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
27440
+ * auto-assigned face, or a face below the suggestion band) has no certainty to
27441
+ * compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
27442
+ * — flipping the direction reorders the rows that HAVE a certainty and never
27443
+ * floods the page with the ones that do not. `addon-post-analysis`'s
27444
+ * `store/face-sort.ts` is the single implementation, tiebreaks newest-first
27445
+ * then by faceId, and is what makes this a total order instead of the
27446
+ * backend's NULL-collation accident.
27447
+ */
27448
+ var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
27449
+ var FaceSortDirectionEnum = _enum(["asc", "desc"]);
27450
+ /** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
27451
+ * never leaves the server. */
27452
+ var FaceClusterSchema = object({
27453
+ faceIds: array(string()).readonly(),
27454
+ representativeFaceId: string(),
27455
+ size: number().int(),
27456
+ cohesion: number()
27457
+ });
27359
27458
  var MediaFileLiteSchema$1 = object({
27360
27459
  key: string(),
27361
27460
  kind: string(),
@@ -27413,24 +27512,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
27413
27512
  auth: "admin"
27414
27513
  }),
27415
27514
  listRecentFaces: method(object({
27416
- /** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
27515
+ /**
27516
+ * Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
27517
+ *
27518
+ * The legacy single-camera form, kept verbatim for every caller that
27519
+ * already sends it. A caller that wants a SET sends {@link deviceIds}
27520
+ * instead — never both: `deviceIds` is the authority whenever it is
27521
+ * present, and this field is then ignored rather than unioned, so
27522
+ * there is exactly one answer to "which cameras did I ask for".
27523
+ */
27417
27524
  deviceId: number().int().optional(),
27525
+ /**
27526
+ * Restrict to a SET of cameras — the review UI's camera filter, which
27527
+ * until now had to fetch the cluster-wide page and drop rows in the
27528
+ * client (so the `limit` it asked for was spent on cameras it was
27529
+ * about to discard).
27530
+ *
27531
+ * An **empty array reads NOTHING** — `[]` is an empty page, never
27532
+ * "every camera". A request for no devices is a request, not an
27533
+ * omission; same contract as `deviceManager.listFleet` and
27534
+ * `pipelineAnalytics.listRecentTracks`.
27535
+ *
27536
+ * Absent (`undefined`) is the omission, and keeps the cluster-wide view.
27537
+ */
27538
+ deviceIds: array(number().int()).optional(),
27418
27539
  limit: number().int().positive().optional(),
27419
27540
  filter: FaceFilterEnum.optional(),
27420
27541
  /**
27421
- * Inline the base64 crop on every row. Default `true` — the existing
27422
- * behaviour, kept so no caller breaks.
27542
+ * Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
27543
+ * Absent means no lower bound.
27544
+ */
27545
+ since: number().int().optional(),
27546
+ /**
27547
+ * Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
27548
+ * Absent means no upper bound.
27549
+ */
27550
+ until: number().int().optional(),
27551
+ /**
27552
+ * Order the page by time or by suggestion certainty. Default
27553
+ * `'timestamp'` — the historical order, unchanged for every caller
27554
+ * that does not ask.
27423
27555
  *
27424
- * Set `false` once the caller renders {@link FaceInfo.cropUrl}: that
27425
- * drops ~2.87 MiB per 500-row page to a few KiB of metadata and lets
27426
- * the browser cache the images.
27556
+ * See {@link FaceSortFieldEnum} for what a row with no suggestion
27557
+ * does under `'suggestionConfidence'`.
27427
27558
  *
27428
- * **This is an INPUT field, so it does not reach the addon until the
27429
- * next train.** The hub router validates cap inputs against its own
27430
- * compiled Zod, which strips a key it does not know verified today
27431
- * on the OUTPUT side, where an additive field DOES arrive immediately
27432
- * (`Track.hasFace`). Until the train ships, sending `false` is
27433
- * harmless and simply keeps the crops inline.
27559
+ * Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
27560
+ * index and stops reading as soon as `limit` rows have PASSED the
27561
+ * filter. `'suggestionConfidence'` cannot stop earlythe most
27562
+ * certain row may be the oldest so it walks the window. Narrow it
27563
+ * with {@link since} / {@link until}.
27564
+ */
27565
+ sortBy: FaceSortFieldEnum.optional(),
27566
+ /** Sort direction for {@link sortBy}. Default `'desc'`. */
27567
+ sortDirection: FaceSortDirectionEnum.optional(),
27568
+ /**
27569
+ * Inline the base64 crop on every row.
27570
+ *
27571
+ * Default `false` since the 2026-08-25 inversion — see
27572
+ * `include-crops-default.ts`, which is the ONE place that resolves
27573
+ * this for every gallery, and which records why the inline shape had
27574
+ * to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
27575
+ * The doc here used to still say `true`; it was wrong, and a leftover
27576
+ * that describes the old design reads as permission to rely on it.
27577
+ *
27578
+ * Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
27579
+ * which the browser fetches off the `event-media` plane in parallel,
27580
+ * cached and ETagged.
27434
27581
  */
27435
27582
  includeCrops: boolean().optional()
27436
27583
  }).optional(), array(FaceInfoSchema).readonly()),
@@ -27479,13 +27626,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
27479
27626
  suggestFaceClusters: method(object({
27480
27627
  threshold: number().min(0).max(1).optional(),
27481
27628
  minClusterSize: number().int().min(2).optional(),
27482
- limit: number().int().positive().optional()
27483
- }).optional(), array(object({
27484
- faceIds: array(string()).readonly(),
27485
- representativeFaceId: string(),
27486
- size: number().int(),
27487
- cohesion: number()
27488
- })).readonly())
27629
+ /**
27630
+ * Cap on the number of CLUSTERS returned. Renamed from `limit`,
27631
+ * which read as though it bounded the work — it never did.
27632
+ *
27633
+ * Wins over {@link limit} when both are sent.
27634
+ */
27635
+ maxClusters: number().int().positive().optional(),
27636
+ /**
27637
+ * @deprecated Ambiguous name for {@link maxClusters} — it cuts the
27638
+ * RESULT, not the scan. Kept so existing callers keep working; send
27639
+ * `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
27640
+ */
27641
+ limit: number().int().positive().optional(),
27642
+ /**
27643
+ * Cap on the number of unassigned faces READ AND CLUSTERED — the
27644
+ * POOL, not the result.
27645
+ *
27646
+ * This is the knob {@link maxClusters} was mistaken for. Clustering
27647
+ * used to read every unassigned face on the hub no matter what the
27648
+ * caller asked for, because the only bound cut the finished clusters
27649
+ * afterwards; a UI showing a window of 100 paid for a scan of the
27650
+ * whole corpus, on an addon whose disk is under contention.
27651
+ *
27652
+ * The pool is the NEWEST matching faces first — the same order the
27653
+ * gallery shows — so a bound here shortens the horizon, it does not
27654
+ * sample it randomly.
27655
+ *
27656
+ * Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
27657
+ * so the live corpus — 372 face rows — is unaffected while the
27658
+ * unbounded scan can never come back as the table grows.
27659
+ */
27660
+ maxFacesScanned: number().int().positive().optional()
27661
+ }).optional(), array(FaceClusterSchema).readonly())
27489
27662
  }
27490
27663
  };
27491
27664
  /**
@@ -33022,6 +33195,211 @@ var SetSiteLocationInputSchema = object({
33022
33195
  latitude: number().min(-90).max(90),
33023
33196
  longitude: number().min(-180).max(180)
33024
33197
  }).nullable();
33198
+ /**
33199
+ * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
33200
+ * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
33201
+ * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
33202
+ * already prints - never a token, never an `Authorization` header.
33203
+ */
33204
+ var RequestCensusGroupSchema = object({
33205
+ procedure: string(),
33206
+ userAgent: string(),
33207
+ ip: string(),
33208
+ principal: string(),
33209
+ calls: number(),
33210
+ perMin: number()
33211
+ });
33212
+ /**
33213
+ * A procedure's TOTAL over the window, across every caller.
33214
+ *
33215
+ * This block, not the group list, is what answers "did these calls arrive over
33216
+ * HTTP at all". A total far BELOW what a store-side census counted over the
33217
+ * same window excludes the HTTP plane, which is a result, not a failure.
33218
+ */
33219
+ var RequestCensusProcedureSchema = object({
33220
+ procedure: string(),
33221
+ calls: number(),
33222
+ perMin: number()
33223
+ });
33224
+ /**
33225
+ * The census as an operator sees it.
33226
+ *
33227
+ * `persisted` is the honest answer to "will this survive the restart I am
33228
+ * about to do": the arm deadline is written to `system-settings` so a window
33229
+ * armed now can measure the NEXT boot, and a write that failed must not look
33230
+ * like one that succeeded.
33231
+ */
33232
+ var RequestCensusStatusSchema = object({
33233
+ armed: boolean(),
33234
+ /** How long the current - or just-closed - window collected, in ms. */
33235
+ elapsedMs: number(),
33236
+ /** The window actually armed, after the server clamped the request. */
33237
+ windowMs: number(),
33238
+ /** Epoch ms the window closes at. 0 when disarmed. */
33239
+ armedUntilMs: number(),
33240
+ httpRequests: number(),
33241
+ batchedRequests: number(),
33242
+ /**
33243
+ * Procedure invocations. Higher than `httpRequests` whenever tRPC batching
33244
+ * is in play (`?batch=1` carries several procedures in one request); this is
33245
+ * the number comparable with a store-side call count.
33246
+ */
33247
+ procedureCalls: number(),
33248
+ /**
33249
+ * tRPC WebSocket connections opened during the window. NOT calls - the WS
33250
+ * transport resolves one context per connection - but the number that says
33251
+ * whether a plane this census cannot see was busy while HTTP was quiet.
33252
+ */
33253
+ wsConnections: number(),
33254
+ distinctGroups: number(),
33255
+ /** Calls counted in the totals whose group attribution was shed at the
33256
+ * cardinality bound. */
33257
+ unattributedCalls: number(),
33258
+ procedures: array(RequestCensusProcedureSchema).readonly(),
33259
+ groups: array(RequestCensusGroupSchema).readonly()
33260
+ }).extend({ persisted: boolean() });
33261
+ /** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
33262
+ var LogLevelSchema$1 = _enum([
33263
+ "debug",
33264
+ "info",
33265
+ "warn",
33266
+ "error"
33267
+ ]);
33268
+ /**
33269
+ * The diagnostics that can be ARMED for a window. Exactly one today.
33270
+ *
33271
+ * A diagnostic is anything whose cost is only worth paying while a question is
33272
+ * open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
33273
+ */
33274
+ var DiagnosticIdSchema = _enum(["request-census"]);
33275
+ /**
33276
+ * The layers of the level hierarchy, general → specific. The most specific
33277
+ * layer that carries an explicit value wins.
33278
+ *
33279
+ * `component` is DECLARED and not yet resolvable: the per-component channels
33280
+ * are a later slice of the same plan, and a `levelSource` enum that has to
33281
+ * grow later would force every consumer of this document to change with it.
33282
+ * Nothing returns `component` today.
33283
+ */
33284
+ var LoggingScopeKindSchema = _enum([
33285
+ "cluster",
33286
+ "node",
33287
+ "component"
33288
+ ]);
33289
+ /** Where an effective level came from. `default` = nothing is set anywhere. */
33290
+ var LoggingLevelSourceSchema = _enum([
33291
+ "default",
33292
+ "cluster",
33293
+ "node",
33294
+ "component"
33295
+ ]);
33296
+ /**
33297
+ * One layer of the hierarchy as it actually STANDS.
33298
+ *
33299
+ * `level: null` is the whole reason this array is returned: it is the
33300
+ * difference between "this node is at `info` because I decided it" and
33301
+ * "...because it inherits". An operator who clears an override believing they
33302
+ * are clearing an inherited value has been handed the same defect as the two
33303
+ * contradicting knobs this document exists to remove, moved one floor up.
33304
+ */
33305
+ var LoggingLevelLayerSchema = object({
33306
+ scope: LoggingScopeKindSchema,
33307
+ /** The node this layer speaks for; `null` on the cluster layer. */
33308
+ nodeId: string().nullable(),
33309
+ /** Explicitly set here, or `null` when this layer inherits. */
33310
+ level: LogLevelSchema$1.nullable()
33311
+ });
33312
+ /** What a line is judged against, and WHICH layer decided it. */
33313
+ var LoggingEffectiveSchema = object({
33314
+ level: LogLevelSchema$1,
33315
+ levelSource: LoggingLevelSourceSchema
33316
+ });
33317
+ /** Every layer, general → specific. Never collapsed into the effective value. */
33318
+ var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
33319
+ /**
33320
+ * An armed diagnostic, with its DEADLINE.
33321
+ *
33322
+ * The shape of ADR-0244: what is stored is a deadline and never a flag, so a
33323
+ * diagnostic somebody forgot expires by itself, and a boot-window measurement
33324
+ * survives the restart it exists to measure. `remainingMs` is 0 whenever
33325
+ * `armed` is false — a window is never reported as slightly expired.
33326
+ */
33327
+ var DiagnosticWindowSchema = object({
33328
+ id: DiagnosticIdSchema,
33329
+ armed: boolean(),
33330
+ /** Epoch ms the window closes at. 0 when disarmed. */
33331
+ armedUntilMs: number(),
33332
+ /** Ms left before it expires on its own. 0 when disarmed. */
33333
+ remainingMs: number(),
33334
+ /** Whether the stored deadline is the one the live diagnostic is running —
33335
+ * i.e. whether this window would survive a restart. */
33336
+ persisted: boolean()
33337
+ });
33338
+ /**
33339
+ * `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
33340
+ * server — there is no maximum here on purpose: a bound repeated in a schema
33341
+ * is a second knob that disagrees with the first the day one of them moves.
33342
+ */
33343
+ var DiagnosticWindowPatchSchema = object({
33344
+ id: DiagnosticIdSchema,
33345
+ armMs: number().int().min(0),
33346
+ /** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
33347
+ reportEveryMs: number().int().positive().optional()
33348
+ });
33349
+ /**
33350
+ * A PATCH, and patches MERGE.
33351
+ *
33352
+ * A field absent from the patch is left exactly as it was — arming a
33353
+ * diagnostic never resets a level, and setting a level never disarms a window.
33354
+ * The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
33355
+ * `setAll` already merges, and rebuilding the object is how an absent field
33356
+ * turns into an erased one.
33357
+ */
33358
+ var LoggingSettingsPatchSchema = object({
33359
+ /**
33360
+ * Absent leaves the level untouched. `null` CLEARS the explicit value at the
33361
+ * addressed scope so it inherits again. A value sets it.
33362
+ */
33363
+ level: LogLevelSchema$1.nullable().optional(),
33364
+ /**
33365
+ * Only the diagnostics NAMED here change. An armed window that is not listed
33366
+ * keeps running — a patch is never a full replacement.
33367
+ */
33368
+ diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
33369
+ });
33370
+ /**
33371
+ * Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
33372
+ *
33373
+ * Deliberately NOT called `nodeId`: that key is reserved on every cap method
33374
+ * input — the generated router strips it and uses it to resolve the PROVIDER
33375
+ * on that node (`resolveProvider(cap, nodeId, …)`). A document about
33376
+ * `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
33377
+ * by an agent that holds no cluster document at all. The hub is the single
33378
+ * authority over the whole hierarchy and answers for every layer, so the
33379
+ * layer selector needs a name the transport does not already own.
33380
+ */
33381
+ var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
33382
+ var SetLoggingSettingsInputSchema = object({
33383
+ scopeNodeId: string().optional(),
33384
+ patch: LoggingSettingsPatchSchema
33385
+ });
33386
+ /**
33387
+ * The whole document, as read and as returned after every write.
33388
+ *
33389
+ * `persisted: false` means the settings store could not be read or written.
33390
+ * The in-memory mirror still governs behaviour and is unchanged by the
33391
+ * failure — a read that fails neither switches a level nor disarms a window
33392
+ * (D49) — but the operator is told that what they are looking at would not
33393
+ * survive a restart.
33394
+ */
33395
+ var LoggingSettingsStateSchema = object({
33396
+ /** The layer this document was read at. `null` = the cluster layer. */
33397
+ scopeNodeId: string().nullable(),
33398
+ effective: LoggingEffectiveSchema,
33399
+ explicit: LoggingExplicitSchema,
33400
+ activeWindows: array(DiagnosticWindowSchema).readonly(),
33401
+ persisted: boolean()
33402
+ });
33025
33403
  var systemCapability = {
33026
33404
  name: "system",
33027
33405
  scope: "system",
@@ -33065,6 +33443,38 @@ var systemCapability = {
33065
33443
  detectSiteLocation: method(_void(), SiteLocationStatusSchema, {
33066
33444
  kind: "mutation",
33067
33445
  auth: "admin"
33446
+ }),
33447
+ /**
33448
+ * Read the HTTP request census - which caller, from which address, with
33449
+ * which user-agent, invoked which tRPC procedure, and how often.
33450
+ *
33451
+ * Reading NEVER re-arms: re-arming clears the counts, which would throw
33452
+ * away exactly the numbers being asked for. A closed window may be read as
33453
+ * many times as the operator likes and always describes the same window.
33454
+ *
33455
+ * Admin-only: the rows carry source addresses and principal names.
33456
+ */
33457
+ getRequestCensus: method(_void(), RequestCensusStatusSchema, { auth: "admin" }),
33458
+ /**
33459
+ * The logging settings document — levels and armed diagnostics — resolved
33460
+ * for `nodeId`, or for the cluster when `nodeId` is absent.
33461
+ *
33462
+ * Returns BOTH `effective` and `explicit`. See
33463
+ * {@link LoggingLevelLayerSchema} for why collapsing them is the defect.
33464
+ */
33465
+ getLoggingSettings: method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }),
33466
+ /**
33467
+ * Write the logging settings document. The ONLY write authority over log
33468
+ * levels and diagnostic windows — arming the request census went through
33469
+ * `system.setRequestCensus` until 2026-08-27 and no longer does, because
33470
+ * two writes that disagree about the same window is exactly the defect
33471
+ * this document exists to remove (D245).
33472
+ *
33473
+ * The patch MERGES: see {@link LoggingSettingsPatchSchema}.
33474
+ */
33475
+ setLoggingSettings: method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
33476
+ kind: "mutation",
33477
+ auth: "admin"
33068
33478
  })
33069
33479
  },
33070
33480
  /** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
@@ -39534,6 +39944,18 @@ Object.freeze({
39534
39944
  addonId: null,
39535
39945
  access: "create"
39536
39946
  },
39947
+ "system.getLoggingSettings": {
39948
+ capName: "system",
39949
+ capScope: "system",
39950
+ addonId: null,
39951
+ access: "view"
39952
+ },
39953
+ "system.getRequestCensus": {
39954
+ capName: "system",
39955
+ capScope: "system",
39956
+ addonId: null,
39957
+ access: "view"
39958
+ },
39537
39959
  "system.getRetentionConfig": {
39538
39960
  capName: "system",
39539
39961
  capScope: "system",
@@ -39564,6 +39986,12 @@ Object.freeze({
39564
39986
  addonId: null,
39565
39987
  access: "view"
39566
39988
  },
39989
+ "system.setLoggingSettings": {
39990
+ capName: "system",
39991
+ capScope: "system",
39992
+ addonId: null,
39993
+ access: "create"
39994
+ },
39567
39995
  "system.setRetentionConfig": {
39568
39996
  capName: "system",
39569
39997
  capScope: "system",
@@ -40719,6 +41147,10 @@ Object.freeze({
40719
41147
  name: "deviceId",
40720
41148
  form: "single",
40721
41149
  optional: true
41150
+ }, {
41151
+ name: "deviceIds",
41152
+ form: "array",
41153
+ optional: true
40722
41154
  }],
40723
41155
  "fanControl.setDirection": [{
40724
41156
  name: "deviceId",
@@ -42389,7 +42821,38 @@ object({
42389
42821
  * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
42390
42822
  * reproduce that.
42391
42823
  */
42392
- tileBudgetMb: number().int().min(0).max(1024)
42824
+ tileBudgetMb: number().int().min(0).max(1024),
42825
+ /**
42826
+ * RAM ceiling per decode worker, in MB, for the SCENE TILES — one
42827
+ * JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
42828
+ * subject tiles, on frames that detected something.
42829
+ *
42830
+ * It exists because a subject tile cannot answer a FULL-FRAME request:
42831
+ * containment is strict by design, so the native `keyFrame`, the detail
42832
+ * plane's `frameJpeg` rung and the display-crop fallback had no rung at all
42833
+ * below the hold. Measured on the live cluster: 23.3% of key-frame captures
42834
+ * missed, 95.7% of them with `worker-lease-gone` — the raster released one
42835
+ * frame-time after delivery, with the request only p50 367 ms behind it.
42836
+ *
42837
+ * Sizing, and why this is a budget and not a duration: a scene tile is
42838
+ * ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
42839
+ * ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
42840
+ * camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
42841
+ * frames, i.e. the store's 30 s TTL binds at the steady state and the budget
42842
+ * binds only through a detection burst, where it still covers well past the
42843
+ * measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
42844
+ * would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
42845
+ * whole shape exists to avoid.
42846
+ *
42847
+ * A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
42848
+ * subject tile, so one shared budget would let a busy camera's key frames
42849
+ * evict the face/plate tiles the recognisers depend on. Two budgets make that
42850
+ * impossible rather than unlikely. `0` DISABLES scene tiles and restores the
42851
+ * pre-existing behaviour, where a late full-frame request had nothing but the
42852
+ * ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
42853
+ * nothing.
42854
+ */
42855
+ sceneBudgetMb: number().int().min(0).max(1024)
42393
42856
  });
42394
42857
  /**
42395
42858
  * The values in force when the operator has set nothing.
@@ -42405,12 +42868,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
42405
42868
  budgetMb: 1024,
42406
42869
  activityMs: 15e3,
42407
42870
  tileBudgetMb: 64,
42871
+ sceneBudgetMb: 48,
42408
42872
  admission: "inferred"
42409
42873
  };
42410
42874
  DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
42411
42875
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
42412
42876
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
42413
42877
  DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
42878
+ DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
42414
42879
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
42415
42880
  var MB = 1024 * 1024;
42416
42881
  1024 * MB, 3072 * MB;