@camstack/addon-osd-manager 0.1.25 → 0.1.27

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-DGzuM4Vl.mjs → MotionZonesSettings-BaHVcJbF.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-CQaB7b2N.mjs → PrivacyMaskSettings-Bp4jWnFG.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-Bg7JG--H.mjs → SceneMonitorEditor-VaKlqiGB.mjs} +3 -3
  4. package/dist/_stub.js +2392 -2392
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-DxHl-19u.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-Dsmn7JiI.mjs} +4 -4
  6. package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Dcc73wc4.mjs +26 -0
  7. package/dist/{hostInit-0Chwaz22.mjs → hostInit-BBu1Mgkm.mjs} +3 -3
  8. package/dist/index.js +488 -29
  9. package/dist/index.mjs +488 -29
  10. package/dist/{player-overlays-CRBryJon.mjs → player-overlays-DgLOOYci.mjs} +1 -1
  11. package/dist/remoteEntry.js +1 -1
  12. package/dist/{responsive-D6d5-RK_.mjs → responsive-C-8_bIDl.mjs} +1 -1
  13. package/dist/{square-DnuLIdPc.mjs → square-CavMCLRh.mjs} +1 -1
  14. package/dist/{trash-2-BFV0PX5_.mjs → trash-2-DCAcPlaj.mjs} +1 -1
  15. package/dist/{use-device-snapshot-DKPoplKG.mjs → use-device-snapshot-Ji1nLnaC.mjs} +1 -1
  16. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-dxCYIXHg.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-CvAo2VBZ.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-B-12WGia.mjs +0 -26
package/dist/index.js CHANGED
@@ -7567,6 +7567,111 @@ var CameraSwitchGroupSchema = object({
7567
7567
  fetchedAt: number()
7568
7568
  });
7569
7569
  /**
7570
+ * Per-component log CHANNELS — the gate a hot path consults, and the registry
7571
+ * an addon declares its channels in.
7572
+ *
7573
+ * ## Two axes, deliberately separated
7574
+ *
7575
+ * - **DECLARATION** — which channels exist. Only the addon knows:
7576
+ * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
7577
+ * baichuan/handshake. A hand-wired central list rots at the first addition,
7578
+ * and rots silently. So a channel is declared where it is consulted, and the
7579
+ * `log-channels` capability enumerates the declarations.
7580
+ * - **VALUE** — at which level, for which scope, until when. That stays ONE
7581
+ * thing: the logging settings document on the `system` cap. Two authorities
7582
+ * over the values is the exact defect
7583
+ * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
7584
+ * remove; re-introducing it from the cure side would be grotesque.
7585
+ *
7586
+ * Nothing in this file reads a clock, an env var or a store. The registry is
7587
+ * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
7588
+ * the hot path with a value somebody actually read, and by
7589
+ * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
7590
+ * never reaches here, so it can neither disarm an armed channel nor arm a
7591
+ * disarmed one (D49).
7592
+ *
7593
+ * ## The canonical call shape
7594
+ *
7595
+ * ```ts
7596
+ * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
7597
+ * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
7598
+ * }
7599
+ * ```
7600
+ *
7601
+ * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
7602
+ * read. Disarmed, a call site costs one load and one branch, and the `extras`
7603
+ * object literal is never constructed because it lives inside the branch. It
7604
+ * is the same shape already proven in production at `stream-broker.ts:1650`,
7605
+ * and the same discipline `LoggingGate.allowsDestination` uses for the
7606
+ * destination floor (measured at 1.93 ns/call when off).
7607
+ *
7608
+ * ## Why a channel emits at `info`
7609
+ *
7610
+ * `loki-logging.addon.ts` pins the destination default at `info` and
7611
+ * `loki-destination.ts` drops everything below it, so a line emitted at
7612
+ * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
7613
+ * minutes. A diagnostic that cannot be read an hour later is worse than no
7614
+ * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
7615
+ * emits at the channel's declared level, whose schema floor is `info`.
7616
+ */
7617
+ /**
7618
+ * The level a channel writes at once armed.
7619
+ *
7620
+ * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
7621
+ * not leave the process for Loki, and the whole point of arming a channel is
7622
+ * to read it later.
7623
+ */
7624
+ var LogChannelLevelSchema = _enum([
7625
+ "info",
7626
+ "warn",
7627
+ "error"
7628
+ ]);
7629
+ /**
7630
+ * What an addon declares about one channel. No value, no state — a
7631
+ * declaration is inert.
7632
+ */
7633
+ var LogChannelDescriptorSchema = object({
7634
+ /**
7635
+ * Dotted `area.thing`, unique across the workspace. `area` is conventionally
7636
+ * the addon's short name so an operator reading a channel list can tell who
7637
+ * owns it without a second lookup.
7638
+ */
7639
+ name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
7640
+ /** One sentence: what the operator will SEE after arming it. */
7641
+ description: string().min(1),
7642
+ /** The level its lines are emitted at. Never below `info`. */
7643
+ defaultLevel: LogChannelLevelSchema,
7644
+ /**
7645
+ * Whether this channel can be narrowed to a camera.
7646
+ *
7647
+ * `true` is a PROMISE with two halves, and both must hold: the gate is
7648
+ * consulted with the numeric device id, AND every line the channel admits
7649
+ * carries `tags: { deviceId }` with that same numeric id. The second half is
7650
+ * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
7651
+ * keeps `deviceId` out of the stream labels for cardinality, so the tag in
7652
+ * the body is the only way to filter.
7653
+ *
7654
+ * A channel whose lines carry the device only in `meta` (or not at all) is
7655
+ * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
7656
+ * the operator narrows to one camera, sees nothing, and concludes the code
7657
+ * path was never taken.
7658
+ */
7659
+ perDevice: boolean()
7660
+ });
7661
+ /**
7662
+ * An armed window over one channel, as the document hands it to a mirror.
7663
+ *
7664
+ * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
7665
+ * expires by itself, which is the one failure a boolean cannot avoid.
7666
+ */
7667
+ var LogChannelWindowSchema = object({
7668
+ channel: string().min(1),
7669
+ /** Epoch ms the window closes at. */
7670
+ armedUntilMs: number(),
7671
+ /** `null` = every camera. A non-empty list narrows to those numeric ids. */
7672
+ deviceIds: array(number().int()).readonly().nullable()
7673
+ });
7674
+ /**
7570
7675
  * Ops-log — the durable, append-only operations audit shared by the
7571
7676
  * recordings and events management surfaces.
7572
7677
  *
@@ -11834,6 +11939,35 @@ var MutationFilterSchema = object({
11834
11939
  whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
11835
11940
  whereNot: record(string(), unknown()).optional()
11836
11941
  });
11942
+ /**
11943
+ * One scalar an {@link settingsStoreCapability.methods.aggregate} call asks for.
11944
+ *
11945
+ * `as` names the slot in the result, so the SAME column may be asked twice with
11946
+ * two operations (`MIN(startMs)` and `MAX(startMs)` in one round trip) — which
11947
+ * a `Record<column, op>` shape could not express.
11948
+ */
11949
+ var AggregateFieldSchema = object({
11950
+ /** Result key. */
11951
+ as: string().min(1),
11952
+ /** Column to aggregate. Must be a real column of a declared collection. */
11953
+ field: string().min(1),
11954
+ op: _enum([
11955
+ "sum",
11956
+ "min",
11957
+ "max"
11958
+ ])
11959
+ });
11960
+ /**
11961
+ * `COUNT(*)` plus one number per requested field.
11962
+ *
11963
+ * `null` means NO ROW MATCHED, never zero: a `SUM` over an empty set and a sum
11964
+ * that really is 0 are different facts, and an accounting caller that renders
11965
+ * "0 bytes, oldest = 0" for "nothing here" reports a lie about a disk.
11966
+ */
11967
+ var AggregateResultSchema = object({
11968
+ count: number().int(),
11969
+ values: record(string(), number().nullable())
11970
+ });
11837
11971
  /** A single stored record: `{ id, data }`. */
11838
11972
  var SettingsRecordSchema = object({
11839
11973
  id: string(),
@@ -12001,6 +12135,32 @@ var settingsStoreCapability = {
12001
12135
  collection: string(),
12002
12136
  filter: QueryFilterSchema.optional()
12003
12137
  }), number()),
12138
+ /**
12139
+ * `COUNT(*)` and one `SUM` / `MIN` / `MAX` per requested field, in ONE
12140
+ * statement, over the rows `filter` selects.
12141
+ *
12142
+ * Exists because "how much is there" was being answered by materialising
12143
+ * "what is there". The recorder's storage-pressure sweep asked its in-RAM
12144
+ * footage index for bytes/count/oldest/newest across a set of storage
12145
+ * locations twice a minute, and the only way to answer that from a map is
12146
+ * to visit every row — 7.1 M of them on the live hub, ~15 M row visits a
12147
+ * minute on the main thread, which is also why the whole archive had to
12148
+ * stay resident to be visited. The question is a sum; nothing needs to be
12149
+ * materialised to answer it.
12150
+ *
12151
+ * **The engine REFUSES a field it cannot serve**, exactly as
12152
+ * `query.columns` does and unlike a PREDICATE, which is skipped when
12153
+ * unresolvable. A dropped predicate over-matches and the caller sees extra
12154
+ * rows; a dropped aggregate returns a NUMBER that is wrong and looks
12155
+ * exactly like a real one. That asymmetry is what this repo has already
12156
+ * paid for once in `count`.
12157
+ */
12158
+ aggregate: method(object({
12159
+ namespace: string().optional(),
12160
+ collection: string(),
12161
+ fields: array(AggregateFieldSchema).readonly(),
12162
+ filter: QueryFilterSchema.optional()
12163
+ }), AggregateResultSchema),
12004
12164
  /** Grouped counts per ((field-origin)/bucketSize) bucket, filtered. */
12005
12165
  histogram: method(object({
12006
12166
  namespace: string().optional(),
@@ -12207,6 +12367,15 @@ var dataStoreProviderCapability = {
12207
12367
  collection: string(),
12208
12368
  filter: QueryFilterSchema.optional()
12209
12369
  }), number(), { auth: "admin" }),
12370
+ /** `COUNT(*)` plus one SUM/MIN/MAX per field, in one statement. Mirror of
12371
+ * `settings-store.aggregate` — see it for why an unresolvable field is
12372
+ * refused rather than dropped. */
12373
+ aggregate: method(object({
12374
+ namespace: string().optional(),
12375
+ collection: string(),
12376
+ fields: array(AggregateFieldSchema).readonly(),
12377
+ filter: QueryFilterSchema.optional()
12378
+ }), AggregateResultSchema, { auth: "admin" }),
12210
12379
  /** Grouped counts per ((field-origin)/bucketSize) bucket, filtered. */
12211
12380
  histogram: method(object({
12212
12381
  namespace: string().optional(),
@@ -12984,24 +13153,6 @@ var deviceProviderCapability = {
12984
13153
  })
12985
13154
  }
12986
13155
  };
12987
- /**
12988
- * Device Manager capability — hub-side singleton that unifies device persistence,
12989
- * live registry access, and all management operations into a single tRPC surface.
12990
- *
12991
- * Replaces:
12992
- * - `device-persistence` capability (persistence methods absorbed here)
12993
- * - `device-management.router.ts` (deleted in Phase 2)
12994
- * - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
12995
- *
12996
- * All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
12997
- * fork into separate processes but never run on remote cluster agents. Therefore:
12998
- * - No nodeId routing needed — this is a pure hub singleton.
12999
- * - The hub's DeviceRegistry is the single source of truth for all live devices.
13000
- * - No shadow registry or cross-node aggregation required.
13001
- *
13002
- * Forked workers register devices back to the hub via `ctx.devices`
13003
- * (DeviceManagerApi → ctx.api.deviceManager.registerDevice), same as today.
13004
- */
13005
13156
  /** One child-placement directive on a container's `childLayout`. Structurally
13006
13157
  * identical to `ChildLayoutEntry` in `device-management.ts` — the cap wire
13007
13158
  * shape for the same field. The child is identified by its re-sync-stable
@@ -13513,6 +13664,39 @@ var deviceManagerCapability = {
13513
13664
  /** List children of a parent device (by parent numeric id). */
13514
13665
  getChildren: method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)),
13515
13666
  /**
13667
+ * `getChildren` for a NAMED SET of parents, in one call.
13668
+ *
13669
+ * The accessory reconcile in `device-cap-proxy.ts` asks this question once
13670
+ * per registered device — every `BaseDevice` inherits a
13671
+ * `getAccessoryChildren()` that returns `[]`, so even a leaf accessory
13672
+ * pays a round-trip to learn it has nothing to prune. Measured on the live
13673
+ * hub 2026-08-27 over a 120-second boot window, fleet of 1 017 devices:
13674
+ * `DeviceRowStore.list < DeviceRowStore.listByParent < getChildren` at
13675
+ * **1 024 calls** returning **919 rows in total** — 1 024 RPCs and 1 024
13676
+ * indexed scans to move less than one row each. `listByParentMany`
13677
+ * collapses the scans; this collapses the RPCs.
13678
+ *
13679
+ * Keyed by parent id as a STRING — a JSON object cannot key by number
13680
+ * (same reason as `getDeviceStatusAggregateBatch`). The per-parent value
13681
+ * is exactly what `getChildren` returns for that parent.
13682
+ *
13683
+ * A parent with no children — or one the fleet does not know — is ABSENT
13684
+ * from the record, never an invented empty row: the same contract as
13685
+ * `DeviceRowStore.getMany`/`listByParentMany`. An EMPTY `parentDeviceIds`
13686
+ * reads nothing at all rather than degrading to "every device".
13687
+ *
13688
+ * `parentDeviceIds` is capped at {@link DEVICE_CHILDREN_BATCH_MAX} — see
13689
+ * that constant for why. A caller with more parents than that sends more
13690
+ * than one call; it never sends one pathological one.
13691
+ *
13692
+ * Version skew: this is a NEW method, not a new field on `getChildren`, so
13693
+ * a hub that predates it answers NOT_FOUND rather than silently stripping
13694
+ * an unknown input key and answering a DIFFERENT question. The kernel-side
13695
+ * loader degrades to per-parent `getChildren` on that error — see
13696
+ * `children-batch-loader.ts`.
13697
+ */
13698
+ getChildrenBatch: method(object({ parentDeviceIds: array(number()).max(256) }), record(string(), array(DeviceInfoSchema))),
13699
+ /**
13516
13700
  * Resolve the devices LINKED to a camera — the single policy authority
13517
13701
  * both consumers call (viewer devices panel + pipeline-analytics event
13518
13702
  * kinds/ingest). Device-tree children are ALWAYS included; mode 'auto'
@@ -14660,6 +14844,80 @@ var llmCapability = {
14660
14844
  })
14661
14845
  }
14662
14846
  };
14847
+ /**
14848
+ * `log-channels` — the capability an addon DECLARES its diagnostic channels
14849
+ * through. It stores nothing.
14850
+ *
14851
+ * ## Why a capability at all, and why this shape
14852
+ *
14853
+ * Which channels exist is knowledge only the addon has: `stream-broker` knows
14854
+ * webrtc/ICE/RTP, `provider-reolink` knows baichuan/handshake. A central list
14855
+ * maintained by hand rots at the first addition and rots INVISIBLY — nothing
14856
+ * fails, an operator just never sees the channel somebody added. So the list
14857
+ * is assembled from declarations at runtime.
14858
+ *
14859
+ * The shape is copied from `log-destination.cap.ts`, which already does
14860
+ * exactly this job: `mode: 'collection'`, `internal: true`,
14861
+ * `mount: { kind: 'skip' }` — no tRPC route, no generated hooks — while
14862
+ * `addons.listCapabilityProviders` still enumerates it, and the hub's
14863
+ * `CapabilityRegistry` still holds an RPC proxy per provider so a forked
14864
+ * runner's declarations reach hub-main over the transport that already exists.
14865
+ * No new UDS message, no second registry.
14866
+ *
14867
+ * ## What it deliberately does NOT own
14868
+ *
14869
+ * The VALUES — which channel is armed, for which cameras, until when — live in
14870
+ * ONE place: the logging settings document on the `system` cap
14871
+ * (`getLoggingSettings` / `setLoggingSettings`). Two authorities over the same
14872
+ * value is the defect the plan behind this work exists to remove, and
14873
+ * `setRequestCensus` was retired (D245) rather than allowed to be a second
14874
+ * one. {@link logChannelsCapability} therefore has no getter for a level, no
14875
+ * setter for a window and no persistence of any kind.
14876
+ *
14877
+ * ## Why `apply` is here even so
14878
+ *
14879
+ * The gate lives in the addon's PROCESS; the document lives in hub-main. Some
14880
+ * seam has to carry the value from the authority to the mirror, and a channel
14881
+ * that cannot be reached is precisely the dead knob this whole slice exists to
14882
+ * make impossible (D62 — `audioThresholdDbfs`, the HA entities with no source).
14883
+ * `apply` is that seam and nothing more: it writes an in-memory mirror, it
14884
+ * persists nothing, it is never the source of a value, and it is called only
14885
+ * with a set the hub actually read (D49 — a read that fails does not call it
14886
+ * at all, so no channel is silently disarmed by a bad read).
14887
+ */
14888
+ /** What `apply` reports back — enough to log, not enough to be a second state. */
14889
+ var LogChannelApplyResultSchema = object({
14890
+ /** How many declared channels are armed in this process after the call. */
14891
+ armed: number().int().min(0),
14892
+ /**
14893
+ * Names the document armed that this process does not declare. Reported
14894
+ * rather than swallowed: a name here is either a typo or an addon that has
14895
+ * not booted, and both deserve a line instead of silence.
14896
+ */
14897
+ unknown: array(string()).readonly()
14898
+ });
14899
+ var logChannelsCapability = {
14900
+ name: "log-channels",
14901
+ scope: "system",
14902
+ mode: "collection",
14903
+ internal: true,
14904
+ methods: {
14905
+ /** The channels this addon declares. Inert: no value, no state. */
14906
+ list: method(_void(), array(LogChannelDescriptorSchema).readonly()),
14907
+ /**
14908
+ * Refresh this process's mirror from the document's FULL set of armed
14909
+ * windows.
14910
+ *
14911
+ * Full and not incremental on purpose: the document is the authority, so a
14912
+ * channel it does not name is disarmed here. An incremental apply would
14913
+ * let a disarm get lost in transit and leave a channel running that
14914
+ * nobody can see is running.
14915
+ */
14916
+ apply: method(object({ windows: array(LogChannelWindowSchema).readonly() }), LogChannelApplyResultSchema, { kind: "mutation" })
14917
+ },
14918
+ /** In-process only — enumerated through `addons.listCapabilityProviders`. */
14919
+ mount: { kind: "skip" }
14920
+ };
14663
14921
  var LogLevelSchema = _enum([
14664
14922
  "debug",
14665
14923
  "info",
@@ -33196,17 +33454,60 @@ var SetSiteLocationInputSchema = object({
33196
33454
  longitude: number().min(-180).max(180)
33197
33455
  }).nullable();
33198
33456
  /**
33199
- * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
33457
+ * The TRANSPORT a call arrived on.
33458
+ *
33459
+ * Every counted call carries exactly one of these, and `unknown` is a PLANE
33460
+ * rather than a gap: a plane that cannot attribute a call declares it here, so
33461
+ * the call lands in a named bucket instead of vanishing. `planes` summing to
33462
+ * `procedureCalls` is what makes "the sum of the planes explains the total"
33463
+ * checkable rather than asserted.
33464
+ *
33465
+ * - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
33466
+ * - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
33467
+ * connection; the viewer talks to the hub over `wsLink`
33468
+ * exclusively, so this is the plane the HTTP census could not see.
33469
+ * - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
33470
+ * never touches a socket and therefore never touched a census.
33471
+ * - `unknown` — counted, plane undecidable. No hook produces it today, and
33472
+ * that is exactly what its `0` asserts: every plane the hub has can name
33473
+ * itself. It is an output bucket, never a knob — a call that arrives on a
33474
+ * plane nobody instrumented lands here instead of vanishing from the total.
33475
+ */
33476
+ var TransportPlaneSchema = _enum([
33477
+ "http",
33478
+ "ws",
33479
+ "mesh",
33480
+ "unknown"
33481
+ ]);
33482
+ /**
33483
+ * Calls per plane. Every key is always present, `0` included — an absent plane
33484
+ * reads as "not instrumented", which is the one thing this census must never
33485
+ * make an operator wonder about.
33486
+ */
33487
+ var TransportPlaneCountsSchema = object({
33488
+ http: number(),
33489
+ ws: number(),
33490
+ mesh: number(),
33491
+ unknown: number()
33492
+ });
33493
+ /**
33494
+ * One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
33200
33495
  * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
33201
33496
  * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
33202
33497
  * already prints - never a token, never an `Authorization` header.
33498
+ *
33499
+ * `subscriptions` is counted APART from `calls`: a subscription is opened once
33500
+ * and lives for hours, so folding it into a call count makes one long-lived
33501
+ * stream look like a storm.
33203
33502
  */
33204
33503
  var RequestCensusGroupSchema = object({
33504
+ plane: TransportPlaneSchema,
33205
33505
  procedure: string(),
33206
33506
  userAgent: string(),
33207
33507
  ip: string(),
33208
33508
  principal: string(),
33209
33509
  calls: number(),
33510
+ subscriptions: number(),
33210
33511
  perMin: number()
33211
33512
  });
33212
33513
  /**
@@ -33219,6 +33520,14 @@ var RequestCensusGroupSchema = object({
33219
33520
  var RequestCensusProcedureSchema = object({
33220
33521
  procedure: string(),
33221
33522
  calls: number(),
33523
+ /**
33524
+ * The same total, split by transport. THIS is the row that answers the
33525
+ * question the census exists for: one look at `deviceManager.listAll` says
33526
+ * which plane carried the 4 960, without joining two log lines by eye.
33527
+ */
33528
+ planes: TransportPlaneCountsSchema,
33529
+ /** Subscription STARTS on this procedure. Never folded into `calls`. */
33530
+ subscriptions: number(),
33222
33531
  perMin: number()
33223
33532
  });
33224
33533
  /**
@@ -33246,14 +33555,45 @@ var RequestCensusStatusSchema = object({
33246
33555
  */
33247
33556
  procedureCalls: number(),
33248
33557
  /**
33558
+ * `procedureCalls` split by transport. The four keys sum to
33559
+ * `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
33560
+ * `planesExplainTotal` is that identity, checked rather than assumed.
33561
+ */
33562
+ planes: TransportPlaneCountsSchema,
33563
+ /**
33564
+ * True iff `planes` sums to `procedureCalls`. False means a call was counted
33565
+ * on no plane at all - which is a RESULT (a plane is missing from the
33566
+ * instrument), not a failure, and it has to be visible to be read as one.
33567
+ */
33568
+ planesExplainTotal: boolean(),
33569
+ /**
33249
33570
  * 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.
33571
+ * adapter resolves one context per connection - kept because a plane's call
33572
+ * count of zero against 37 open connections says something different from a
33573
+ * plane with no connections at all.
33252
33574
  */
33253
33575
  wsConnections: number(),
33576
+ /**
33577
+ * Client frames the WS plane looked at. `wsMessages` far above
33578
+ * `planes.ws + subscriptions` means most traffic is not operations
33579
+ * (keepalives, connection params) - which is itself an answer.
33580
+ */
33581
+ wsMessages: number(),
33582
+ /**
33583
+ * Subscription STARTS across every plane, excluded from `procedureCalls` on
33584
+ * purpose: one live-events stream opened at boot and held for six hours is
33585
+ * one subscription, and counting it as a call would let a quiet plane
33586
+ * masquerade as the storm.
33587
+ */
33588
+ subscriptions: number(),
33589
+ /** `subscription.stop` frames. Starts minus stops is what is still open. */
33590
+ subscriptionStops: number(),
33254
33591
  distinctGroups: number(),
33255
- /** Calls counted in the totals whose group attribution was shed at the
33256
- * cardinality bound. */
33592
+ /**
33593
+ * Operations counted in the totals whose CALLER attribution was shed at the
33594
+ * cardinality bound. Unrelated to the `unknown` PLANE: these calls know
33595
+ * which transport they arrived on, they just lost their group row.
33596
+ */
33257
33597
  unattributedCalls: number(),
33258
33598
  procedures: array(RequestCensusProcedureSchema).readonly(),
33259
33599
  groups: array(RequestCensusGroupSchema).readonly()
@@ -33276,10 +33616,11 @@ var DiagnosticIdSchema = _enum(["request-census"]);
33276
33616
  * The layers of the level hierarchy, general → specific. The most specific
33277
33617
  * layer that carries an explicit value wins.
33278
33618
  *
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.
33619
+ * `component` became RESOLVABLE on 2026-08-27: a component is a declared log
33620
+ * CHANNEL (`stream-broker.webrtc`, `provider-reolink.baichuan`), named by
33621
+ * `scopeComponent`. It was declared-but-dark in the first slice precisely so
33622
+ * that turning it on would not force every consumer of this document to widen
33623
+ * a `levelSource` enum — which is what has now not happened.
33283
33624
  */
33284
33625
  var LoggingScopeKindSchema = _enum([
33285
33626
  "cluster",
@@ -33306,6 +33647,14 @@ var LoggingLevelLayerSchema = object({
33306
33647
  scope: LoggingScopeKindSchema,
33307
33648
  /** The node this layer speaks for; `null` on the cluster layer. */
33308
33649
  nodeId: string().nullable(),
33650
+ /**
33651
+ * The declared channel this layer speaks for; `null` on every layer but
33652
+ * `component`. Never folded into `nodeId`: a component level is CLUSTER-WIDE
33653
+ * by design — the convention this repo settled on is one orchestrator-wide
33654
+ * setting, never per node (D52) — so a component layer that carried a node
33655
+ * would invite a per-node copy of a value that has no per-node meaning.
33656
+ */
33657
+ component: string().nullable(),
33309
33658
  /** Explicitly set here, or `null` when this layer inherits. */
33310
33659
  level: LogLevelSchema$1.nullable()
33311
33660
  });
@@ -33347,6 +33696,49 @@ var DiagnosticWindowPatchSchema = object({
33347
33696
  reportEveryMs: number().int().positive().optional()
33348
33697
  });
33349
33698
  /**
33699
+ * A channel ARMED, as the document reports it.
33700
+ *
33701
+ * `armMs` is not echoed back: what an operator needs to see is the deadline
33702
+ * and the time left, because a diagnostic left running is itself an incident
33703
+ * and "armed for 10 minutes" said an hour ago is not an answer.
33704
+ */
33705
+ var LogChannelWindowStateSchema = object({
33706
+ channel: string(),
33707
+ armed: boolean(),
33708
+ /** Epoch ms the window closes at. 0 when disarmed. */
33709
+ armedUntilMs: number(),
33710
+ /** Ms left before it expires on its own. 0 when disarmed. */
33711
+ remainingMs: number(),
33712
+ /**
33713
+ * The cameras it is narrowed to, or `null` for every camera.
33714
+ *
33715
+ * A channel declared `perDevice: false` can only ever report `null` here:
33716
+ * its lines do not carry `tags: { deviceId }`, so narrowing them would
33717
+ * produce a filter that silently matches nothing. The server REFUSES such a
33718
+ * patch rather than quietly widening it — ignoring the request would teach
33719
+ * the operator that per-camera filtering works on that channel when it does
33720
+ * not.
33721
+ */
33722
+ deviceIds: array(number().int()).readonly().nullable()
33723
+ });
33724
+ /**
33725
+ * `armMs: 0` DISARMS. Same grammar as {@link DiagnosticWindowPatchSchema}, and
33726
+ * for the same reason: a channel is a window with a deadline, never a switch.
33727
+ */
33728
+ var LogChannelWindowPatchSchema = object({
33729
+ channel: string().min(1),
33730
+ armMs: number().int().min(0),
33731
+ /**
33732
+ * Narrow to these numeric device ids. Absent or `null` = every camera.
33733
+ *
33734
+ * Numeric because the repo's own rule makes it possible: every log line
33735
+ * about a device carries `tags: { deviceId }` with the numeric id. That rule
33736
+ * was paid for with a 22% thumbnail gap and a 3-hour media blackout both
33737
+ * diagnosed by hand, and this is the first thing that collects on it.
33738
+ */
33739
+ deviceIds: array(number().int()).readonly().nullable().optional()
33740
+ });
33741
+ /**
33350
33742
  * A PATCH, and patches MERGE.
33351
33743
  *
33352
33744
  * A field absent from the patch is left exactly as it was — arming a
@@ -33365,7 +33757,14 @@ var LoggingSettingsPatchSchema = object({
33365
33757
  * Only the diagnostics NAMED here change. An armed window that is not listed
33366
33758
  * keeps running — a patch is never a full replacement.
33367
33759
  */
33368
- diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
33760
+ diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional(),
33761
+ /**
33762
+ * Only the channels NAMED here change. An armed channel that is not listed
33763
+ * keeps running — same rule as `diagnostics`, because a patch that silently
33764
+ * disarmed the channels it did not mention would make the Levels page and
33765
+ * the Diagnostics page fight over the same value.
33766
+ */
33767
+ channels: array(LogChannelWindowPatchSchema).readonly().optional()
33369
33768
  });
33370
33769
  /**
33371
33770
  * Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
@@ -33378,9 +33777,22 @@ var LoggingSettingsPatchSchema = object({
33378
33777
  * authority over the whole hierarchy and answers for every layer, so the
33379
33778
  * layer selector needs a name the transport does not already own.
33380
33779
  */
33381
- var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
33780
+ var GetLoggingSettingsInputSchema = object({
33781
+ scopeNodeId: string().optional(),
33782
+ /**
33783
+ * The declared CHANNEL this document is addressed at, when the caller wants
33784
+ * the `component` layer. Absent = the node/cluster hierarchy only.
33785
+ *
33786
+ * Naming it separately rather than overloading `scopeNodeId` keeps the two
33787
+ * axes from collapsing: a component level is cluster-wide, a node level is
33788
+ * not, and one selector for both would make "which of these two did I just
33789
+ * set" unanswerable — the exact ambiguity `explicit` exists to remove.
33790
+ */
33791
+ scopeComponent: string().optional()
33792
+ });
33382
33793
  var SetLoggingSettingsInputSchema = object({
33383
33794
  scopeNodeId: string().optional(),
33795
+ scopeComponent: string().optional(),
33384
33796
  patch: LoggingSettingsPatchSchema
33385
33797
  });
33386
33798
  /**
@@ -33395,9 +33807,20 @@ var SetLoggingSettingsInputSchema = object({
33395
33807
  var LoggingSettingsStateSchema = object({
33396
33808
  /** The layer this document was read at. `null` = the cluster layer. */
33397
33809
  scopeNodeId: string().nullable(),
33810
+ /** The channel this document was read at. `null` = no component layer. */
33811
+ scopeComponent: string().nullable(),
33398
33812
  effective: LoggingEffectiveSchema,
33399
33813
  explicit: LoggingExplicitSchema,
33400
33814
  activeWindows: array(DiagnosticWindowSchema).readonly(),
33815
+ /**
33816
+ * Every channel the cluster's addons DECLARE, gathered from the
33817
+ * `log-channels` providers. Not stored anywhere: assembled per read, so a
33818
+ * channel added by a redeployed addon appears without anybody editing a
33819
+ * list, and a channel whose addon is gone stops being offered.
33820
+ */
33821
+ channels: array(LogChannelDescriptorSchema).readonly(),
33822
+ /** The channels ARMED right now, each with its deadline. */
33823
+ activeChannels: array(LogChannelWindowStateSchema).readonly(),
33401
33824
  persisted: boolean()
33402
33825
  });
33403
33826
  var systemCapability = {
@@ -34706,6 +35129,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
34706
35129
  llmRuntimeCapability,
34707
35130
  localNetworkCapability,
34708
35131
  lockControlCapability,
35132
+ logChannelsCapability,
34709
35133
  logDestinationCapability,
34710
35134
  loginMethodCapability,
34711
35135
  mediaPlayerCapability,
@@ -35672,6 +36096,12 @@ Object.freeze({
35672
36096
  addonId: null,
35673
36097
  access: "view"
35674
36098
  },
36099
+ "dataStoreProvider.aggregate": {
36100
+ capName: "data-store-provider",
36101
+ capScope: "system",
36102
+ addonId: null,
36103
+ access: "view"
36104
+ },
35675
36105
  "dataStoreProvider.count": {
35676
36106
  capName: "data-store-provider",
35677
36107
  capScope: "system",
@@ -36086,6 +36516,12 @@ Object.freeze({
36086
36516
  addonId: null,
36087
36517
  access: "view"
36088
36518
  },
36519
+ "deviceManager.getChildrenBatch": {
36520
+ capName: "device-manager",
36521
+ capScope: "system",
36522
+ addonId: null,
36523
+ access: "view"
36524
+ },
36089
36525
  "deviceManager.getConfigSchema": {
36090
36526
  capName: "device-manager",
36091
36527
  capScope: "system",
@@ -37136,6 +37572,18 @@ Object.freeze({
37136
37572
  addonId: null,
37137
37573
  access: "create"
37138
37574
  },
37575
+ "logChannels.apply": {
37576
+ capName: "log-channels",
37577
+ capScope: "system",
37578
+ addonId: null,
37579
+ access: "create"
37580
+ },
37581
+ "logChannels.list": {
37582
+ capName: "log-channels",
37583
+ capScope: "system",
37584
+ addonId: null,
37585
+ access: "view"
37586
+ },
37139
37587
  "logDestination.query": {
37140
37588
  capName: "log-destination",
37141
37589
  capScope: "system",
@@ -39290,6 +39738,12 @@ Object.freeze({
39290
39738
  addonId: null,
39291
39739
  access: "create"
39292
39740
  },
39741
+ "settingsStore.aggregate": {
39742
+ capName: "settings-store",
39743
+ capScope: "system",
39744
+ addonId: null,
39745
+ access: "view"
39746
+ },
39293
39747
  "settingsStore.count": {
39294
39748
  capName: "settings-store",
39295
39749
  capScope: "system",
@@ -40869,6 +41323,11 @@ Object.freeze({
40869
41323
  form: "single",
40870
41324
  optional: false
40871
41325
  }],
41326
+ "deviceManager.getChildrenBatch": [{
41327
+ name: "parentDeviceIds",
41328
+ form: "array",
41329
+ optional: false
41330
+ }],
40872
41331
  "deviceManager.getConfigSchema": [{
40873
41332
  name: "deviceId",
40874
41333
  form: "single",