@camstack/addon-tailscale 1.2.31 → 1.2.32

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.
@@ -7543,6 +7543,66 @@ var OpsLogQueryInputSchema = object({
7543
7543
  /** Max rows returned, newest-first. */
7544
7544
  limit: number().int().min(1).max(1e3).optional()
7545
7545
  });
7546
+ var LabelDefinitionSchema = object({
7547
+ id: string(),
7548
+ name: string(),
7549
+ category: string().optional(),
7550
+ description: string().optional(),
7551
+ icon: string().optional()
7552
+ });
7553
+ /** Detection-macro targets a catalog `classMap` may resolve to. */
7554
+ var CLASS_MAP_MACRO_TARGETS = [
7555
+ "person",
7556
+ "vehicle",
7557
+ "animal",
7558
+ "package"
7559
+ ];
7560
+ /**
7561
+ * Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
7562
+ * un operatore può selezionare.
7563
+ *
7564
+ * Sono le tre offerte dallo step `object-detection`
7565
+ * (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
7566
+ * `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
7567
+ * `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
7568
+ * `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
7569
+ * stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
7570
+ * (suitcase/backpack/handbag) lasciando spento il detector dedicato.
7571
+ *
7572
+ * UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
7573
+ * dello step e una seconda volta come union `FirstLevelMacro`
7574
+ * (`types/detection.ts`); una terza copia per il trigger di registrazione
7575
+ * (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
7576
+ * successiva.
7577
+ */
7578
+ var FIRST_LEVEL_MACRO_CLASSES = [
7579
+ "person",
7580
+ "vehicle",
7581
+ "animal"
7582
+ ];
7583
+ /**
7584
+ * Wire schema for a per-model CATALOG classMap override
7585
+ * (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
7586
+ * restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
7587
+ * detection pipeline executor actually routes.
7588
+ *
7589
+ * This is deliberately a DIFFERENT, narrower shape than the general-purpose
7590
+ * `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
7591
+ * and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
7592
+ * enum) — the two used to share the name `ClassMapDefinition`/
7593
+ * `ClassMapDefinitionSchema`, which made the schema-type-twin guard
7594
+ * (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
7595
+ * are not: it is two different concepts colliding on a name. Keep this type
7596
+ * under its own name rather than reusing `ClassMapDefinition` — reusing it
7597
+ * would either narrow every `ClassMapDefinition` consumer to the four
7598
+ * detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
7599
+ * schema exists for (see the "rejects a classMap whose target is not a
7600
+ * detection macro" test in `model-catalog-schema.test.ts`).
7601
+ */
7602
+ var DetectionCatalogClassMapSchema = object({
7603
+ mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
7604
+ preserveOriginal: boolean()
7605
+ });
7546
7606
  /**
7547
7607
  * Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
7548
7608
  * Named `RecordingWeekday` to avoid collision with the string-union
@@ -7565,10 +7625,55 @@ var RecordingStorageModeSchema = _enum([
7565
7625
  "events",
7566
7626
  "continuous"
7567
7627
  ]);
7628
+ /**
7629
+ * Le macro classi che possono aprire una finestra di registrazione — le stesse
7630
+ * tre offerte dallo step `object-detection`, da UNA lista
7631
+ * ({@link FIRST_LEVEL_MACRO_CLASSES}).
7632
+ */
7633
+ var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
7634
+ /**
7635
+ * True quando `values` non ripete un elemento.
7636
+ *
7637
+ * Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
7638
+ * diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
7639
+ * conterebbe due volte le sue finestre in `segmentMissedByMs`.
7640
+ */
7641
+ var noDuplicates = (values) => new Set(values).size === values.length;
7568
7642
  /** Which detectors trigger an `events`-mode band. */
7569
7643
  var RecordingTriggersSchema = object({
7570
7644
  motion: boolean().optional(),
7571
- audioThresholdDbfs: number().optional()
7645
+ audioThresholdDbfs: number().optional(),
7646
+ /**
7647
+ * Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
7648
+ * non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
7649
+ * object acceso, nessuna classe" è la stessa forma "abilitata e non registra
7650
+ * nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
7651
+ *
7652
+ * Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
7653
+ * quelle che hanno attraversato `enabledMacroClasses`, i
7654
+ * `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
7655
+ * (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
7656
+ * finestre — vedi `recorder/object-trigger.ts`.
7657
+ */
7658
+ objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
7659
+ /**
7660
+ * I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
7661
+ * non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
7662
+ * `objectClasses`.
7663
+ *
7664
+ * Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
7665
+ * percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
7666
+ * non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
7667
+ * si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
7668
+ * device (D12) — mai un elenco globale di cap.
7669
+ *
7670
+ * Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
7671
+ * `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
7672
+ * la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
7673
+ * il livello: un contatto trovato già aperto al riavvio del runner non fa
7674
+ * registrare.
7675
+ */
7676
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7572
7677
  });
7573
7678
  /**
7574
7679
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -8020,41 +8125,6 @@ var DecoderSessionConfigSchema = object({
8020
8125
  */
8021
8126
  debug: boolean().optional()
8022
8127
  });
8023
- var LabelDefinitionSchema = object({
8024
- id: string(),
8025
- name: string(),
8026
- category: string().optional(),
8027
- description: string().optional(),
8028
- icon: string().optional()
8029
- });
8030
- /**
8031
- * Wire schema for a per-model CATALOG classMap override
8032
- * (`ModelCatalogEntry.classMap` / `ModelConvertMetadata.classMap`) —
8033
- * restricted to {@link CLASS_MAP_MACRO_TARGETS}, the only macros the
8034
- * detection pipeline executor actually routes.
8035
- *
8036
- * This is deliberately a DIFFERENT, narrower shape than the general-purpose
8037
- * `ClassMapDefinition` interface above (e.g. `IDetectionAddon.getClassMap()`
8038
- * and the audio `YAMNET_TO_MACRO` catalog both use macro targets outside this
8039
- * enum) — the two used to share the name `ClassMapDefinition`/
8040
- * `ClassMapDefinitionSchema`, which made the schema-type-twin guard
8041
- * (`scripts/check-schema-type-twins.ts`) flag them as a duplicated shape. They
8042
- * are not: it is two different concepts colliding on a name. Keep this type
8043
- * under its own name rather than reusing `ClassMapDefinition` — reusing it
8044
- * would either narrow every `ClassMapDefinition` consumer to the four
8045
- * detection macros (breaking `YAMNET_TO_MACRO`) or drop the validation this
8046
- * schema exists for (see the "rejects a classMap whose target is not a
8047
- * detection macro" test in `model-catalog-schema.test.ts`).
8048
- */
8049
- var DetectionCatalogClassMapSchema = object({
8050
- mapping: record(string(), _enum([
8051
- "person",
8052
- "vehicle",
8053
- "animal",
8054
- "package"
8055
- ])),
8056
- preserveOriginal: boolean()
8057
- });
8058
8128
  var MODEL_FORMATS = [
8059
8129
  "onnx",
8060
8130
  "coreml",
@@ -20845,7 +20915,7 @@ var lifecycleJobSchema = object({
20845
20915
  * `useAddonsOnAddonLogs`, etc. flow through the same codegen pipeline
20846
20916
  * as every other cap.
20847
20917
  */
20848
- var LogLevelSchema$1 = _enum([
20918
+ var LogLevelSchema$2 = _enum([
20849
20919
  "debug",
20850
20920
  "info",
20851
20921
  "warn",
@@ -21052,7 +21122,7 @@ var CustomActionInputSchema = object({
21052
21122
  method(_void(), array(AddonListItemSchema).readonly()), method(object({
21053
21123
  addonId: string(),
21054
21124
  limit: number().min(1).max(500).default(100),
21055
- level: LogLevelSchema$1.optional()
21125
+ level: LogLevelSchema$2.optional()
21056
21126
  }), array(LogQueryEntrySchema)), method(_void(), array(InstalledPackageSchema).readonly()), method(object({
21057
21127
  packageName: string(),
21058
21128
  version: string().optional()
@@ -21150,7 +21220,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
21150
21220
  auth: "admin"
21151
21221
  }), method(object({
21152
21222
  addonId: string(),
21153
- level: LogLevelSchema$1.optional()
21223
+ level: LogLevelSchema$2.optional()
21154
21224
  }), LogStreamEntrySchema, { kind: "subscription" });
21155
21225
  object({
21156
21226
  /** Carbon dioxide concentration in ppm. */
@@ -22144,6 +22214,35 @@ var FaceFilterEnum = _enum([
22144
22214
  "identified",
22145
22215
  "all"
22146
22216
  ]);
22217
+ /**
22218
+ * What a `listRecentFaces` page is ORDERED BY.
22219
+ *
22220
+ * - `timestamp` — when the face was seen. The historical (and default) order.
22221
+ * - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
22222
+ * cosine of the face's SUGGESTED identity. This is the "review by certainty"
22223
+ * order: it puts the suggestions an operator can confirm with one tap at the
22224
+ * top, and it is the reason this enum exists — a client that ranked a capped
22225
+ * page client-side was ranking the newest N, never the most certain N.
22226
+ *
22227
+ * A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
22228
+ * auto-assigned face, or a face below the suggestion band) has no certainty to
22229
+ * compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
22230
+ * — flipping the direction reorders the rows that HAVE a certainty and never
22231
+ * floods the page with the ones that do not. `addon-post-analysis`'s
22232
+ * `store/face-sort.ts` is the single implementation, tiebreaks newest-first
22233
+ * then by faceId, and is what makes this a total order instead of the
22234
+ * backend's NULL-collation accident.
22235
+ */
22236
+ var FaceSortFieldEnum = _enum(["timestamp", "suggestionConfidence"]);
22237
+ var FaceSortDirectionEnum = _enum(["asc", "desc"]);
22238
+ /** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
22239
+ * never leaves the server. */
22240
+ var FaceClusterSchema = object({
22241
+ faceIds: array(string()).readonly(),
22242
+ representativeFaceId: string(),
22243
+ size: number().int(),
22244
+ cohesion: number()
22245
+ });
22147
22246
  var MediaFileLiteSchema$1 = object({
22148
22247
  key: string(),
22149
22248
  kind: string(),
@@ -22190,24 +22289,72 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
22190
22289
  kind: "mutation",
22191
22290
  auth: "admin"
22192
22291
  }), method(object({
22193
- /** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
22292
+ /**
22293
+ * Restrict to ONE camera. Absent keeps the cluster-wide gallery view.
22294
+ *
22295
+ * The legacy single-camera form, kept verbatim for every caller that
22296
+ * already sends it. A caller that wants a SET sends {@link deviceIds}
22297
+ * instead — never both: `deviceIds` is the authority whenever it is
22298
+ * present, and this field is then ignored rather than unioned, so
22299
+ * there is exactly one answer to "which cameras did I ask for".
22300
+ */
22194
22301
  deviceId: number().int().optional(),
22302
+ /**
22303
+ * Restrict to a SET of cameras — the review UI's camera filter, which
22304
+ * until now had to fetch the cluster-wide page and drop rows in the
22305
+ * client (so the `limit` it asked for was spent on cameras it was
22306
+ * about to discard).
22307
+ *
22308
+ * An **empty array reads NOTHING** — `[]` is an empty page, never
22309
+ * "every camera". A request for no devices is a request, not an
22310
+ * omission; same contract as `deviceManager.listFleet` and
22311
+ * `pipelineAnalytics.listRecentTracks`.
22312
+ *
22313
+ * Absent (`undefined`) is the omission, and keeps the cluster-wide view.
22314
+ */
22315
+ deviceIds: array(number().int()).optional(),
22195
22316
  limit: number().int().positive().optional(),
22196
22317
  filter: FaceFilterEnum.optional(),
22197
22318
  /**
22198
- * Inline the base64 crop on every row. Default `true` — the existing
22199
- * behaviour, kept so no caller breaks.
22319
+ * Window lower bound on {@link FaceInfo.timestamp}, INCLUSIVE.
22320
+ * Absent means no lower bound.
22321
+ */
22322
+ since: number().int().optional(),
22323
+ /**
22324
+ * Window upper bound on {@link FaceInfo.timestamp}, INCLUSIVE.
22325
+ * Absent means no upper bound.
22326
+ */
22327
+ until: number().int().optional(),
22328
+ /**
22329
+ * Order the page by time or by suggestion certainty. Default
22330
+ * `'timestamp'` — the historical order, unchanged for every caller
22331
+ * that does not ask.
22200
22332
  *
22201
- * Set `false` once the caller renders {@link FaceInfo.cropUrl}: that
22202
- * drops ~2.87 MiB per 500-row page to a few KiB of metadata and lets
22203
- * the browser cache the images.
22333
+ * See {@link FaceSortFieldEnum} for what a row with no suggestion
22334
+ * does under `'suggestionConfidence'`.
22204
22335
  *
22205
- * **This is an INPUT field, so it does not reach the addon until the
22206
- * next train.** The hub router validates cap inputs against its own
22207
- * compiled Zod, which strips a key it does not know — verified today
22208
- * on the OUTPUT side, where an additive field DOES arrive immediately
22209
- * (`Track.hasFace`). Until the train ships, sending `false` is
22210
- * harmless and simply keeps the crops inline.
22336
+ * Cost note: `'timestamp'` is served by the `(deviceId, timestamp)`
22337
+ * index and stops reading as soon as `limit` rows have PASSED the
22338
+ * filter. `'suggestionConfidence'` cannot stop early — the most
22339
+ * certain row may be the oldest — so it walks the window. Narrow it
22340
+ * with {@link since} / {@link until}.
22341
+ */
22342
+ sortBy: FaceSortFieldEnum.optional(),
22343
+ /** Sort direction for {@link sortBy}. Default `'desc'`. */
22344
+ sortDirection: FaceSortDirectionEnum.optional(),
22345
+ /**
22346
+ * Inline the base64 crop on every row.
22347
+ *
22348
+ * Default `false` since the 2026-08-25 inversion — see
22349
+ * `include-crops-default.ts`, which is the ONE place that resolves
22350
+ * this for every gallery, and which records why the inline shape had
22351
+ * to become the one you ASK for (60 457 ms → UDS timeout at 500 rows).
22352
+ * The doc here used to still say `true`; it was wrong, and a leftover
22353
+ * that describes the old design reads as permission to rely on it.
22354
+ *
22355
+ * Nothing loses its image: the row carries {@link FaceInfo.cropUrl},
22356
+ * which the browser fetches off the `event-media` plane in parallel,
22357
+ * cached and ETagged.
22211
22358
  */
22212
22359
  includeCrops: boolean().optional()
22213
22360
  }).optional(), array(FaceInfoSchema).readonly()), method(object({
@@ -22243,13 +22390,39 @@ includeCrops: boolean().optional() }).optional(), array(IdentitySchema).readonly
22243
22390
  }), method(object({
22244
22391
  threshold: number().min(0).max(1).optional(),
22245
22392
  minClusterSize: number().int().min(2).optional(),
22246
- limit: number().int().positive().optional()
22247
- }).optional(), array(object({
22248
- faceIds: array(string()).readonly(),
22249
- representativeFaceId: string(),
22250
- size: number().int(),
22251
- cohesion: number()
22252
- })).readonly());
22393
+ /**
22394
+ * Cap on the number of CLUSTERS returned. Renamed from `limit`,
22395
+ * which read as though it bounded the work — it never did.
22396
+ *
22397
+ * Wins over {@link limit} when both are sent.
22398
+ */
22399
+ maxClusters: number().int().positive().optional(),
22400
+ /**
22401
+ * @deprecated Ambiguous name for {@link maxClusters} — it cuts the
22402
+ * RESULT, not the scan. Kept so existing callers keep working; send
22403
+ * `maxClusters` (and, if you care about cost, {@link maxFacesScanned}).
22404
+ */
22405
+ limit: number().int().positive().optional(),
22406
+ /**
22407
+ * Cap on the number of unassigned faces READ AND CLUSTERED — the
22408
+ * POOL, not the result.
22409
+ *
22410
+ * This is the knob {@link maxClusters} was mistaken for. Clustering
22411
+ * used to read every unassigned face on the hub no matter what the
22412
+ * caller asked for, because the only bound cut the finished clusters
22413
+ * afterwards; a UI showing a window of 100 paid for a scan of the
22414
+ * whole corpus, on an addon whose disk is under contention.
22415
+ *
22416
+ * The pool is the NEWEST matching faces first — the same order the
22417
+ * gallery shows — so a bound here shortens the horizon, it does not
22418
+ * sample it randomly.
22419
+ *
22420
+ * Default: 1 000 (`FACE_SWEEP_PAGE`, exactly one store page). Chosen
22421
+ * so the live corpus — 372 face rows — is unaffected while the
22422
+ * unbounded scan can never come back as the table grows.
22423
+ */
22424
+ maxFacesScanned: number().int().positive().optional()
22425
+ }).optional(), array(FaceClusterSchema).readonly());
22253
22426
  /**
22254
22427
  * Fan-control cap. Models HA `fan.*` entity-specific surfaces:
22255
22428
  * speed percentage, preset modes, ceiling-fan direction, and
@@ -26033,6 +26206,211 @@ var SetSiteLocationInputSchema = object({
26033
26206
  latitude: number().min(-90).max(90),
26034
26207
  longitude: number().min(-180).max(180)
26035
26208
  }).nullable();
26209
+ /**
26210
+ * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
26211
+ * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
26212
+ * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
26213
+ * already prints - never a token, never an `Authorization` header.
26214
+ */
26215
+ var RequestCensusGroupSchema = object({
26216
+ procedure: string(),
26217
+ userAgent: string(),
26218
+ ip: string(),
26219
+ principal: string(),
26220
+ calls: number(),
26221
+ perMin: number()
26222
+ });
26223
+ /**
26224
+ * A procedure's TOTAL over the window, across every caller.
26225
+ *
26226
+ * This block, not the group list, is what answers "did these calls arrive over
26227
+ * HTTP at all". A total far BELOW what a store-side census counted over the
26228
+ * same window excludes the HTTP plane, which is a result, not a failure.
26229
+ */
26230
+ var RequestCensusProcedureSchema = object({
26231
+ procedure: string(),
26232
+ calls: number(),
26233
+ perMin: number()
26234
+ });
26235
+ /**
26236
+ * The census as an operator sees it.
26237
+ *
26238
+ * `persisted` is the honest answer to "will this survive the restart I am
26239
+ * about to do": the arm deadline is written to `system-settings` so a window
26240
+ * armed now can measure the NEXT boot, and a write that failed must not look
26241
+ * like one that succeeded.
26242
+ */
26243
+ var RequestCensusStatusSchema = object({
26244
+ armed: boolean(),
26245
+ /** How long the current - or just-closed - window collected, in ms. */
26246
+ elapsedMs: number(),
26247
+ /** The window actually armed, after the server clamped the request. */
26248
+ windowMs: number(),
26249
+ /** Epoch ms the window closes at. 0 when disarmed. */
26250
+ armedUntilMs: number(),
26251
+ httpRequests: number(),
26252
+ batchedRequests: number(),
26253
+ /**
26254
+ * Procedure invocations. Higher than `httpRequests` whenever tRPC batching
26255
+ * is in play (`?batch=1` carries several procedures in one request); this is
26256
+ * the number comparable with a store-side call count.
26257
+ */
26258
+ procedureCalls: number(),
26259
+ /**
26260
+ * tRPC WebSocket connections opened during the window. NOT calls - the WS
26261
+ * transport resolves one context per connection - but the number that says
26262
+ * whether a plane this census cannot see was busy while HTTP was quiet.
26263
+ */
26264
+ wsConnections: number(),
26265
+ distinctGroups: number(),
26266
+ /** Calls counted in the totals whose group attribution was shed at the
26267
+ * cardinality bound. */
26268
+ unattributedCalls: number(),
26269
+ procedures: array(RequestCensusProcedureSchema).readonly(),
26270
+ groups: array(RequestCensusGroupSchema).readonly()
26271
+ }).extend({ persisted: boolean() });
26272
+ /** Severity vocabulary. Mirrors `LogLevel` in `interfaces/logging.ts`. */
26273
+ var LogLevelSchema$1 = _enum([
26274
+ "debug",
26275
+ "info",
26276
+ "warn",
26277
+ "error"
26278
+ ]);
26279
+ /**
26280
+ * The diagnostics that can be ARMED for a window. Exactly one today.
26281
+ *
26282
+ * A diagnostic is anything whose cost is only worth paying while a question is
26283
+ * open. It never persists as a boolean: see {@link DiagnosticWindowSchema}.
26284
+ */
26285
+ var DiagnosticIdSchema = _enum(["request-census"]);
26286
+ /**
26287
+ * The layers of the level hierarchy, general → specific. The most specific
26288
+ * layer that carries an explicit value wins.
26289
+ *
26290
+ * `component` is DECLARED and not yet resolvable: the per-component channels
26291
+ * are a later slice of the same plan, and a `levelSource` enum that has to
26292
+ * grow later would force every consumer of this document to change with it.
26293
+ * Nothing returns `component` today.
26294
+ */
26295
+ var LoggingScopeKindSchema = _enum([
26296
+ "cluster",
26297
+ "node",
26298
+ "component"
26299
+ ]);
26300
+ /** Where an effective level came from. `default` = nothing is set anywhere. */
26301
+ var LoggingLevelSourceSchema = _enum([
26302
+ "default",
26303
+ "cluster",
26304
+ "node",
26305
+ "component"
26306
+ ]);
26307
+ /**
26308
+ * One layer of the hierarchy as it actually STANDS.
26309
+ *
26310
+ * `level: null` is the whole reason this array is returned: it is the
26311
+ * difference between "this node is at `info` because I decided it" and
26312
+ * "...because it inherits". An operator who clears an override believing they
26313
+ * are clearing an inherited value has been handed the same defect as the two
26314
+ * contradicting knobs this document exists to remove, moved one floor up.
26315
+ */
26316
+ var LoggingLevelLayerSchema = object({
26317
+ scope: LoggingScopeKindSchema,
26318
+ /** The node this layer speaks for; `null` on the cluster layer. */
26319
+ nodeId: string().nullable(),
26320
+ /** Explicitly set here, or `null` when this layer inherits. */
26321
+ level: LogLevelSchema$1.nullable()
26322
+ });
26323
+ /** What a line is judged against, and WHICH layer decided it. */
26324
+ var LoggingEffectiveSchema = object({
26325
+ level: LogLevelSchema$1,
26326
+ levelSource: LoggingLevelSourceSchema
26327
+ });
26328
+ /** Every layer, general → specific. Never collapsed into the effective value. */
26329
+ var LoggingExplicitSchema = object({ layers: array(LoggingLevelLayerSchema).readonly() });
26330
+ /**
26331
+ * An armed diagnostic, with its DEADLINE.
26332
+ *
26333
+ * The shape of ADR-0244: what is stored is a deadline and never a flag, so a
26334
+ * diagnostic somebody forgot expires by itself, and a boot-window measurement
26335
+ * survives the restart it exists to measure. `remainingMs` is 0 whenever
26336
+ * `armed` is false — a window is never reported as slightly expired.
26337
+ */
26338
+ var DiagnosticWindowSchema = object({
26339
+ id: DiagnosticIdSchema,
26340
+ armed: boolean(),
26341
+ /** Epoch ms the window closes at. 0 when disarmed. */
26342
+ armedUntilMs: number(),
26343
+ /** Ms left before it expires on its own. 0 when disarmed. */
26344
+ remainingMs: number(),
26345
+ /** Whether the stored deadline is the one the live diagnostic is running —
26346
+ * i.e. whether this window would survive a restart. */
26347
+ persisted: boolean()
26348
+ });
26349
+ /**
26350
+ * `armMs: 0` DISARMS. Any positive value arms for that long, clamped by the
26351
+ * server — there is no maximum here on purpose: a bound repeated in a schema
26352
+ * is a second knob that disagrees with the first the day one of them moves.
26353
+ */
26354
+ var DiagnosticWindowPatchSchema = object({
26355
+ id: DiagnosticIdSchema,
26356
+ armMs: number().int().min(0),
26357
+ /** Cadence of the diagnostic's aggregated report line. Clamped by the server. */
26358
+ reportEveryMs: number().int().positive().optional()
26359
+ });
26360
+ /**
26361
+ * A PATCH, and patches MERGE.
26362
+ *
26363
+ * A field absent from the patch is left exactly as it was — arming a
26364
+ * diagnostic never resets a level, and setting a level never disarms a window.
26365
+ * The provider must not reconstruct the document as `{ ...snapshot, ...patch }`:
26366
+ * `setAll` already merges, and rebuilding the object is how an absent field
26367
+ * turns into an erased one.
26368
+ */
26369
+ var LoggingSettingsPatchSchema = object({
26370
+ /**
26371
+ * Absent leaves the level untouched. `null` CLEARS the explicit value at the
26372
+ * addressed scope so it inherits again. A value sets it.
26373
+ */
26374
+ level: LogLevelSchema$1.nullable().optional(),
26375
+ /**
26376
+ * Only the diagnostics NAMED here change. An armed window that is not listed
26377
+ * keeps running — a patch is never a full replacement.
26378
+ */
26379
+ diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
26380
+ });
26381
+ /**
26382
+ * Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
26383
+ *
26384
+ * Deliberately NOT called `nodeId`: that key is reserved on every cap method
26385
+ * input — the generated router strips it and uses it to resolve the PROVIDER
26386
+ * on that node (`resolveProvider(cap, nodeId, …)`). A document about
26387
+ * `agent-1` addressed as `nodeId` would be forwarded to agent-1 and answered
26388
+ * by an agent that holds no cluster document at all. The hub is the single
26389
+ * authority over the whole hierarchy and answers for every layer, so the
26390
+ * layer selector needs a name the transport does not already own.
26391
+ */
26392
+ var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
26393
+ var SetLoggingSettingsInputSchema = object({
26394
+ scopeNodeId: string().optional(),
26395
+ patch: LoggingSettingsPatchSchema
26396
+ });
26397
+ /**
26398
+ * The whole document, as read and as returned after every write.
26399
+ *
26400
+ * `persisted: false` means the settings store could not be read or written.
26401
+ * The in-memory mirror still governs behaviour and is unchanged by the
26402
+ * failure — a read that fails neither switches a level nor disarms a window
26403
+ * (D49) — but the operator is told that what they are looking at would not
26404
+ * survive a restart.
26405
+ */
26406
+ var LoggingSettingsStateSchema = object({
26407
+ /** The layer this document was read at. `null` = the cluster layer. */
26408
+ scopeNodeId: string().nullable(),
26409
+ effective: LoggingEffectiveSchema,
26410
+ explicit: LoggingExplicitSchema,
26411
+ activeWindows: array(DiagnosticWindowSchema).readonly(),
26412
+ persisted: boolean()
26413
+ });
26036
26414
  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(), {
26037
26415
  kind: "mutation",
26038
26416
  auth: "admin"
@@ -26045,6 +26423,9 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
26045
26423
  }), method(_void(), SiteLocationStatusSchema, {
26046
26424
  kind: "mutation",
26047
26425
  auth: "admin"
26426
+ }), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
26427
+ kind: "mutation",
26428
+ auth: "admin"
26048
26429
  });
26049
26430
  object({
26050
26431
  /** True when the device's tamper switch / case-open contact is
@@ -31876,6 +32257,18 @@ Object.freeze({
31876
32257
  addonId: null,
31877
32258
  access: "create"
31878
32259
  },
32260
+ "system.getLoggingSettings": {
32261
+ capName: "system",
32262
+ capScope: "system",
32263
+ addonId: null,
32264
+ access: "view"
32265
+ },
32266
+ "system.getRequestCensus": {
32267
+ capName: "system",
32268
+ capScope: "system",
32269
+ addonId: null,
32270
+ access: "view"
32271
+ },
31879
32272
  "system.getRetentionConfig": {
31880
32273
  capName: "system",
31881
32274
  capScope: "system",
@@ -31906,6 +32299,12 @@ Object.freeze({
31906
32299
  addonId: null,
31907
32300
  access: "view"
31908
32301
  },
32302
+ "system.setLoggingSettings": {
32303
+ capName: "system",
32304
+ capScope: "system",
32305
+ addonId: null,
32306
+ access: "create"
32307
+ },
31909
32308
  "system.setRetentionConfig": {
31910
32309
  capName: "system",
31911
32310
  capScope: "system",
@@ -33061,6 +33460,10 @@ Object.freeze({
33061
33460
  name: "deviceId",
33062
33461
  form: "single",
33063
33462
  optional: true
33463
+ }, {
33464
+ name: "deviceIds",
33465
+ form: "array",
33466
+ optional: true
33064
33467
  }],
33065
33468
  "fanControl.setDirection": [{
33066
33469
  name: "deviceId",
@@ -34671,7 +35074,38 @@ object({
34671
35074
  * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
34672
35075
  * reproduce that.
34673
35076
  */
34674
- tileBudgetMb: number().int().min(0).max(1024)
35077
+ tileBudgetMb: number().int().min(0).max(1024),
35078
+ /**
35079
+ * RAM ceiling per decode worker, in MB, for the SCENE TILES — one
35080
+ * JPEG-encoded copy of the WHOLE native frame, cut in the same instant as the
35081
+ * subject tiles, on frames that detected something.
35082
+ *
35083
+ * It exists because a subject tile cannot answer a FULL-FRAME request:
35084
+ * containment is strict by design, so the native `keyFrame`, the detail
35085
+ * plane's `frameJpeg` rung and the display-crop fallback had no rung at all
35086
+ * below the hold. Measured on the live cluster: 23.3% of key-frame captures
35087
+ * missed, 95.7% of them with `worker-lease-gone` — the raster released one
35088
+ * frame-time after delivery, with the request only p50 367 ms behind it.
35089
+ *
35090
+ * Sizing, and why this is a budget and not a duration: a scene tile is
35091
+ * ~1.5-2.5 MB at 4K (against ~23.75 MB for the raster it was cut from and
35092
+ * ~60-120 KB for a subject tile), and it is cut ~0.4 times a second per busy
35093
+ * camera — only detection-bearing frames get one. 48 MB is therefore ~20-30
35094
+ * frames, i.e. the store's 30 s TTL binds at the steady state and the budget
35095
+ * binds only through a detection burst, where it still covers well past the
35096
+ * measured p90 ask age of 4.3 s. Holding the RASTERS for the same window
35097
+ * would be ~498 MB per camera and ~6 GB at peak concurrency — the OOM this
35098
+ * whole shape exists to avoid.
35099
+ *
35100
+ * A SEPARATE ceiling from `tileBudgetMb` on purpose: a scene tile is ~20× a
35101
+ * subject tile, so one shared budget would let a busy camera's key frames
35102
+ * evict the face/plate tiles the recognisers depend on. Two budgets make that
35103
+ * impossible rather than unlikely. `0` DISABLES scene tiles and restores the
35104
+ * pre-existing behaviour, where a late full-frame request had nothing but the
35105
+ * ≤640 RAM raster — which the `keyFrame` gate rejects, so in practice it had
35106
+ * nothing.
35107
+ */
35108
+ sceneBudgetMb: number().int().min(0).max(1024)
34675
35109
  });
34676
35110
  /**
34677
35111
  * The values in force when the operator has set nothing.
@@ -34687,12 +35121,14 @@ var DEFAULT_NATIVE_LEASE_SETTINGS = {
34687
35121
  budgetMb: 1024,
34688
35122
  activityMs: 15e3,
34689
35123
  tileBudgetMb: 64,
35124
+ sceneBudgetMb: 48,
34690
35125
  admission: "inferred"
34691
35126
  };
34692
35127
  DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
34693
35128
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
34694
35129
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
34695
35130
  DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
35131
+ DEFAULT_NATIVE_LEASE_SETTINGS.sceneBudgetMb;
34696
35132
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
34697
35133
  var MB = 1024 * 1024;
34698
35134
  1024 * MB, 3072 * MB;
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-BWD82LMY.js");
5
+ const require_dist = require("../dist-DweC0Ts3.js");
6
6
  let node_crypto = require("node:crypto");
7
7
  let node_child_process = require("node:child_process");
8
8
  //#region src/ingress/tailscale-cli.ts