@camstack/addon-osd-manager 0.1.26 → 0.1.28
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.
- package/dist/{MotionZonesSettings-Dy_h9EA1.mjs → MotionZonesSettings-BaHVcJbF.mjs} +2 -2
- package/dist/{PrivacyMaskSettings-CaWxq05R.mjs → PrivacyMaskSettings-Bp4jWnFG.mjs} +4 -4
- package/dist/{SceneMonitorEditor-8hN2YKuj.mjs → SceneMonitorEditor-VaKlqiGB.mjs} +3 -3
- package/dist/_stub.js +2392 -2393
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-kjdb00lx.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-CYEXeVe1.mjs} +4 -4
- package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Dcc73wc4.mjs +26 -0
- package/dist/{hostInit-BDUiCsCj.mjs → hostInit-xnyukVLn.mjs} +3 -3
- package/dist/index.js +401 -24
- package/dist/index.mjs +401 -24
- package/dist/{player-overlays-COKQa37c.mjs → player-overlays-DgLOOYci.mjs} +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-BPlFvtSt.mjs → responsive-C-8_bIDl.mjs} +1 -1
- package/dist/{square-BhmFshyv.mjs → square-CavMCLRh.mjs} +1 -1
- package/dist/{trash-2-Bfyk6oRp.mjs → trash-2-DCAcPlaj.mjs} +1 -1
- package/dist/{use-device-snapshot-CbUEtNq7.mjs → use-device-snapshot-Ji1nLnaC.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-CKsyFdWi.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-S9zJQxV0.mjs} +1 -1
- package/package.json +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DwVNeYGJ.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",
|
|
@@ -33358,10 +33616,11 @@ var DiagnosticIdSchema = _enum(["request-census"]);
|
|
|
33358
33616
|
* The layers of the level hierarchy, general → specific. The most specific
|
|
33359
33617
|
* layer that carries an explicit value wins.
|
|
33360
33618
|
*
|
|
33361
|
-
* `component`
|
|
33362
|
-
*
|
|
33363
|
-
*
|
|
33364
|
-
*
|
|
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.
|
|
33365
33624
|
*/
|
|
33366
33625
|
var LoggingScopeKindSchema = _enum([
|
|
33367
33626
|
"cluster",
|
|
@@ -33388,6 +33647,14 @@ var LoggingLevelLayerSchema = object({
|
|
|
33388
33647
|
scope: LoggingScopeKindSchema,
|
|
33389
33648
|
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
33390
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(),
|
|
33391
33658
|
/** Explicitly set here, or `null` when this layer inherits. */
|
|
33392
33659
|
level: LogLevelSchema$1.nullable()
|
|
33393
33660
|
});
|
|
@@ -33429,6 +33696,49 @@ var DiagnosticWindowPatchSchema = object({
|
|
|
33429
33696
|
reportEveryMs: number().int().positive().optional()
|
|
33430
33697
|
});
|
|
33431
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
|
+
/**
|
|
33432
33742
|
* A PATCH, and patches MERGE.
|
|
33433
33743
|
*
|
|
33434
33744
|
* A field absent from the patch is left exactly as it was — arming a
|
|
@@ -33447,7 +33757,14 @@ var LoggingSettingsPatchSchema = object({
|
|
|
33447
33757
|
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
33448
33758
|
* keeps running — a patch is never a full replacement.
|
|
33449
33759
|
*/
|
|
33450
|
-
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()
|
|
33451
33768
|
});
|
|
33452
33769
|
/**
|
|
33453
33770
|
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
@@ -33460,9 +33777,22 @@ var LoggingSettingsPatchSchema = object({
|
|
|
33460
33777
|
* authority over the whole hierarchy and answers for every layer, so the
|
|
33461
33778
|
* layer selector needs a name the transport does not already own.
|
|
33462
33779
|
*/
|
|
33463
|
-
var GetLoggingSettingsInputSchema = object({
|
|
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
|
+
});
|
|
33464
33793
|
var SetLoggingSettingsInputSchema = object({
|
|
33465
33794
|
scopeNodeId: string().optional(),
|
|
33795
|
+
scopeComponent: string().optional(),
|
|
33466
33796
|
patch: LoggingSettingsPatchSchema
|
|
33467
33797
|
});
|
|
33468
33798
|
/**
|
|
@@ -33477,9 +33807,20 @@ var SetLoggingSettingsInputSchema = object({
|
|
|
33477
33807
|
var LoggingSettingsStateSchema = object({
|
|
33478
33808
|
/** The layer this document was read at. `null` = the cluster layer. */
|
|
33479
33809
|
scopeNodeId: string().nullable(),
|
|
33810
|
+
/** The channel this document was read at. `null` = no component layer. */
|
|
33811
|
+
scopeComponent: string().nullable(),
|
|
33480
33812
|
effective: LoggingEffectiveSchema,
|
|
33481
33813
|
explicit: LoggingExplicitSchema,
|
|
33482
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(),
|
|
33483
33824
|
persisted: boolean()
|
|
33484
33825
|
});
|
|
33485
33826
|
var systemCapability = {
|
|
@@ -34788,6 +35129,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
34788
35129
|
llmRuntimeCapability,
|
|
34789
35130
|
localNetworkCapability,
|
|
34790
35131
|
lockControlCapability,
|
|
35132
|
+
logChannelsCapability,
|
|
34791
35133
|
logDestinationCapability,
|
|
34792
35134
|
loginMethodCapability,
|
|
34793
35135
|
mediaPlayerCapability,
|
|
@@ -35754,6 +36096,12 @@ Object.freeze({
|
|
|
35754
36096
|
addonId: null,
|
|
35755
36097
|
access: "view"
|
|
35756
36098
|
},
|
|
36099
|
+
"dataStoreProvider.aggregate": {
|
|
36100
|
+
capName: "data-store-provider",
|
|
36101
|
+
capScope: "system",
|
|
36102
|
+
addonId: null,
|
|
36103
|
+
access: "view"
|
|
36104
|
+
},
|
|
35757
36105
|
"dataStoreProvider.count": {
|
|
35758
36106
|
capName: "data-store-provider",
|
|
35759
36107
|
capScope: "system",
|
|
@@ -36168,6 +36516,12 @@ Object.freeze({
|
|
|
36168
36516
|
addonId: null,
|
|
36169
36517
|
access: "view"
|
|
36170
36518
|
},
|
|
36519
|
+
"deviceManager.getChildrenBatch": {
|
|
36520
|
+
capName: "device-manager",
|
|
36521
|
+
capScope: "system",
|
|
36522
|
+
addonId: null,
|
|
36523
|
+
access: "view"
|
|
36524
|
+
},
|
|
36171
36525
|
"deviceManager.getConfigSchema": {
|
|
36172
36526
|
capName: "device-manager",
|
|
36173
36527
|
capScope: "system",
|
|
@@ -37218,6 +37572,18 @@ Object.freeze({
|
|
|
37218
37572
|
addonId: null,
|
|
37219
37573
|
access: "create"
|
|
37220
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
|
+
},
|
|
37221
37587
|
"logDestination.query": {
|
|
37222
37588
|
capName: "log-destination",
|
|
37223
37589
|
capScope: "system",
|
|
@@ -39372,6 +39738,12 @@ Object.freeze({
|
|
|
39372
39738
|
addonId: null,
|
|
39373
39739
|
access: "create"
|
|
39374
39740
|
},
|
|
39741
|
+
"settingsStore.aggregate": {
|
|
39742
|
+
capName: "settings-store",
|
|
39743
|
+
capScope: "system",
|
|
39744
|
+
addonId: null,
|
|
39745
|
+
access: "view"
|
|
39746
|
+
},
|
|
39375
39747
|
"settingsStore.count": {
|
|
39376
39748
|
capName: "settings-store",
|
|
39377
39749
|
capScope: "system",
|
|
@@ -40951,6 +41323,11 @@ Object.freeze({
|
|
|
40951
41323
|
form: "single",
|
|
40952
41324
|
optional: false
|
|
40953
41325
|
}],
|
|
41326
|
+
"deviceManager.getChildrenBatch": [{
|
|
41327
|
+
name: "parentDeviceIds",
|
|
41328
|
+
form: "array",
|
|
41329
|
+
optional: false
|
|
41330
|
+
}],
|
|
40954
41331
|
"deviceManager.getConfigSchema": [{
|
|
40955
41332
|
name: "deviceId",
|
|
40956
41333
|
form: "single",
|