@camstack/addon-model-studio 1.1.46 → 1.1.48

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-DatYL4fO.mjs → MotionZonesSettings-nSvd3wgP.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-B-voWing.mjs → PrivacyMaskSettings-DpUECTGc.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-B9pWKzVY.mjs → SceneMonitorEditor-BYUThwmI.mjs} +3 -3
  4. package/dist/_stub.js +147 -147
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-DuCWAiYv.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-CxnjpyLl.mjs} +4 -4
  6. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-D5YltPmo.mjs +26 -0
  7. package/dist/{hostInit-NwYsxI8A.mjs → hostInit-Dx9Oh7tu.mjs} +3 -3
  8. package/dist/model-studio.addon.js +409 -30
  9. package/dist/model-studio.addon.mjs +409 -30
  10. package/dist/{player-overlays-BpSi3fah.mjs → player-overlays-DxPiRDNZ.mjs} +1 -1
  11. package/dist/remoteEntry.js +1 -1
  12. package/dist/{responsive-CpGiOR9P.mjs → responsive-ChIDJ7ve.mjs} +1 -1
  13. package/dist/{square-BuNcSEVL.mjs → square-CpAXUT52.mjs} +1 -1
  14. package/dist/{trash-2-DgoF37KH.mjs → trash-2-siK2nOpd.mjs} +1 -1
  15. package/dist/{use-device-snapshot-pFUT6-FP.mjs → use-device-snapshot-CLLnyzyW.mjs} +1 -1
  16. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-Ddkj3KLy.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-DZ9FPtvZ.mjs} +1 -1
  17. package/package.json +1 -1
  18. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-hvsEgbZS.mjs +0 -26
@@ -8130,6 +8130,111 @@ var CameraSwitchGroupSchema = object({
8130
8130
  fetchedAt: number()
8131
8131
  });
8132
8132
  /**
8133
+ * Per-component log CHANNELS — the gate a hot path consults, and the registry
8134
+ * an addon declares its channels in.
8135
+ *
8136
+ * ## Two axes, deliberately separated
8137
+ *
8138
+ * - **DECLARATION** — which channels exist. Only the addon knows:
8139
+ * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
8140
+ * baichuan/handshake. A hand-wired central list rots at the first addition,
8141
+ * and rots silently. So a channel is declared where it is consulted, and the
8142
+ * `log-channels` capability enumerates the declarations.
8143
+ * - **VALUE** — at which level, for which scope, until when. That stays ONE
8144
+ * thing: the logging settings document on the `system` cap. Two authorities
8145
+ * over the values is the exact defect
8146
+ * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
8147
+ * remove; re-introducing it from the cure side would be grotesque.
8148
+ *
8149
+ * Nothing in this file reads a clock, an env var or a store. The registry is
8150
+ * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
8151
+ * the hot path with a value somebody actually read, and by
8152
+ * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
8153
+ * never reaches here, so it can neither disarm an armed channel nor arm a
8154
+ * disarmed one (D49).
8155
+ *
8156
+ * ## The canonical call shape
8157
+ *
8158
+ * ```ts
8159
+ * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
8160
+ * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
8161
+ * }
8162
+ * ```
8163
+ *
8164
+ * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
8165
+ * read. Disarmed, a call site costs one load and one branch, and the `extras`
8166
+ * object literal is never constructed because it lives inside the branch. It
8167
+ * is the same shape already proven in production at `stream-broker.ts:1650`,
8168
+ * and the same discipline `LoggingGate.allowsDestination` uses for the
8169
+ * destination floor (measured at 1.93 ns/call when off).
8170
+ *
8171
+ * ## Why a channel emits at `info`
8172
+ *
8173
+ * `loki-logging.addon.ts` pins the destination default at `info` and
8174
+ * `loki-destination.ts` drops everything below it, so a line emitted at
8175
+ * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
8176
+ * minutes. A diagnostic that cannot be read an hour later is worse than no
8177
+ * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
8178
+ * emits at the channel's declared level, whose schema floor is `info`.
8179
+ */
8180
+ /**
8181
+ * The level a channel writes at once armed.
8182
+ *
8183
+ * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
8184
+ * not leave the process for Loki, and the whole point of arming a channel is
8185
+ * to read it later.
8186
+ */
8187
+ var LogChannelLevelSchema = _enum([
8188
+ "info",
8189
+ "warn",
8190
+ "error"
8191
+ ]);
8192
+ /**
8193
+ * What an addon declares about one channel. No value, no state — a
8194
+ * declaration is inert.
8195
+ */
8196
+ var LogChannelDescriptorSchema = object({
8197
+ /**
8198
+ * Dotted `area.thing`, unique across the workspace. `area` is conventionally
8199
+ * the addon's short name so an operator reading a channel list can tell who
8200
+ * owns it without a second lookup.
8201
+ */
8202
+ name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
8203
+ /** One sentence: what the operator will SEE after arming it. */
8204
+ description: string().min(1),
8205
+ /** The level its lines are emitted at. Never below `info`. */
8206
+ defaultLevel: LogChannelLevelSchema,
8207
+ /**
8208
+ * Whether this channel can be narrowed to a camera.
8209
+ *
8210
+ * `true` is a PROMISE with two halves, and both must hold: the gate is
8211
+ * consulted with the numeric device id, AND every line the channel admits
8212
+ * carries `tags: { deviceId }` with that same numeric id. The second half is
8213
+ * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
8214
+ * keeps `deviceId` out of the stream labels for cardinality, so the tag in
8215
+ * the body is the only way to filter.
8216
+ *
8217
+ * A channel whose lines carry the device only in `meta` (or not at all) is
8218
+ * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
8219
+ * the operator narrows to one camera, sees nothing, and concludes the code
8220
+ * path was never taken.
8221
+ */
8222
+ perDevice: boolean()
8223
+ });
8224
+ /**
8225
+ * An armed window over one channel, as the document hands it to a mirror.
8226
+ *
8227
+ * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
8228
+ * expires by itself, which is the one failure a boolean cannot avoid.
8229
+ */
8230
+ var LogChannelWindowSchema = object({
8231
+ channel: string().min(1),
8232
+ /** Epoch ms the window closes at. */
8233
+ armedUntilMs: number(),
8234
+ /** `null` = every camera. A non-empty list narrows to those numeric ids. */
8235
+ deviceIds: array(number().int()).readonly().nullable()
8236
+ });
8237
+ /**
8133
8238
  * Ops-log — the durable, append-only operations audit shared by the
8134
8239
  * recordings and events management surfaces.
8135
8240
  *
@@ -11704,6 +11809,35 @@ var MutationFilterSchema = object({
11704
11809
  whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
11705
11810
  whereNot: record(string(), unknown()).optional()
11706
11811
  });
11812
+ /**
11813
+ * One scalar an {@link settingsStoreCapability.methods.aggregate} call asks for.
11814
+ *
11815
+ * `as` names the slot in the result, so the SAME column may be asked twice with
11816
+ * two operations (`MIN(startMs)` and `MAX(startMs)` in one round trip) — which
11817
+ * a `Record<column, op>` shape could not express.
11818
+ */
11819
+ var AggregateFieldSchema = object({
11820
+ /** Result key. */
11821
+ as: string().min(1),
11822
+ /** Column to aggregate. Must be a real column of a declared collection. */
11823
+ field: string().min(1),
11824
+ op: _enum([
11825
+ "sum",
11826
+ "min",
11827
+ "max"
11828
+ ])
11829
+ });
11830
+ /**
11831
+ * `COUNT(*)` plus one number per requested field.
11832
+ *
11833
+ * `null` means NO ROW MATCHED, never zero: a `SUM` over an empty set and a sum
11834
+ * that really is 0 are different facts, and an accounting caller that renders
11835
+ * "0 bytes, oldest = 0" for "nothing here" reports a lie about a disk.
11836
+ */
11837
+ var AggregateResultSchema = object({
11838
+ count: number().int(),
11839
+ values: record(string(), number().nullable())
11840
+ });
11707
11841
  /** A single stored record: `{ id, data }`. */
11708
11842
  var SettingsRecordSchema = object({
11709
11843
  id: string(),
@@ -11788,6 +11922,11 @@ method(object({
11788
11922
  collection: string(),
11789
11923
  filter: QueryFilterSchema.optional()
11790
11924
  }), number()), method(object({
11925
+ namespace: string().optional(),
11926
+ collection: string(),
11927
+ fields: array(AggregateFieldSchema).readonly(),
11928
+ filter: QueryFilterSchema.optional()
11929
+ }), AggregateResultSchema), method(object({
11791
11930
  namespace: string().optional(),
11792
11931
  collection: string(),
11793
11932
  field: string(),
@@ -11904,6 +12043,11 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
11904
12043
  collection: string(),
11905
12044
  filter: QueryFilterSchema.optional()
11906
12045
  }), number(), { auth: "admin" }), method(object({
12046
+ namespace: string().optional(),
12047
+ collection: string(),
12048
+ fields: array(AggregateFieldSchema).readonly(),
12049
+ filter: QueryFilterSchema.optional()
12050
+ }), AggregateResultSchema, { auth: "admin" }), method(object({
11907
12051
  namespace: string().optional(),
11908
12052
  collection: string(),
11909
12053
  field: string(),
@@ -12465,24 +12609,6 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
12465
12609
  kind: "mutation",
12466
12610
  auth: "admin"
12467
12611
  });
12468
- /**
12469
- * Device Manager capability — hub-side singleton that unifies device persistence,
12470
- * live registry access, and all management operations into a single tRPC surface.
12471
- *
12472
- * Replaces:
12473
- * - `device-persistence` capability (persistence methods absorbed here)
12474
- * - `device-management.router.ts` (deleted in Phase 2)
12475
- * - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
12476
- *
12477
- * All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
12478
- * fork into separate processes but never run on remote cluster agents. Therefore:
12479
- * - No nodeId routing needed — this is a pure hub singleton.
12480
- * - The hub's DeviceRegistry is the single source of truth for all live devices.
12481
- * - No shadow registry or cross-node aggregation required.
12482
- *
12483
- * Forked workers register devices back to the hub via `ctx.devices`
12484
- * (DeviceManagerApi → ctx.api.deviceManager.registerDevice), same as today.
12485
- */
12486
12612
  /** One child-placement directive on a container's `childLayout`. Structurally
12487
12613
  * identical to `ChildLayoutEntry` in `device-management.ts` — the cap wire
12488
12614
  * shape for the same field. The child is identified by its re-sync-stable
@@ -12851,7 +12977,7 @@ method(object({
12851
12977
  * it answers today and the caller filters as it already does.
12852
12978
  */
12853
12979
  deviceIds: array(number()).optional()
12854
- }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), object({
12980
+ }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ parentDeviceIds: array(number()).max(256) }), record(string(), array(DeviceInfoSchema))), method(object({ deviceId: number() }), object({
12855
12981
  mode: LinkedDevicesModeSchema,
12856
12982
  devices: array(LinkedDeviceSchema)
12857
12983
  })), method(object({ deviceIds: array(number()) }), array(LinkedDevicesForDeviceSchema)), method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema)), method(object({ deviceId: number() }), ConfigUISchemaOutput), method(object({
@@ -13575,6 +13701,59 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
13575
13701
  kind: "mutation",
13576
13702
  auth: "admin"
13577
13703
  });
13704
+ /**
13705
+ * `log-channels` — the capability an addon DECLARES its diagnostic channels
13706
+ * through. It stores nothing.
13707
+ *
13708
+ * ## Why a capability at all, and why this shape
13709
+ *
13710
+ * Which channels exist is knowledge only the addon has: `stream-broker` knows
13711
+ * webrtc/ICE/RTP, `provider-reolink` knows baichuan/handshake. A central list
13712
+ * maintained by hand rots at the first addition and rots INVISIBLY — nothing
13713
+ * fails, an operator just never sees the channel somebody added. So the list
13714
+ * is assembled from declarations at runtime.
13715
+ *
13716
+ * The shape is copied from `log-destination.cap.ts`, which already does
13717
+ * exactly this job: `mode: 'collection'`, `internal: true`,
13718
+ * `mount: { kind: 'skip' }` — no tRPC route, no generated hooks — while
13719
+ * `addons.listCapabilityProviders` still enumerates it, and the hub's
13720
+ * `CapabilityRegistry` still holds an RPC proxy per provider so a forked
13721
+ * runner's declarations reach hub-main over the transport that already exists.
13722
+ * No new UDS message, no second registry.
13723
+ *
13724
+ * ## What it deliberately does NOT own
13725
+ *
13726
+ * The VALUES — which channel is armed, for which cameras, until when — live in
13727
+ * ONE place: the logging settings document on the `system` cap
13728
+ * (`getLoggingSettings` / `setLoggingSettings`). Two authorities over the same
13729
+ * value is the defect the plan behind this work exists to remove, and
13730
+ * `setRequestCensus` was retired (D245) rather than allowed to be a second
13731
+ * one. {@link logChannelsCapability} therefore has no getter for a level, no
13732
+ * setter for a window and no persistence of any kind.
13733
+ *
13734
+ * ## Why `apply` is here even so
13735
+ *
13736
+ * The gate lives in the addon's PROCESS; the document lives in hub-main. Some
13737
+ * seam has to carry the value from the authority to the mirror, and a channel
13738
+ * that cannot be reached is precisely the dead knob this whole slice exists to
13739
+ * make impossible (D62 — `audioThresholdDbfs`, the HA entities with no source).
13740
+ * `apply` is that seam and nothing more: it writes an in-memory mirror, it
13741
+ * persists nothing, it is never the source of a value, and it is called only
13742
+ * with a set the hub actually read (D49 — a read that fails does not call it
13743
+ * at all, so no channel is silently disarmed by a bad read).
13744
+ */
13745
+ /** What `apply` reports back — enough to log, not enough to be a second state. */
13746
+ var LogChannelApplyResultSchema = object({
13747
+ /** How many declared channels are armed in this process after the call. */
13748
+ armed: number().int().min(0),
13749
+ /**
13750
+ * Names the document armed that this process does not declare. Reported
13751
+ * rather than swallowed: a name here is either a typo or an addon that has
13752
+ * not booted, and both deserve a line instead of silence.
13753
+ */
13754
+ unknown: array(string()).readonly()
13755
+ });
13756
+ method(_void(), array(LogChannelDescriptorSchema).readonly()), method(object({ windows: array(LogChannelWindowSchema).readonly() }), LogChannelApplyResultSchema, { kind: "mutation" });
13578
13757
  var LogLevelSchema = _enum([
13579
13758
  "debug",
13580
13759
  "info",
@@ -26836,17 +27015,60 @@ var SetSiteLocationInputSchema = object({
26836
27015
  longitude: number().min(-180).max(180)
26837
27016
  }).nullable();
26838
27017
  /**
26839
- * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
27018
+ * The TRANSPORT a call arrived on.
27019
+ *
27020
+ * Every counted call carries exactly one of these, and `unknown` is a PLANE
27021
+ * rather than a gap: a plane that cannot attribute a call declares it here, so
27022
+ * the call lands in a named bucket instead of vanishing. `planes` summing to
27023
+ * `procedureCalls` is what makes "the sum of the planes explains the total"
27024
+ * checkable rather than asserted.
27025
+ *
27026
+ * - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
27027
+ * - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
27028
+ * connection; the viewer talks to the hub over `wsLink`
27029
+ * exclusively, so this is the plane the HTTP census could not see.
27030
+ * - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
27031
+ * never touches a socket and therefore never touched a census.
27032
+ * - `unknown` — counted, plane undecidable. No hook produces it today, and
27033
+ * that is exactly what its `0` asserts: every plane the hub has can name
27034
+ * itself. It is an output bucket, never a knob — a call that arrives on a
27035
+ * plane nobody instrumented lands here instead of vanishing from the total.
27036
+ */
27037
+ var TransportPlaneSchema = _enum([
27038
+ "http",
27039
+ "ws",
27040
+ "mesh",
27041
+ "unknown"
27042
+ ]);
27043
+ /**
27044
+ * Calls per plane. Every key is always present, `0` included — an absent plane
27045
+ * reads as "not instrumented", which is the one thing this census must never
27046
+ * make an operator wonder about.
27047
+ */
27048
+ var TransportPlaneCountsSchema = object({
27049
+ http: number(),
27050
+ ws: number(),
27051
+ mesh: number(),
27052
+ unknown: number()
27053
+ });
27054
+ /**
27055
+ * One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
26840
27056
  * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
26841
27057
  * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
26842
27058
  * already prints - never a token, never an `Authorization` header.
27059
+ *
27060
+ * `subscriptions` is counted APART from `calls`: a subscription is opened once
27061
+ * and lives for hours, so folding it into a call count makes one long-lived
27062
+ * stream look like a storm.
26843
27063
  */
26844
27064
  var RequestCensusGroupSchema = object({
27065
+ plane: TransportPlaneSchema,
26845
27066
  procedure: string(),
26846
27067
  userAgent: string(),
26847
27068
  ip: string(),
26848
27069
  principal: string(),
26849
27070
  calls: number(),
27071
+ subscriptions: number(),
26850
27072
  perMin: number()
26851
27073
  });
26852
27074
  /**
@@ -26859,6 +27081,14 @@ var RequestCensusGroupSchema = object({
26859
27081
  var RequestCensusProcedureSchema = object({
26860
27082
  procedure: string(),
26861
27083
  calls: number(),
27084
+ /**
27085
+ * The same total, split by transport. THIS is the row that answers the
27086
+ * question the census exists for: one look at `deviceManager.listAll` says
27087
+ * which plane carried the 4 960, without joining two log lines by eye.
27088
+ */
27089
+ planes: TransportPlaneCountsSchema,
27090
+ /** Subscription STARTS on this procedure. Never folded into `calls`. */
27091
+ subscriptions: number(),
26862
27092
  perMin: number()
26863
27093
  });
26864
27094
  /**
@@ -26886,14 +27116,45 @@ var RequestCensusStatusSchema = object({
26886
27116
  */
26887
27117
  procedureCalls: number(),
26888
27118
  /**
27119
+ * `procedureCalls` split by transport. The four keys sum to
27120
+ * `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
27121
+ * `planesExplainTotal` is that identity, checked rather than assumed.
27122
+ */
27123
+ planes: TransportPlaneCountsSchema,
27124
+ /**
27125
+ * True iff `planes` sums to `procedureCalls`. False means a call was counted
27126
+ * on no plane at all - which is a RESULT (a plane is missing from the
27127
+ * instrument), not a failure, and it has to be visible to be read as one.
27128
+ */
27129
+ planesExplainTotal: boolean(),
27130
+ /**
26889
27131
  * tRPC WebSocket connections opened during the window. NOT calls - the WS
26890
- * transport resolves one context per connection - but the number that says
26891
- * whether a plane this census cannot see was busy while HTTP was quiet.
27132
+ * adapter resolves one context per connection - kept because a plane's call
27133
+ * count of zero against 37 open connections says something different from a
27134
+ * plane with no connections at all.
26892
27135
  */
26893
27136
  wsConnections: number(),
27137
+ /**
27138
+ * Client frames the WS plane looked at. `wsMessages` far above
27139
+ * `planes.ws + subscriptions` means most traffic is not operations
27140
+ * (keepalives, connection params) - which is itself an answer.
27141
+ */
27142
+ wsMessages: number(),
27143
+ /**
27144
+ * Subscription STARTS across every plane, excluded from `procedureCalls` on
27145
+ * purpose: one live-events stream opened at boot and held for six hours is
27146
+ * one subscription, and counting it as a call would let a quiet plane
27147
+ * masquerade as the storm.
27148
+ */
27149
+ subscriptions: number(),
27150
+ /** `subscription.stop` frames. Starts minus stops is what is still open. */
27151
+ subscriptionStops: number(),
26894
27152
  distinctGroups: number(),
26895
- /** Calls counted in the totals whose group attribution was shed at the
26896
- * cardinality bound. */
27153
+ /**
27154
+ * Operations counted in the totals whose CALLER attribution was shed at the
27155
+ * cardinality bound. Unrelated to the `unknown` PLANE: these calls know
27156
+ * which transport they arrived on, they just lost their group row.
27157
+ */
26897
27158
  unattributedCalls: number(),
26898
27159
  procedures: array(RequestCensusProcedureSchema).readonly(),
26899
27160
  groups: array(RequestCensusGroupSchema).readonly()
@@ -26916,10 +27177,11 @@ var DiagnosticIdSchema = _enum(["request-census"]);
26916
27177
  * The layers of the level hierarchy, general → specific. The most specific
26917
27178
  * layer that carries an explicit value wins.
26918
27179
  *
26919
- * `component` is DECLARED and not yet resolvable: the per-component channels
26920
- * are a later slice of the same plan, and a `levelSource` enum that has to
26921
- * grow later would force every consumer of this document to change with it.
26922
- * Nothing returns `component` today.
27180
+ * `component` became RESOLVABLE on 2026-08-27: a component is a declared log
27181
+ * CHANNEL (`stream-broker.webrtc`, `provider-reolink.baichuan`), named by
27182
+ * `scopeComponent`. It was declared-but-dark in the first slice precisely so
27183
+ * that turning it on would not force every consumer of this document to widen
27184
+ * a `levelSource` enum — which is what has now not happened.
26923
27185
  */
26924
27186
  var LoggingScopeKindSchema = _enum([
26925
27187
  "cluster",
@@ -26946,6 +27208,14 @@ var LoggingLevelLayerSchema = object({
26946
27208
  scope: LoggingScopeKindSchema,
26947
27209
  /** The node this layer speaks for; `null` on the cluster layer. */
26948
27210
  nodeId: string().nullable(),
27211
+ /**
27212
+ * The declared channel this layer speaks for; `null` on every layer but
27213
+ * `component`. Never folded into `nodeId`: a component level is CLUSTER-WIDE
27214
+ * by design — the convention this repo settled on is one orchestrator-wide
27215
+ * setting, never per node (D52) — so a component layer that carried a node
27216
+ * would invite a per-node copy of a value that has no per-node meaning.
27217
+ */
27218
+ component: string().nullable(),
26949
27219
  /** Explicitly set here, or `null` when this layer inherits. */
26950
27220
  level: LogLevelSchema$1.nullable()
26951
27221
  });
@@ -26987,6 +27257,49 @@ var DiagnosticWindowPatchSchema = object({
26987
27257
  reportEveryMs: number().int().positive().optional()
26988
27258
  });
26989
27259
  /**
27260
+ * A channel ARMED, as the document reports it.
27261
+ *
27262
+ * `armMs` is not echoed back: what an operator needs to see is the deadline
27263
+ * and the time left, because a diagnostic left running is itself an incident
27264
+ * and "armed for 10 minutes" said an hour ago is not an answer.
27265
+ */
27266
+ var LogChannelWindowStateSchema = object({
27267
+ channel: string(),
27268
+ armed: boolean(),
27269
+ /** Epoch ms the window closes at. 0 when disarmed. */
27270
+ armedUntilMs: number(),
27271
+ /** Ms left before it expires on its own. 0 when disarmed. */
27272
+ remainingMs: number(),
27273
+ /**
27274
+ * The cameras it is narrowed to, or `null` for every camera.
27275
+ *
27276
+ * A channel declared `perDevice: false` can only ever report `null` here:
27277
+ * its lines do not carry `tags: { deviceId }`, so narrowing them would
27278
+ * produce a filter that silently matches nothing. The server REFUSES such a
27279
+ * patch rather than quietly widening it — ignoring the request would teach
27280
+ * the operator that per-camera filtering works on that channel when it does
27281
+ * not.
27282
+ */
27283
+ deviceIds: array(number().int()).readonly().nullable()
27284
+ });
27285
+ /**
27286
+ * `armMs: 0` DISARMS. Same grammar as {@link DiagnosticWindowPatchSchema}, and
27287
+ * for the same reason: a channel is a window with a deadline, never a switch.
27288
+ */
27289
+ var LogChannelWindowPatchSchema = object({
27290
+ channel: string().min(1),
27291
+ armMs: number().int().min(0),
27292
+ /**
27293
+ * Narrow to these numeric device ids. Absent or `null` = every camera.
27294
+ *
27295
+ * Numeric because the repo's own rule makes it possible: every log line
27296
+ * about a device carries `tags: { deviceId }` with the numeric id. That rule
27297
+ * was paid for with a 22% thumbnail gap and a 3-hour media blackout both
27298
+ * diagnosed by hand, and this is the first thing that collects on it.
27299
+ */
27300
+ deviceIds: array(number().int()).readonly().nullable().optional()
27301
+ });
27302
+ /**
26990
27303
  * A PATCH, and patches MERGE.
26991
27304
  *
26992
27305
  * A field absent from the patch is left exactly as it was — arming a
@@ -27005,7 +27318,14 @@ var LoggingSettingsPatchSchema = object({
27005
27318
  * Only the diagnostics NAMED here change. An armed window that is not listed
27006
27319
  * keeps running — a patch is never a full replacement.
27007
27320
  */
27008
- diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
27321
+ diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional(),
27322
+ /**
27323
+ * Only the channels NAMED here change. An armed channel that is not listed
27324
+ * keeps running — same rule as `diagnostics`, because a patch that silently
27325
+ * disarmed the channels it did not mention would make the Levels page and
27326
+ * the Diagnostics page fight over the same value.
27327
+ */
27328
+ channels: array(LogChannelWindowPatchSchema).readonly().optional()
27009
27329
  });
27010
27330
  /**
27011
27331
  * Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
@@ -27018,9 +27338,22 @@ var LoggingSettingsPatchSchema = object({
27018
27338
  * authority over the whole hierarchy and answers for every layer, so the
27019
27339
  * layer selector needs a name the transport does not already own.
27020
27340
  */
27021
- var GetLoggingSettingsInputSchema = object({ scopeNodeId: string().optional() });
27341
+ var GetLoggingSettingsInputSchema = object({
27342
+ scopeNodeId: string().optional(),
27343
+ /**
27344
+ * The declared CHANNEL this document is addressed at, when the caller wants
27345
+ * the `component` layer. Absent = the node/cluster hierarchy only.
27346
+ *
27347
+ * Naming it separately rather than overloading `scopeNodeId` keeps the two
27348
+ * axes from collapsing: a component level is cluster-wide, a node level is
27349
+ * not, and one selector for both would make "which of these two did I just
27350
+ * set" unanswerable — the exact ambiguity `explicit` exists to remove.
27351
+ */
27352
+ scopeComponent: string().optional()
27353
+ });
27022
27354
  var SetLoggingSettingsInputSchema = object({
27023
27355
  scopeNodeId: string().optional(),
27356
+ scopeComponent: string().optional(),
27024
27357
  patch: LoggingSettingsPatchSchema
27025
27358
  });
27026
27359
  /**
@@ -27035,9 +27368,20 @@ var SetLoggingSettingsInputSchema = object({
27035
27368
  var LoggingSettingsStateSchema = object({
27036
27369
  /** The layer this document was read at. `null` = the cluster layer. */
27037
27370
  scopeNodeId: string().nullable(),
27371
+ /** The channel this document was read at. `null` = no component layer. */
27372
+ scopeComponent: string().nullable(),
27038
27373
  effective: LoggingEffectiveSchema,
27039
27374
  explicit: LoggingExplicitSchema,
27040
27375
  activeWindows: array(DiagnosticWindowSchema).readonly(),
27376
+ /**
27377
+ * Every channel the cluster's addons DECLARE, gathered from the
27378
+ * `log-channels` providers. Not stored anywhere: assembled per read, so a
27379
+ * channel added by a redeployed addon appears without anybody editing a
27380
+ * list, and a channel whose addon is gone stops being offered.
27381
+ */
27382
+ channels: array(LogChannelDescriptorSchema).readonly(),
27383
+ /** The channels ARMED right now, each with its deadline. */
27384
+ activeChannels: array(LogChannelWindowStateSchema).readonly(),
27041
27385
  persisted: boolean()
27042
27386
  });
27043
27387
  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(), {
@@ -28614,6 +28958,12 @@ Object.freeze({
28614
28958
  addonId: null,
28615
28959
  access: "view"
28616
28960
  },
28961
+ "dataStoreProvider.aggregate": {
28962
+ capName: "data-store-provider",
28963
+ capScope: "system",
28964
+ addonId: null,
28965
+ access: "view"
28966
+ },
28617
28967
  "dataStoreProvider.count": {
28618
28968
  capName: "data-store-provider",
28619
28969
  capScope: "system",
@@ -29028,6 +29378,12 @@ Object.freeze({
29028
29378
  addonId: null,
29029
29379
  access: "view"
29030
29380
  },
29381
+ "deviceManager.getChildrenBatch": {
29382
+ capName: "device-manager",
29383
+ capScope: "system",
29384
+ addonId: null,
29385
+ access: "view"
29386
+ },
29031
29387
  "deviceManager.getConfigSchema": {
29032
29388
  capName: "device-manager",
29033
29389
  capScope: "system",
@@ -30078,6 +30434,18 @@ Object.freeze({
30078
30434
  addonId: null,
30079
30435
  access: "create"
30080
30436
  },
30437
+ "logChannels.apply": {
30438
+ capName: "log-channels",
30439
+ capScope: "system",
30440
+ addonId: null,
30441
+ access: "create"
30442
+ },
30443
+ "logChannels.list": {
30444
+ capName: "log-channels",
30445
+ capScope: "system",
30446
+ addonId: null,
30447
+ access: "view"
30448
+ },
30081
30449
  "logDestination.query": {
30082
30450
  capName: "log-destination",
30083
30451
  capScope: "system",
@@ -32232,6 +32600,12 @@ Object.freeze({
32232
32600
  addonId: null,
32233
32601
  access: "create"
32234
32602
  },
32603
+ "settingsStore.aggregate": {
32604
+ capName: "settings-store",
32605
+ capScope: "system",
32606
+ addonId: null,
32607
+ access: "view"
32608
+ },
32235
32609
  "settingsStore.count": {
32236
32610
  capName: "settings-store",
32237
32611
  capScope: "system",
@@ -33811,6 +34185,11 @@ Object.freeze({
33811
34185
  form: "single",
33812
34186
  optional: false
33813
34187
  }],
34188
+ "deviceManager.getChildrenBatch": [{
34189
+ name: "parentDeviceIds",
34190
+ form: "array",
34191
+ optional: false
34192
+ }],
33814
34193
  "deviceManager.getConfigSchema": [{
33815
34194
  name: "deviceId",
33816
34195
  form: "single",