@camstack/addon-osd-manager 0.1.24 → 0.1.26

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-Dy_h9EA1.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-B-xe1lPU.mjs → PrivacyMaskSettings-CaWxq05R.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-0NvQ7u8p.mjs → SceneMonitorEditor-8hN2YKuj.mjs} +3 -3
  4. package/dist/_stub.js +2359 -2358
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-BzlpFss2.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-kjdb00lx.mjs} +4 -4
  6. package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DwVNeYGJ.mjs +26 -0
  7. package/dist/{hostInit-B8Ruwadu.mjs → hostInit-BDUiCsCj.mjs} +3 -3
  8. package/dist/index.js +606 -59
  9. package/dist/index.mjs +606 -59
  10. package/dist/{player-overlays-DJoIfr1y.mjs → player-overlays-COKQa37c.mjs} +1 -1
  11. package/dist/remoteEntry.js +1 -1
  12. package/dist/{responsive-C9bIj-Co.mjs → responsive-BPlFvtSt.mjs} +1 -1
  13. package/dist/{square-DN891EHD.mjs → square-BhmFshyv.mjs} +1 -1
  14. package/dist/{trash-2-CVuZp_eM.mjs → trash-2-Bfyk6oRp.mjs} +1 -1
  15. package/dist/{use-device-snapshot-BOoUcvYJ.mjs → use-device-snapshot-CbUEtNq7.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-CKsyFdWi.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.mjs CHANGED
@@ -7621,6 +7621,66 @@ var OpsLogQueryInputSchema = object({
7621
7621
  /** Max rows returned, newest-first. */
7622
7622
  limit: number().int().min(1).max(1e3).optional()
7623
7623
  });
7624
+ var LabelDefinitionSchema = object({
7625
+ id: string(),
7626
+ name: string(),
7627
+ category: string().optional(),
7628
+ description: string().optional(),
7629
+ icon: string().optional()
7630
+ });
7631
+ /** Detection-macro targets a catalog `classMap` may resolve to. */
7632
+ var CLASS_MAP_MACRO_TARGETS = [
7633
+ "person",
7634
+ "vehicle",
7635
+ "animal",
7636
+ "package"
7637
+ ];
7638
+ /**
7639
+ * Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
7640
+ * un operatore può selezionare.
7641
+ *
7642
+ * Sono le tre offerte dallo step `object-detection`
7643
+ * (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
7644
+ * `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
7645
+ * `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
7646
+ * `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
7647
+ * stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
7648
+ * (suitcase/backpack/handbag) lasciando spento il detector dedicato.
7649
+ *
7650
+ * UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
7651
+ * dello step e una seconda volta come union `FirstLevelMacro`
7652
+ * (`types/detection.ts`); una terza copia per il trigger di registrazione
7653
+ * (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
7654
+ * successiva.
7655
+ */
7656
+ var FIRST_LEVEL_MACRO_CLASSES = [
7657
+ "person",
7658
+ "vehicle",
7659
+ "animal"
7660
+ ];
7661
+ /**
7662
+ * Wire schema for a per-model CATALOG classMap override
7663
+ * (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
7664
+ * restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
7665
+ * detection pipeline executor actually routes.
7666
+ *
7667
+ * This is deliberately a DIFFERENT, narrower shape than the general-purpose
7668
+ * `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
7669
+ * and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
7670
+ * enum) — the two used to share the name `ClassMapDefinition`/
7671
+ * `ClassMapDefinitionSchema`, which made the schema-type-twin guard
7672
+ * (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
7673
+ * are not: it is two different concepts colliding on a name. Keep this type
7674
+ * under its own name rather than reusing `ClassMapDefinition` — reusing it
7675
+ * would either narrow every `ClassMapDefinition` consumer to the four
7676
+ * detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
7677
+ * schema exists for (see the "rejects a classMap whose target is not a
7678
+ * detection macro" test in `model-catalog-schema.test.ts`).
7679
+ */
7680
+ var DetectionCatalogClassMapSchema = object({
7681
+ mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
7682
+ preserveOriginal: boolean()
7683
+ });
7624
7684
  /**
7625
7685
  * Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
7626
7686
  * Named `RecordingWeekday` to avoid collision with the string-union
@@ -7643,10 +7703,55 @@ var RecordingStorageModeSchema = _enum([
7643
7703
  "events",
7644
7704
  "continuous"
7645
7705
  ]);
7706
+ /**
7707
+ * Le macro classi che possono aprire una finestra di registrazione — le stesse
7708
+ * tre offerte dallo step `object-detection`, da UNA lista
7709
+ * ({@link FIRST_LEVEL_MACRO_CLASSES}).
7710
+ */
7711
+ var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
7712
+ /**
7713
+ * True quando `values` non ripete un elemento.
7714
+ *
7715
+ * Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
7716
+ * diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
7717
+ * conterebbe due volte le sue finestre in `segmentMissedByMs`.
7718
+ */
7719
+ var noDuplicates = (values) => new Set(values).size === values.length;
7646
7720
  /** Which detectors trigger an `events`-mode band. */
7647
7721
  var RecordingTriggersSchema = object({
7648
7722
  motion: boolean().optional(),
7649
- audioThresholdDbfs: number().optional()
7723
+ audioThresholdDbfs: number().optional(),
7724
+ /**
7725
+ * Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
7726
+ * non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
7727
+ * object acceso, nessuna classe" è la stessa forma "abilitata e non registra
7728
+ * nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
7729
+ *
7730
+ * Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
7731
+ * quelle che hanno attraversato `enabledMacroClasses`, i
7732
+ * `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
7733
+ * (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
7734
+ * finestre — vedi `recorder/object-trigger.ts`.
7735
+ */
7736
+ objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
7737
+ /**
7738
+ * I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
7739
+ * non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
7740
+ * `objectClasses`.
7741
+ *
7742
+ * Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
7743
+ * percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
7744
+ * non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
7745
+ * si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
7746
+ * device (D12) — mai un elenco globale di cap.
7747
+ *
7748
+ * Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
7749
+ * `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
7750
+ * la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
7751
+ * il livello: un contatto trovato già aperto al riavvio del runner non fa
7752
+ * registrare.
7753
+ */
7754
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7650
7755
  });
7651
7756
  /**
7652
7757
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -8098,41 +8203,6 @@ var DecoderSessionConfigSchema = object({
8098
8203
  */
8099
8204
  debug: boolean().optional()
8100
8205
  });
8101
- var LabelDefinitionSchema = object({
8102
- id: string(),
8103
- name: string(),
8104
- category: string().optional(),
8105
- description: string().optional(),
8106
- icon: string().optional()
8107
- });
8108
- /**
8109
- * Wire schema for a per-model CATALOG classMap override
8110
- * (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
8111
- * restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
8112
- * detection pipeline executor actually routes.
8113
- *
8114
- * This is deliberately a DIFFERENT, narrower shape than the general-purpose
8115
- * `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
8116
- * and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
8117
- * enum) — the two used to share the name `ClassMapDefinition`/
8118
- * `ClassMapDefinitionSchema`, which made the schema-type-twin guard
8119
- * (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
8120
- * are not: it is two different concepts colliding on a name. Keep this type
8121
- * under its own name rather than reusing `ClassMapDefinition` — reusing it
8122
- * would either narrow every `ClassMapDefinition` consumer to the four
8123
- * detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
8124
- * schema exists for (see the "rejects a classMap whose target is not a
8125
- * detection macro" test in `model-catalog-schema.test.ts`).
8126
- */
8127
- var DetectionCatalogClassMapSchema = object({
8128
- mapping: record(string(), _enum([
8129
- "person",
8130
- "vehicle",
8131
- "animal",
8132
- "package"
8133
- ])),
8134
- preserveOriginal: boolean()
8135
- });
8136
8206
  var MODEL_FORMATS = [
8137
8207
  "onnx",
8138
8208
  "coreml",
@@ -25100,7 +25170,7 @@ var lifecycleJobSchema = object({
25100
25170
  * `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
25101
25171
  * as every other cap.
25102
25172
  */
25103
- var LogLevelSchema$1 = _enum([
25173
+ var LogLevelSchema$2 = _enum([
25104
25174
  "debug",
25105
25175
  "info",
25106
25176
  "warn",
@@ -25327,7 +25397,7 @@ var addonsCapability = {
25327
25397
  getLogs: method(object({
25328
25398
  addonId: string(),
25329
25399
  limit: number().min(1).max(500).default(100),
25330
- level: LogLevelSchema$1.optional()
25400
+ level: LogLevelSchema$2.optional()
25331
25401
  }), array(LogQueryEntrySchema)),
25332
25402
  listPackages: method(_void(), array(InstalledPackageSchema).readonly()),
25333
25403
  installPackage: method(object({
@@ -25565,7 +25635,7 @@ var addonsCapability = {
25565
25635
  }),
25566
25636
  onAddonLogs: method(object({
25567
25637
  addonId: string(),
25568
- level: LogLevelSchema$1.optional()
25638
+ level: LogLevelSchema$2.optional()
25569
25639
  }), LogStreamEntrySchema, { kind: "subscription" })
25570
25640
  },
25571
25641
  /** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
@@ -27352,6 +27422,35 @@ var FaceFilterEnum = _enum([
27352
27422
  "identified",
27353
27423
  "all"
27354
27424
  ]);
27425
+ /**
27426
+ * What a `listRecentFaces` page is ORDERED BY.
27427
+ *
27428
+ * - `timestamp` — when the face was seen. The historical (and default) order.
27429
+ * - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
27430
+ * cosine of the face's SUGGESTED identity. This is the "review by certainty"
27431
+ * order: it puts the suggestions an operator can confirm with one tap at the
27432
+ * top, and it is the reason this enum exists — a client that ranked a capped
27433
+ * page client-side was ranking the newest N, never the most certain N.
27434
+ *
27435
+ * A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
27436
+ * auto-assigned face, or a face below the suggestion band) has no certainty to
27437
+ * compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
27438
+ * — flipping the direction reorders the rows that HAVE a certainty and never
27439
+ * floods the page with the ones that do not. `addon-post-analysis`'s
27440
+ * `store/face-sort.ts` is the single implementation, tiebreaks newest-first
27441
+ * then by faceId, and is what makes this a total order instead of the
27442
+ * backend's NULL-collation accident.
27443
+ */
27444
+ var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
27445
+ var FaceSortDirectionEnum = _enum(["asc", "desc"]);
27446
+ /** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
27447
+ * never leaves the server. */
27448
+ var FaceClusterSchema = object({
27449
+ faceIds: array(string()).readonly(),
27450
+ representativeFaceId: string(),
27451
+ size: number().int(),
27452
+ cohesion: number()
27453
+ });
27355
27454
  var MediaFileLiteSchema$1 = object({
27356
27455
  key: string(),
27357
27456
  kind: string(),
@@ -27409,24 +27508,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
27409
27508
  auth: "admin"
27410
27509
  }),
27411
27510
  listRecentFaces: method(object({
27412
- /** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
27511
+ /**
27512
+ * Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
27513
+ *
27514
+ * The legacy single-camera form, kept verbatim for every caller that
27515
+ * already sends it. A caller that wants a SET sends {@link deviceIds}
27516
+ * instead — never both: `deviceIds` is the authority whenever it is
27517
+ * present, and this field is then ignored rather than unioned, so
27518
+ * there is exactly one answer to "which cameras did I ask for".
27519
+ */
27413
27520
  deviceId: number().int().optional(),
27521
+ /**
27522
+ * Restrict to a SET of cameras — the review UI's camera filter, which
27523
+ * until now had to fetch the cluster-wide page and drop rows in the
27524
+ * client (so the `limit` it asked for was spent on cameras it was
27525
+ * about to discard).
27526
+ *
27527
+ * An **empty array reads NOTHING** — `[]` is an empty page, never
27528
+ * "every camera". A request for no devices is a request, not an
27529
+ * omission; same contract as `deviceManager.listFleet` and
27530
+ * `pipelineAnalytics.listRecentTracks`.
27531
+ *
27532
+ * Absent (`undefined`) is the omission, and keeps the cluster-wide view.
27533
+ */
27534
+ deviceIds: array(number().int()).optional(),
27414
27535
  limit: number().int().positive().optional(),
27415
27536
  filter: FaceFilterEnum.optional(),
27416
27537
  /**
27417
- * Inline the base64 crop on every row. Default `true` — the existing
27418
- * behaviour, kept so no caller breaks.
27538
+ * Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
27539
+ * Absent means no lower bound.
27540
+ */
27541
+ since: number().int().optional(),
27542
+ /**
27543
+ * Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
27544
+ * Absent means no upper bound.
27545
+ */
27546
+ until: number().int().optional(),
27547
+ /**
27548
+ * Order the page by time or by suggestion certainty. Default
27549
+ * `'timestamp'` — the historical order, unchanged for every caller
27550
+ * that does not ask.
27419
27551
  *
27420
- * Set `false` once the caller renders {@link FaceInfo.cropUrl}: that
27421
- * drops ~2.87 MiB per 500-row page to a few KiB of metadata and lets
27422
- * the browser cache the images.
27552
+ * See {@link FaceSortFieldEnum} for what a row with no suggestion
27553
+ * does under `'suggestionConfidence'`.
27423
27554
  *
27424
- * **This is an INPUT field, so it does not reach the addon until the
27425
- * next train.** The hub router validates cap inputs against its own
27426
- * compiled Zod, which strips a key it does not know verified today
27427
- * on the OUTPUT side, where an additive field DOES arrive immediately
27428
- * (`Track.hasFace`). Until the train ships, sending `false` is
27429
- * harmless and simply keeps the crops inline.
27555
+ * Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
27556
+ * index and stops reading as soon as `limit` rows have PASSED the
27557
+ * filter. `'suggestionConfidence'` cannot stop earlythe most
27558
+ * certain row may be the oldest so it walks the window. Narrow it
27559
+ * with {@link since} / {@link until}.
27560
+ */
27561
+ sortBy: FaceSortFieldEnum.optional(),
27562
+ /** Sort direction for {@link sortBy}. Default `'desc'`. */
27563
+ sortDirection: FaceSortDirectionEnum.optional(),
27564
+ /**
27565
+ * Inline the base64 crop on every row.
27566
+ *
27567
+ * Default `false` since the 2026-08-25 inversion — see
27568
+ * `include-crops-default.ts`, which is the ONE place that resolves
27569
+ * this for every gallery, and which records why the inline shape had
27570
+ * to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
27571
+ * The doc here used to still say `true`; it was wrong, and a leftover
27572
+ * that describes the old design reads as permission to rely on it.
27573
+ *
27574
+ * Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
27575
+ * which the browser fetches off the `event-media` plane in parallel,
27576
+ * cached and ETagged.
27430
27577
  */
27431
27578
  includeCrops: boolean().optional()
27432
27579
  }).optional(), array(FaceInfoSchema).readonly()),
@@ -27475,13 +27622,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
27475
27622
  suggestFaceClusters: method(object({
27476
27623
  threshold: number().min(0).max(1).optional(),
27477
27624
  minClusterSize: number().int().min(2).optional(),
27478
- limit: number().int().positive().optional()
27479
- }).optional(), array(object({
27480
- faceIds: array(string()).readonly(),
27481
- representativeFaceId: string(),
27482
- size: number().int(),
27483
- cohesion: number()
27484
- })).readonly())
27625
+ /**
27626
+ * Cap on the number of CLUSTERS returned. Renamed from `limit`,
27627
+ * which read as though it bounded the work — it never did.
27628
+ *
27629
+ * Wins over {@link limit} when both are sent.
27630
+ */
27631
+ maxClusters: number().int().positive().optional(),
27632
+ /**
27633
+ * @deprecated Ambiguous name for {@link maxClusters} — it cuts the
27634
+ * RESULT, not the scan. Kept so existing callers keep working; send
27635
+ * `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
27636
+ */
27637
+ limit: number().int().positive().optional(),
27638
+ /**
27639
+ * Cap on the number of unassigned faces READ AND CLUSTERED — the
27640
+ * POOL, not the result.
27641
+ *
27642
+ * This is the knob {@link maxClusters} was mistaken for. Clustering
27643
+ * used to read every unassigned face on the hub no matter what the
27644
+ * caller asked for, because the only bound cut the finished clusters
27645
+ * afterwards; a UI showing a window of 100 paid for a scan of the
27646
+ * whole corpus, on an addon whose disk is under contention.
27647
+ *
27648
+ * The pool is the NEWEST matching faces first — the same order the
27649
+ * gallery shows — so a bound here shortens the horizon, it does not
27650
+ * sample it randomly.
27651
+ *
27652
+ * Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
27653
+ * so the live corpus — 372 face rows — is unaffected while the
27654
+ * unbounded scan can never come back as the table grows.
27655
+ */
27656
+ maxFacesScanned: number().int().positive().optional()
27657
+ }).optional(), array(FaceClusterSchema).readonly())
27485
27658
  }
27486
27659
  };
27487
27660
  /**
@@ -33018,6 +33191,293 @@ var SetSiteLocationInputSchema = object({
33018
33191
  latitude: number().min(-90).max(90),
33019
33192
  longitude: number().min(-180).max(180)
33020
33193
  }).nullable();
33194
+ /**
33195
+ * The TRANSPORT a call arrived on.
33196
+ *
33197
+ * Every counted call carries exactly one of these, and `unknown` is a PLANE
33198
+ * rather than a gap: a plane that cannot attribute a call declares it here, so
33199
+ * the call lands in a named bucket instead of vanishing. `planes` summing to
33200
+ * `procedureCalls` is what makes "the sum of the planes explains the total"
33201
+ * checkable rather than asserted.
33202
+ *
33203
+ * - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
33204
+ * - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
33205
+ * connection; the viewer talks to the hub over `wsLink`
33206
+ * exclusively, so this is the plane the HTTP census could not see.
33207
+ * - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
33208
+ * never touches a socket and therefore never touched a census.
33209
+ * - `unknown` — counted, plane undecidable. No hook produces it today, and
33210
+ * that is exactly what its `0` asserts: every plane the hub has can name
33211
+ * itself. It is an output bucket, never a knob — a call that arrives on a
33212
+ * plane nobody instrumented lands here instead of vanishing from the total.
33213
+ */
33214
+ var TransportPlaneSchema = _enum([
33215
+ "http",
33216
+ "ws",
33217
+ "mesh",
33218
+ "unknown"
33219
+ ]);
33220
+ /**
33221
+ * Calls per plane. Every key is always present, `0` included — an absent plane
33222
+ * reads as "not instrumented", which is the one thing this census must never
33223
+ * make an operator wonder about.
33224
+ */
33225
+ var TransportPlaneCountsSchema = object({
33226
+ http: number(),
33227
+ ws: number(),
33228
+ mesh: number(),
33229
+ unknown: number()
33230
+ });
33231
+ /**
33232
+ * One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
33233
+ * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
33234
+ * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
33235
+ * already prints - never a token, never an `Authorization` header.
33236
+ *
33237
+ * `subscriptions` is counted APART from `calls`: a subscription is opened once
33238
+ * and lives for hours, so folding it into a call count makes one long-lived
33239
+ * stream look like a storm.
33240
+ */
33241
+ var RequestCensusGroupSchema = object({
33242
+ plane: TransportPlaneSchema,
33243
+ procedure: string(),
33244
+ userAgent: string(),
33245
+ ip: string(),
33246
+ principal: string(),
33247
+ calls: number(),
33248
+ subscriptions: number(),
33249
+ perMin: number()
33250
+ });
33251
+ /**
33252
+ * A procedure's TOTAL over the window, across every caller.
33253
+ *
33254
+ * This block, not the group list, is what answers "did these calls arrive over
33255
+ * HTTP at all". A total far BELOW what a store-side census counted over the
33256
+ * same window excludes the HTTP plane, which is a result, not a failure.
33257
+ */
33258
+ var RequestCensusProcedureSchema = object({
33259
+ procedure: string(),
33260
+ calls: number(),
33261
+ /**
33262
+ * The same total, split by transport. THIS is the row that answers the
33263
+ * question the census exists for: one look at `deviceManager.listAll` says
33264
+ * which plane carried the 4 960, without joining two log lines by eye.
33265
+ */
33266
+ planes: TransportPlaneCountsSchema,
33267
+ /** Subscription STARTS on this procedure. Never folded into `calls`. */
33268
+ subscriptions: number(),
33269
+ perMin: number()
33270
+ });
33271
+ /**
33272
+ * The census as an operator sees it.
33273
+ *
33274
+ * `persisted` is the honest answer to "will this survive the restart I am
33275
+ * about to do": the arm deadline is written to `system-settings` so a window
33276
+ * armed now can measure the NEXT boot, and a write that failed must not look
33277
+ * like one that succeeded.
33278
+ */
33279
+ var RequestCensusStatusSchema = object({
33280
+ armed: boolean(),
33281
+ /** How long the current - or just-closed - window collected, in ms. */
33282
+ elapsedMs: number(),
33283
+ /** The window actually armed, after the server clamped the request. */
33284
+ windowMs: number(),
33285
+ /** Epoch ms the window closes at. 0 when disarmed. */
33286
+ armedUntilMs: number(),
33287
+ httpRequests: number(),
33288
+ batchedRequests: number(),
33289
+ /**
33290
+ * Procedure invocations. Higher than `httpRequests` whenever tRPC batching
33291
+ * is in play (`?batch=1` carries several procedures in one request); this is
33292
+ * the number comparable with a store-side call count.
33293
+ */
33294
+ procedureCalls: number(),
33295
+ /**
33296
+ * `procedureCalls` split by transport. The four keys sum to
33297
+ * `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
33298
+ * `planesExplainTotal` is that identity, checked rather than assumed.
33299
+ */
33300
+ planes: TransportPlaneCountsSchema,
33301
+ /**
33302
+ * True iff `planes` sums to `procedureCalls`. False means a call was counted
33303
+ * on no plane at all - which is a RESULT (a plane is missing from the
33304
+ * instrument), not a failure, and it has to be visible to be read as one.
33305
+ */
33306
+ planesExplainTotal: boolean(),
33307
+ /**
33308
+ * tRPC WebSocket connections opened during the window. NOT calls - the WS
33309
+ * adapter resolves one context per connection - kept because a plane's call
33310
+ * count of zero against 37 open connections says something different from a
33311
+ * plane with no connections at all.
33312
+ */
33313
+ wsConnections: number(),
33314
+ /**
33315
+ * Client frames the WS plane looked at. `wsMessages` far above
33316
+ * `planes.ws + subscriptions` means most traffic is not operations
33317
+ * (keepalives, connection params) - which is itself an answer.
33318
+ */
33319
+ wsMessages: number(),
33320
+ /**
33321
+ * Subscription STARTS across every plane, excluded from `procedureCalls` on
33322
+ * purpose: one live-events stream opened at boot and held for six hours is
33323
+ * one subscription, and counting it as a call would let a quiet plane
33324
+ * masquerade as the storm.
33325
+ */
33326
+ subscriptions: number(),
33327
+ /** `subscription.stop` frames. Starts minus stops is what is still open. */
33328
+ subscriptionStops: number(),
33329
+ distinctGroups: number(),
33330
+ /**
33331
+ * Operations counted in the totals whose CALLER attribution was shed at the
33332
+ * cardinality bound. Unrelated to the `unknown` PLANE: these calls know
33333
+ * which transport they arrived on, they just lost their group row.
33334
+ */
33335
+ unattributedCalls: number(),
33336
+ procedures: array(RequestCensusProcedureSchema).readonly(),
33337
+ groups: array(RequestCensusGroupSchema).readonly()
33338
+ }).extend({ persisted: boolean() });
33339
+ /** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
33340
+ var LogLevelSchema$1 = _enum([
33341
+ "debug",
33342
+ "info",
33343
+ "warn",
33344
+ "error"
33345
+ ]);
33346
+ /**
33347
+ * The diagnostics that can be ARMED for a window. Exactly one today.
33348
+ *
33349
+ * A diagnostic is anything whose cost is only worth paying while a question is
33350
+ * open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
33351
+ */
33352
+ var DiagnosticIdSchema = _enum(["request-census"]);
33353
+ /**
33354
+ * The layers of the level hierarchy, general → specific. The most specific
33355
+ * layer that carries an explicit value wins.
33356
+ *
33357
+ * `component` is DECLARED and not yet resolvable: the per-component channels
33358
+ * are a later slice of the same plan, and a `levelSource` enum that has to
33359
+ * grow later would force every consumer of this document to change with it.
33360
+ * Nothing returns `component` today.
33361
+ */
33362
+ var LoggingScopeKindSchema = _enum([
33363
+ "cluster",
33364
+ "node",
33365
+ "component"
33366
+ ]);
33367
+ /** Where an effective level came from. `default` = nothing is set anywhere. */
33368
+ var LoggingLevelSourceSchema = _enum([
33369
+ "default",
33370
+ "cluster",
33371
+ "node",
33372
+ "component"
33373
+ ]);
33374
+ /**
33375
+ * One layer of the hierarchy as it actually STANDS.
33376
+ *
33377
+ * `level: null` is the whole reason this array is returned: it is the
33378
+ * difference between "this node is at `info` because I decided it" and
33379
+ * "...because it inherits". An operator who clears an override believing they
33380
+ * are clearing an inherited value has been handed the same defect as the two
33381
+ * contradicting knobs this document exists to remove, moved one floor up.
33382
+ */
33383
+ var LoggingLevelLayerSchema = object({
33384
+ scope: LoggingScopeKindSchema,
33385
+ /** The node this layer speaks for; `null` on the cluster layer. */
33386
+ nodeId: string().nullable(),
33387
+ /** Explicitly set here, or `null` when this layer inherits. */
33388
+ level: LogLevelSchema$1.nullable()
33389
+ });
33390
+ /** What a line is judged against, and WHICH layer decided it. */
33391
+ var LoggingEffectiveSchema = object({
33392
+ level: LogLevelSchema$1,
33393
+ levelSource: LoggingLevelSourceSchema
33394
+ });
33395
+ /** Every layer, general → specific. Never collapsed into the effective value. */
33396
+ var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
33397
+ /**
33398
+ * An armed diagnostic, with its DEADLINE.
33399
+ *
33400
+ * The shape of ADR-0244: what is stored is a deadline and never a flag, so a
33401
+ * diagnostic somebody forgot expires by itself, and a boot-window measurement
33402
+ * survives the restart it exists to measure. `remainingMs` is 0 whenever
33403
+ * `armed` is false — a window is never reported as slightly expired.
33404
+ */
33405
+ var DiagnosticWindowSchema = object({
33406
+ id: DiagnosticIdSchema,
33407
+ armed: boolean(),
33408
+ /** Epoch ms the window closes at. 0 when disarmed. */
33409
+ armedUntilMs: number(),
33410
+ /** Ms left before it expires on its own. 0 when disarmed. */
33411
+ remainingMs: number(),
33412
+ /** Whether the stored deadline is the one the live diagnostic is running —
33413
+ * i.e. whether this window would survive a restart. */
33414
+ persisted: boolean()
33415
+ });
33416
+ /**
33417
+ * `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
33418
+ * server — there is no maximum here on purpose: a bound repeated in a schema
33419
+ * is a second knob that disagrees with the first the day one of them moves.
33420
+ */
33421
+ var DiagnosticWindowPatchSchema = object({
33422
+ id: DiagnosticIdSchema,
33423
+ armMs: number().int().min(0),
33424
+ /** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
33425
+ reportEveryMs: number().int().positive().optional()
33426
+ });
33427
+ /**
33428
+ * A PATCH, and patches MERGE.
33429
+ *
33430
+ * A field absent from the patch is left exactly as it was — arming a
33431
+ * diagnostic never resets a level, and setting a level never disarms a window.
33432
+ * The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
33433
+ * `setAll` already merges, and rebuilding the object is how an absent field
33434
+ * turns into an erased one.
33435
+ */
33436
+ var LoggingSettingsPatchSchema = object({
33437
+ /**
33438
+ * Absent leaves the level untouched. `null` CLEARS the explicit value at the
33439
+ * addressed scope so it inherits again. A value sets it.
33440
+ */
33441
+ level: LogLevelSchema$1.nullable().optional(),
33442
+ /**
33443
+ * Only the diagnostics NAMED here change. An armed window that is not listed
33444
+ * keeps running — a patch is never a full replacement.
33445
+ */
33446
+ diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
33447
+ });
33448
+ /**
33449
+ * Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
33450
+ *
33451
+ * Deliberately NOT called `nodeId`: that key is reserved on every cap method
33452
+ * input — the generated router strips it and uses it to resolve the PROVIDER
33453
+ * on that node (`resolveProvider(cap, nodeId, …)`). A document about
33454
+ * `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
33455
+ * by an agent that holds no cluster document at all. The hub is the single
33456
+ * authority over the whole hierarchy and answers for every layer, so the
33457
+ * layer selector needs a name the transport does not already own.
33458
+ */
33459
+ var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
33460
+ var SetLoggingSettingsInputSchema = object({
33461
+ scopeNodeId: string().optional(),
33462
+ patch: LoggingSettingsPatchSchema
33463
+ });
33464
+ /**
33465
+ * The whole document, as read and as returned after every write.
33466
+ *
33467
+ * `persisted: false` means the settings store could not be read or written.
33468
+ * The in-memory mirror still governs behaviour and is unchanged by the
33469
+ * failure — a read that fails neither switches a level nor disarms a window
33470
+ * (D49) — but the operator is told that what they are looking at would not
33471
+ * survive a restart.
33472
+ */
33473
+ var LoggingSettingsStateSchema = object({
33474
+ /** The layer this document was read at. `null` = the cluster layer. */
33475
+ scopeNodeId: string().nullable(),
33476
+ effective: LoggingEffectiveSchema,
33477
+ explicit: LoggingExplicitSchema,
33478
+ activeWindows: array(DiagnosticWindowSchema).readonly(),
33479
+ persisted: boolean()
33480
+ });
33021
33481
  var systemCapability = {
33022
33482
  name: "system",
33023
33483
  scope: "system",
@@ -33061,6 +33521,38 @@ var systemCapability = {
33061
33521
  detectSiteLocation: method(_void(), SiteLocationStatusSchema, {
33062
33522
  kind: "mutation",
33063
33523
  auth: "admin"
33524
+ }),
33525
+ /**
33526
+ * Read the HTTP request census - which caller, from which address, with
33527
+ * which user-agent, invoked which tRPC procedure, and how often.
33528
+ *
33529
+ * Reading NEVER re-arms: re-arming clears the counts, which would throw
33530
+ * away exactly the numbers being asked for. A closed window may be read as
33531
+ * many times as the operator likes and always describes the same window.
33532
+ *
33533
+ * Admin-only: the rows carry source addresses and principal names.
33534
+ */
33535
+ getRequestCensus: method(_void(), RequestCensusStatusSchema, { auth: "admin" }),
33536
+ /**
33537
+ * The logging settings document — levels and armed diagnostics — resolved
33538
+ * for `nodeId`, or for the cluster when `nodeId` is absent.
33539
+ *
33540
+ * Returns BOTH `effective` and `explicit`. See
33541
+ * {@link LoggingLevelLayerSchema} for why collapsing them is the defect.
33542
+ */
33543
+ getLoggingSettings: method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }),
33544
+ /**
33545
+ * Write the logging settings document. The ONLY write authority over log
33546
+ * levels and diagnostic windows — arming the request census went through
33547
+ * `system.setRequestCensus` until 2026-08-27 and no longer does, because
33548
+ * two writes that disagree about the same window is exactly the defect
33549
+ * this document exists to remove (D245).
33550
+ *
33551
+ * The patch MERGES: see {@link LoggingSettingsPatchSchema}.
33552
+ */
33553
+ setLoggingSettings: method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
33554
+ kind: "mutation",
33555
+ auth: "admin"
33064
33556
  })
33065
33557
  },
33066
33558
  /** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
@@ -39530,6 +40022,18 @@ Object.freeze({
39530
40022
  addonId: null,
39531
40023
  access: "create"
39532
40024
  },
40025
+ "system.getLoggingSettings": {
40026
+ capName: "system",
40027
+ capScope: "system",
40028
+ addonId: null,
40029
+ access: "view"
40030
+ },
40031
+ "system.getRequestCensus": {
40032
+ capName: "system",
40033
+ capScope: "system",
40034
+ addonId: null,
40035
+ access: "view"
40036
+ },
39533
40037
  "system.getRetentionConfig": {
39534
40038
  capName: "system",
39535
40039
  capScope: "system",
@@ -39560,6 +40064,12 @@ Object.freeze({
39560
40064
  addonId: null,
39561
40065
  access: "view"
39562
40066
  },
40067
+ "system.setLoggingSettings": {
40068
+ capName: "system",
40069
+ capScope: "system",
40070
+ addonId: null,
40071
+ access: "create"
40072
+ },
39563
40073
  "system.setRetentionConfig": {
39564
40074
  capName: "system",
39565
40075
  capScope: "system",
@@ -40715,6 +41225,10 @@ Object.freeze({
40715
41225
  name: "deviceId",
40716
41226
  form: "single",
40717
41227
  optional: true
41228
+ }, {
41229
+ name: "deviceIds",
41230
+ form: "array",
41231
+ optional: true
40718
41232
  }],
40719
41233
  "fanControl.setDirection": [{
40720
41234
  name: "deviceId",
@@ -42385,7 +42899,38 @@ object({
42385
42899
  * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
42386
42900
  * reproduce that.
42387
42901
  */
42388
- tileBudgetMb: number().int().min(0).max(1024)
42902
+ tileBudgetMb: number().int().min(0).max(1024),
42903
+ /**
42904
+ * RAM ceiling per decode worker, in MB, for the SCENE TILES — one
42905
+ * JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
42906
+ * subject tiles, on frames that detected something.
42907
+ *
42908
+ * It exists because a subject tile cannot answer a FULL-FRAME request:
42909
+ * containment is strict by design, so the native `keyFrame`, the detail
42910
+ * plane's `frameJpeg` rung and the display-crop fallback had no rung at all
42911
+ * below the hold. Measured on the live cluster: 23.3% of key-frame captures
42912
+ * missed, 95.7% of them with `worker-lease-gone` — the raster released one
42913
+ * frame-time after delivery, with the request only p50 367 ms behind it.
42914
+ *
42915
+ * Sizing, and why this is a budget and not a duration: a scene tile is
42916
+ * ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
42917
+ * ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
42918
+ * camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
42919
+ * frames, i.e. the store's 30 s TTL binds at the steady state and the budget
42920
+ * binds only through a detection burst, where it still covers well past the
42921
+ * measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
42922
+ * would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
42923
+ * whole shape exists to avoid.
42924
+ *
42925
+ * A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
42926
+ * subject tile, so one shared budget would let a busy camera's key frames
42927
+ * evict the face/plate tiles the recognisers depend on. Two budgets make that
42928
+ * impossible rather than unlikely. `0` DISABLES scene tiles and restores the
42929
+ * pre-existing behaviour, where a late full-frame request had nothing but the
42930
+ * ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
42931
+ * nothing.
42932
+ */
42933
+ sceneBudgetMb: number().int().min(0).max(1024)
42389
42934
  });
42390
42935
  /**
42391
42936
  * The values in force when the operator has set nothing.
@@ -42401,12 +42946,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
42401
42946
  budgetMb: 1024,
42402
42947
  activityMs: 15e3,
42403
42948
  tileBudgetMb: 64,
42949
+ sceneBudgetMb: 48,
42404
42950
  admission: "inferred"
42405
42951
  };
42406
42952
  DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
42407
42953
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
42408
42954
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
42409
42955
  DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
42956
+ DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
42410
42957
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
42411
42958
  var MB = 1024 * 1024;
42412
42959
  1024 * MB, 3072 * MB;