@camstack/addon-provider-rademacher 0.2.32 → 0.2.33
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/addon.js +322 -25
- package/dist/addon.mjs +322 -25
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -8453,6 +8453,111 @@ var CameraSwitchGroupSchema = object({
|
|
|
8453
8453
|
fetchedAt: number()
|
|
8454
8454
|
});
|
|
8455
8455
|
/**
|
|
8456
|
+
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
8457
|
+
* an addon declares its channels in.
|
|
8458
|
+
*
|
|
8459
|
+
* ## Two axes, deliberately separated
|
|
8460
|
+
*
|
|
8461
|
+
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
8462
|
+
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
8463
|
+
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
8464
|
+
* and rots silently. So a channel is declared where it is consulted, and the
|
|
8465
|
+
* `log-channels` capability enumerates the declarations.
|
|
8466
|
+
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
8467
|
+
* thing: the logging settings document on the `system` cap. Two authorities
|
|
8468
|
+
* over the values is the exact defect
|
|
8469
|
+
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
8470
|
+
* remove; re-introducing it from the cure side would be grotesque.
|
|
8471
|
+
*
|
|
8472
|
+
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
8473
|
+
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
8474
|
+
* the hot path with a value somebody actually read, and by
|
|
8475
|
+
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
8476
|
+
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
8477
|
+
* disarmed one (D49).
|
|
8478
|
+
*
|
|
8479
|
+
* ## The canonical call shape
|
|
8480
|
+
*
|
|
8481
|
+
* ```ts
|
|
8482
|
+
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
8483
|
+
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
8484
|
+
* }
|
|
8485
|
+
* ```
|
|
8486
|
+
*
|
|
8487
|
+
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
8488
|
+
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
8489
|
+
* object literal is never constructed because it lives inside the branch. It
|
|
8490
|
+
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
8491
|
+
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
8492
|
+
* destination floor (measured at 1.93 ns/call when off).
|
|
8493
|
+
*
|
|
8494
|
+
* ## Why a channel emits at `info`
|
|
8495
|
+
*
|
|
8496
|
+
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
8497
|
+
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
8498
|
+
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
8499
|
+
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
8500
|
+
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
8501
|
+
* emits at the channel's declared level, whose schema floor is `info`.
|
|
8502
|
+
*/
|
|
8503
|
+
/**
|
|
8504
|
+
* The level a channel writes at once armed.
|
|
8505
|
+
*
|
|
8506
|
+
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
8507
|
+
* not leave the process for Loki, and the whole point of arming a channel is
|
|
8508
|
+
* to read it later.
|
|
8509
|
+
*/
|
|
8510
|
+
var LogChannelLevelSchema = _enum([
|
|
8511
|
+
"info",
|
|
8512
|
+
"warn",
|
|
8513
|
+
"error"
|
|
8514
|
+
]);
|
|
8515
|
+
/**
|
|
8516
|
+
* What an addon declares about one channel. No value, no state — a
|
|
8517
|
+
* declaration is inert.
|
|
8518
|
+
*/
|
|
8519
|
+
var LogChannelDescriptorSchema = object({
|
|
8520
|
+
/**
|
|
8521
|
+
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
8522
|
+
* the addon's short name so an operator reading a channel list can tell who
|
|
8523
|
+
* owns it without a second lookup.
|
|
8524
|
+
*/
|
|
8525
|
+
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
8526
|
+
/** One sentence: what the operator will SEE after arming it. */
|
|
8527
|
+
description: string().min(1),
|
|
8528
|
+
/** The level its lines are emitted at. Never below `info`. */
|
|
8529
|
+
defaultLevel: LogChannelLevelSchema,
|
|
8530
|
+
/**
|
|
8531
|
+
* Whether this channel can be narrowed to a camera.
|
|
8532
|
+
*
|
|
8533
|
+
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
8534
|
+
* consulted with the numeric device id, AND every line the channel admits
|
|
8535
|
+
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
8536
|
+
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
8537
|
+
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
8538
|
+
* the body is the only way to filter.
|
|
8539
|
+
*
|
|
8540
|
+
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
8541
|
+
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
8542
|
+
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
8543
|
+
* path was never taken.
|
|
8544
|
+
*/
|
|
8545
|
+
perDevice: boolean()
|
|
8546
|
+
});
|
|
8547
|
+
/**
|
|
8548
|
+
* An armed window over one channel, as the document hands it to a mirror.
|
|
8549
|
+
*
|
|
8550
|
+
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
8551
|
+
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
8552
|
+
*/
|
|
8553
|
+
var LogChannelWindowSchema = object({
|
|
8554
|
+
channel: string().min(1),
|
|
8555
|
+
/** Epoch ms the window closes at. */
|
|
8556
|
+
armedUntilMs: number(),
|
|
8557
|
+
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
8558
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
8559
|
+
});
|
|
8560
|
+
/**
|
|
8456
8561
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
8457
8562
|
* recordings and events management surfaces.
|
|
8458
8563
|
*
|
|
@@ -12073,6 +12178,35 @@ var MutationFilterSchema = object({
|
|
|
12073
12178
|
whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
|
|
12074
12179
|
whereNot: record(string(), unknown()).optional()
|
|
12075
12180
|
});
|
|
12181
|
+
/**
|
|
12182
|
+
* One scalar an {@link settingsStoreCapability.methods.aggregate} call asks for.
|
|
12183
|
+
*
|
|
12184
|
+
* `as` names the slot in the result, so the SAME column may be asked twice with
|
|
12185
|
+
* two operations (`MIN(startMs)` and `MAX(startMs)` in one round trip) — which
|
|
12186
|
+
* a `Record<column, op>` shape could not express.
|
|
12187
|
+
*/
|
|
12188
|
+
var AggregateFieldSchema = object({
|
|
12189
|
+
/** Result key. */
|
|
12190
|
+
as: string().min(1),
|
|
12191
|
+
/** Column to aggregate. Must be a real column of a declared collection. */
|
|
12192
|
+
field: string().min(1),
|
|
12193
|
+
op: _enum([
|
|
12194
|
+
"sum",
|
|
12195
|
+
"min",
|
|
12196
|
+
"max"
|
|
12197
|
+
])
|
|
12198
|
+
});
|
|
12199
|
+
/**
|
|
12200
|
+
* `COUNT(*)` plus one number per requested field.
|
|
12201
|
+
*
|
|
12202
|
+
* `null` means NO ROW MATCHED, never zero: a `SUM` over an empty set and a sum
|
|
12203
|
+
* that really is 0 are different facts, and an accounting caller that renders
|
|
12204
|
+
* "0 bytes, oldest = 0" for "nothing here" reports a lie about a disk.
|
|
12205
|
+
*/
|
|
12206
|
+
var AggregateResultSchema = object({
|
|
12207
|
+
count: number().int(),
|
|
12208
|
+
values: record(string(), number().nullable())
|
|
12209
|
+
});
|
|
12076
12210
|
/** A single stored record: `{ id, data }`. */
|
|
12077
12211
|
var SettingsRecordSchema = object({
|
|
12078
12212
|
id: string(),
|
|
@@ -12157,6 +12291,11 @@ method(object({
|
|
|
12157
12291
|
collection: string(),
|
|
12158
12292
|
filter: QueryFilterSchema.optional()
|
|
12159
12293
|
}), number()), method(object({
|
|
12294
|
+
namespace: string().optional(),
|
|
12295
|
+
collection: string(),
|
|
12296
|
+
fields: array(AggregateFieldSchema).readonly(),
|
|
12297
|
+
filter: QueryFilterSchema.optional()
|
|
12298
|
+
}), AggregateResultSchema), method(object({
|
|
12160
12299
|
namespace: string().optional(),
|
|
12161
12300
|
collection: string(),
|
|
12162
12301
|
field: string(),
|
|
@@ -12273,6 +12412,11 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
|
|
|
12273
12412
|
collection: string(),
|
|
12274
12413
|
filter: QueryFilterSchema.optional()
|
|
12275
12414
|
}), number(), { auth: "admin" }), method(object({
|
|
12415
|
+
namespace: string().optional(),
|
|
12416
|
+
collection: string(),
|
|
12417
|
+
fields: array(AggregateFieldSchema).readonly(),
|
|
12418
|
+
filter: QueryFilterSchema.optional()
|
|
12419
|
+
}), AggregateResultSchema, { auth: "admin" }), method(object({
|
|
12276
12420
|
namespace: string().optional(),
|
|
12277
12421
|
collection: string(),
|
|
12278
12422
|
field: string(),
|
|
@@ -12996,24 +13140,6 @@ var deviceProviderCapability = {
|
|
|
12996
13140
|
})
|
|
12997
13141
|
}
|
|
12998
13142
|
};
|
|
12999
|
-
/**
|
|
13000
|
-
* Device Manager capability — hub-side singleton that unifies device persistence,
|
|
13001
|
-
* live registry access, and all management operations into a single tRPC surface.
|
|
13002
|
-
*
|
|
13003
|
-
* Replaces:
|
|
13004
|
-
* - `device-persistence` capability (persistence methods absorbed here)
|
|
13005
|
-
* - `device-management.router.ts` (deleted in Phase 2)
|
|
13006
|
-
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
13007
|
-
*
|
|
13008
|
-
* All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
|
|
13009
|
-
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
13010
|
-
* - No nodeId routing needed — this is a pure hub singleton.
|
|
13011
|
-
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
13012
|
-
* - No shadow registry or cross-node aggregation required.
|
|
13013
|
-
*
|
|
13014
|
-
* Forked workers register devices back to the hub via `ctx.devices`
|
|
13015
|
-
* (DeviceManagerApi → ctx.api.deviceManager.registerDevice), same as today.
|
|
13016
|
-
*/
|
|
13017
13143
|
/** One child-placement directive on a container's `childLayout`. Structurally
|
|
13018
13144
|
* identical to `ChildLayoutEntry` in `device-management.ts` — the cap wire
|
|
13019
13145
|
* shape for the same field. The child is identified by its re-sync-stable
|
|
@@ -13382,7 +13508,7 @@ method(object({
|
|
|
13382
13508
|
* it answers today and the caller filters as it already does.
|
|
13383
13509
|
*/
|
|
13384
13510
|
deviceIds: array(number()).optional()
|
|
13385
|
-
}), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), object({
|
|
13511
|
+
}), 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({
|
|
13386
13512
|
mode: LinkedDevicesModeSchema,
|
|
13387
13513
|
devices: array(LinkedDeviceSchema)
|
|
13388
13514
|
})), 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({
|
|
@@ -14106,6 +14232,59 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
14106
14232
|
kind: "mutation",
|
|
14107
14233
|
auth: "admin"
|
|
14108
14234
|
});
|
|
14235
|
+
/**
|
|
14236
|
+
* `log-channels` — the capability an addon DECLARES its diagnostic channels
|
|
14237
|
+
* through. It stores nothing.
|
|
14238
|
+
*
|
|
14239
|
+
* ## Why a capability at all, and why this shape
|
|
14240
|
+
*
|
|
14241
|
+
* Which channels exist is knowledge only the addon has: `stream-broker` knows
|
|
14242
|
+
* webrtc/ICE/RTP, `provider-reolink` knows baichuan/handshake. A central list
|
|
14243
|
+
* maintained by hand rots at the first addition and rots INVISIBLY — nothing
|
|
14244
|
+
* fails, an operator just never sees the channel somebody added. So the list
|
|
14245
|
+
* is assembled from declarations at runtime.
|
|
14246
|
+
*
|
|
14247
|
+
* The shape is copied from `log-destination.cap.ts`, which already does
|
|
14248
|
+
* exactly this job: `mode: 'collection'`, `internal: true`,
|
|
14249
|
+
* `mount: { kind: 'skip' }` — no tRPC route, no generated hooks — while
|
|
14250
|
+
* `addons.listCapabilityProviders` still enumerates it, and the hub's
|
|
14251
|
+
* `CapabilityRegistry` still holds an RPC proxy per provider so a forked
|
|
14252
|
+
* runner's declarations reach hub-main over the transport that already exists.
|
|
14253
|
+
* No new UDS message, no second registry.
|
|
14254
|
+
*
|
|
14255
|
+
* ## What it deliberately does NOT own
|
|
14256
|
+
*
|
|
14257
|
+
* The VALUES — which channel is armed, for which cameras, until when — live in
|
|
14258
|
+
* ONE place: the logging settings document on the `system` cap
|
|
14259
|
+
* (`getLoggingSettings` / `setLoggingSettings`). Two authorities over the same
|
|
14260
|
+
* value is the defect the plan behind this work exists to remove, and
|
|
14261
|
+
* `setRequestCensus` was retired (D245) rather than allowed to be a second
|
|
14262
|
+
* one. {@link logChannelsCapability} therefore has no getter for a level, no
|
|
14263
|
+
* setter for a window and no persistence of any kind.
|
|
14264
|
+
*
|
|
14265
|
+
* ## Why `apply` is here even so
|
|
14266
|
+
*
|
|
14267
|
+
* The gate lives in the addon's PROCESS; the document lives in hub-main. Some
|
|
14268
|
+
* seam has to carry the value from the authority to the mirror, and a channel
|
|
14269
|
+
* that cannot be reached is precisely the dead knob this whole slice exists to
|
|
14270
|
+
* make impossible (D62 — `audioThresholdDbfs`, the HA entities with no source).
|
|
14271
|
+
* `apply` is that seam and nothing more: it writes an in-memory mirror, it
|
|
14272
|
+
* persists nothing, it is never the source of a value, and it is called only
|
|
14273
|
+
* with a set the hub actually read (D49 — a read that fails does not call it
|
|
14274
|
+
* at all, so no channel is silently disarmed by a bad read).
|
|
14275
|
+
*/
|
|
14276
|
+
/** What `apply` reports back — enough to log, not enough to be a second state. */
|
|
14277
|
+
var LogChannelApplyResultSchema = object({
|
|
14278
|
+
/** How many declared channels are armed in this process after the call. */
|
|
14279
|
+
armed: number().int().min(0),
|
|
14280
|
+
/**
|
|
14281
|
+
* Names the document armed that this process does not declare. Reported
|
|
14282
|
+
* rather than swallowed: a name here is either a typo or an addon that has
|
|
14283
|
+
* not booted, and both deserve a line instead of silence.
|
|
14284
|
+
*/
|
|
14285
|
+
unknown: array(string()).readonly()
|
|
14286
|
+
});
|
|
14287
|
+
method(_void(), array(LogChannelDescriptorSchema).readonly()), method(object({ windows: array(LogChannelWindowSchema).readonly() }), LogChannelApplyResultSchema, { kind: "mutation" });
|
|
14109
14288
|
var LogLevelSchema = _enum([
|
|
14110
14289
|
"debug",
|
|
14111
14290
|
"info",
|
|
@@ -29550,10 +29729,11 @@ var DiagnosticIdSchema = _enum(["request-census"]);
|
|
|
29550
29729
|
* The layers of the level hierarchy, general → specific. The most specific
|
|
29551
29730
|
* layer that carries an explicit value wins.
|
|
29552
29731
|
*
|
|
29553
|
-
* `component`
|
|
29554
|
-
*
|
|
29555
|
-
*
|
|
29556
|
-
*
|
|
29732
|
+
* `component` became RESOLVABLE on 2026-08-27: a component is a declared log
|
|
29733
|
+
* CHANNEL (`stream-broker.webrtc`, `provider-reolink.baichuan`), named by
|
|
29734
|
+
* `scopeComponent`. It was declared-but-dark in the first slice precisely so
|
|
29735
|
+
* that turning it on would not force every consumer of this document to widen
|
|
29736
|
+
* a `levelSource` enum — which is what has now not happened.
|
|
29557
29737
|
*/
|
|
29558
29738
|
var LoggingScopeKindSchema = _enum([
|
|
29559
29739
|
"cluster",
|
|
@@ -29580,6 +29760,14 @@ var LoggingLevelLayerSchema = object({
|
|
|
29580
29760
|
scope: LoggingScopeKindSchema,
|
|
29581
29761
|
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
29582
29762
|
nodeId: string().nullable(),
|
|
29763
|
+
/**
|
|
29764
|
+
* The declared channel this layer speaks for; `null` on every layer but
|
|
29765
|
+
* `component`. Never folded into `nodeId`: a component level is CLUSTER-WIDE
|
|
29766
|
+
* by design — the convention this repo settled on is one orchestrator-wide
|
|
29767
|
+
* setting, never per node (D52) — so a component layer that carried a node
|
|
29768
|
+
* would invite a per-node copy of a value that has no per-node meaning.
|
|
29769
|
+
*/
|
|
29770
|
+
component: string().nullable(),
|
|
29583
29771
|
/** Explicitly set here, or `null` when this layer inherits. */
|
|
29584
29772
|
level: LogLevelSchema$1.nullable()
|
|
29585
29773
|
});
|
|
@@ -29621,6 +29809,49 @@ var DiagnosticWindowPatchSchema = object({
|
|
|
29621
29809
|
reportEveryMs: number().int().positive().optional()
|
|
29622
29810
|
});
|
|
29623
29811
|
/**
|
|
29812
|
+
* A channel ARMED, as the document reports it.
|
|
29813
|
+
*
|
|
29814
|
+
* `armMs` is not echoed back: what an operator needs to see is the deadline
|
|
29815
|
+
* and the time left, because a diagnostic left running is itself an incident
|
|
29816
|
+
* and "armed for 10 minutes" said an hour ago is not an answer.
|
|
29817
|
+
*/
|
|
29818
|
+
var LogChannelWindowStateSchema = object({
|
|
29819
|
+
channel: string(),
|
|
29820
|
+
armed: boolean(),
|
|
29821
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
29822
|
+
armedUntilMs: number(),
|
|
29823
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
29824
|
+
remainingMs: number(),
|
|
29825
|
+
/**
|
|
29826
|
+
* The cameras it is narrowed to, or `null` for every camera.
|
|
29827
|
+
*
|
|
29828
|
+
* A channel declared `perDevice: false` can only ever report `null` here:
|
|
29829
|
+
* its lines do not carry `tags: { deviceId }`, so narrowing them would
|
|
29830
|
+
* produce a filter that silently matches nothing. The server REFUSES such a
|
|
29831
|
+
* patch rather than quietly widening it — ignoring the request would teach
|
|
29832
|
+
* the operator that per-camera filtering works on that channel when it does
|
|
29833
|
+
* not.
|
|
29834
|
+
*/
|
|
29835
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
29836
|
+
});
|
|
29837
|
+
/**
|
|
29838
|
+
* `armMs: 0` DISARMS. Same grammar as {@link DiagnosticWindowPatchSchema}, and
|
|
29839
|
+
* for the same reason: a channel is a window with a deadline, never a switch.
|
|
29840
|
+
*/
|
|
29841
|
+
var LogChannelWindowPatchSchema = object({
|
|
29842
|
+
channel: string().min(1),
|
|
29843
|
+
armMs: number().int().min(0),
|
|
29844
|
+
/**
|
|
29845
|
+
* Narrow to these numeric device ids. Absent or `null` = every camera.
|
|
29846
|
+
*
|
|
29847
|
+
* Numeric because the repo's own rule makes it possible: every log line
|
|
29848
|
+
* about a device carries `tags: { deviceId }` with the numeric id. That rule
|
|
29849
|
+
* was paid for with a 22% thumbnail gap and a 3-hour media blackout both
|
|
29850
|
+
* diagnosed by hand, and this is the first thing that collects on it.
|
|
29851
|
+
*/
|
|
29852
|
+
deviceIds: array(number().int()).readonly().nullable().optional()
|
|
29853
|
+
});
|
|
29854
|
+
/**
|
|
29624
29855
|
* A PATCH, and patches MERGE.
|
|
29625
29856
|
*
|
|
29626
29857
|
* A field absent from the patch is left exactly as it was — arming a
|
|
@@ -29639,7 +29870,14 @@ var LoggingSettingsPatchSchema = object({
|
|
|
29639
29870
|
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
29640
29871
|
* keeps running — a patch is never a full replacement.
|
|
29641
29872
|
*/
|
|
29642
|
-
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
29873
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional(),
|
|
29874
|
+
/**
|
|
29875
|
+
* Only the channels NAMED here change. An armed channel that is not listed
|
|
29876
|
+
* keeps running — same rule as `diagnostics`, because a patch that silently
|
|
29877
|
+
* disarmed the channels it did not mention would make the Levels page and
|
|
29878
|
+
* the Diagnostics page fight over the same value.
|
|
29879
|
+
*/
|
|
29880
|
+
channels: array(LogChannelWindowPatchSchema).readonly().optional()
|
|
29643
29881
|
});
|
|
29644
29882
|
/**
|
|
29645
29883
|
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
@@ -29652,9 +29890,22 @@ var LoggingSettingsPatchSchema = object({
|
|
|
29652
29890
|
* authority over the whole hierarchy and answers for every layer, so the
|
|
29653
29891
|
* layer selector needs a name the transport does not already own.
|
|
29654
29892
|
*/
|
|
29655
|
-
var GetLoggingSettingsInputSchema = object({
|
|
29893
|
+
var GetLoggingSettingsInputSchema = object({
|
|
29894
|
+
scopeNodeId: string().optional(),
|
|
29895
|
+
/**
|
|
29896
|
+
* The declared CHANNEL this document is addressed at, when the caller wants
|
|
29897
|
+
* the `component` layer. Absent = the node/cluster hierarchy only.
|
|
29898
|
+
*
|
|
29899
|
+
* Naming it separately rather than overloading `scopeNodeId` keeps the two
|
|
29900
|
+
* axes from collapsing: a component level is cluster-wide, a node level is
|
|
29901
|
+
* not, and one selector for both would make "which of these two did I just
|
|
29902
|
+
* set" unanswerable — the exact ambiguity `explicit` exists to remove.
|
|
29903
|
+
*/
|
|
29904
|
+
scopeComponent: string().optional()
|
|
29905
|
+
});
|
|
29656
29906
|
var SetLoggingSettingsInputSchema = object({
|
|
29657
29907
|
scopeNodeId: string().optional(),
|
|
29908
|
+
scopeComponent: string().optional(),
|
|
29658
29909
|
patch: LoggingSettingsPatchSchema
|
|
29659
29910
|
});
|
|
29660
29911
|
/**
|
|
@@ -29669,9 +29920,20 @@ var SetLoggingSettingsInputSchema = object({
|
|
|
29669
29920
|
var LoggingSettingsStateSchema = object({
|
|
29670
29921
|
/** The layer this document was read at. `null` = the cluster layer. */
|
|
29671
29922
|
scopeNodeId: string().nullable(),
|
|
29923
|
+
/** The channel this document was read at. `null` = no component layer. */
|
|
29924
|
+
scopeComponent: string().nullable(),
|
|
29672
29925
|
effective: LoggingEffectiveSchema,
|
|
29673
29926
|
explicit: LoggingExplicitSchema,
|
|
29674
29927
|
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
29928
|
+
/**
|
|
29929
|
+
* Every channel the cluster's addons DECLARE, gathered from the
|
|
29930
|
+
* `log-channels` providers. Not stored anywhere: assembled per read, so a
|
|
29931
|
+
* channel added by a redeployed addon appears without anybody editing a
|
|
29932
|
+
* list, and a channel whose addon is gone stops being offered.
|
|
29933
|
+
*/
|
|
29934
|
+
channels: array(LogChannelDescriptorSchema).readonly(),
|
|
29935
|
+
/** The channels ARMED right now, each with its deadline. */
|
|
29936
|
+
activeChannels: array(LogChannelWindowStateSchema).readonly(),
|
|
29675
29937
|
persisted: boolean()
|
|
29676
29938
|
});
|
|
29677
29939
|
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(), {
|
|
@@ -32656,6 +32918,12 @@ Object.freeze({
|
|
|
32656
32918
|
addonId: null,
|
|
32657
32919
|
access: "view"
|
|
32658
32920
|
},
|
|
32921
|
+
"dataStoreProvider.aggregate": {
|
|
32922
|
+
capName: "data-store-provider",
|
|
32923
|
+
capScope: "system",
|
|
32924
|
+
addonId: null,
|
|
32925
|
+
access: "view"
|
|
32926
|
+
},
|
|
32659
32927
|
"dataStoreProvider.count": {
|
|
32660
32928
|
capName: "data-store-provider",
|
|
32661
32929
|
capScope: "system",
|
|
@@ -33070,6 +33338,12 @@ Object.freeze({
|
|
|
33070
33338
|
addonId: null,
|
|
33071
33339
|
access: "view"
|
|
33072
33340
|
},
|
|
33341
|
+
"deviceManager.getChildrenBatch": {
|
|
33342
|
+
capName: "device-manager",
|
|
33343
|
+
capScope: "system",
|
|
33344
|
+
addonId: null,
|
|
33345
|
+
access: "view"
|
|
33346
|
+
},
|
|
33073
33347
|
"deviceManager.getConfigSchema": {
|
|
33074
33348
|
capName: "device-manager",
|
|
33075
33349
|
capScope: "system",
|
|
@@ -34120,6 +34394,18 @@ Object.freeze({
|
|
|
34120
34394
|
addonId: null,
|
|
34121
34395
|
access: "create"
|
|
34122
34396
|
},
|
|
34397
|
+
"logChannels.apply": {
|
|
34398
|
+
capName: "log-channels",
|
|
34399
|
+
capScope: "system",
|
|
34400
|
+
addonId: null,
|
|
34401
|
+
access: "create"
|
|
34402
|
+
},
|
|
34403
|
+
"logChannels.list": {
|
|
34404
|
+
capName: "log-channels",
|
|
34405
|
+
capScope: "system",
|
|
34406
|
+
addonId: null,
|
|
34407
|
+
access: "view"
|
|
34408
|
+
},
|
|
34123
34409
|
"logDestination.query": {
|
|
34124
34410
|
capName: "log-destination",
|
|
34125
34411
|
capScope: "system",
|
|
@@ -36274,6 +36560,12 @@ Object.freeze({
|
|
|
36274
36560
|
addonId: null,
|
|
36275
36561
|
access: "create"
|
|
36276
36562
|
},
|
|
36563
|
+
"settingsStore.aggregate": {
|
|
36564
|
+
capName: "settings-store",
|
|
36565
|
+
capScope: "system",
|
|
36566
|
+
addonId: null,
|
|
36567
|
+
access: "view"
|
|
36568
|
+
},
|
|
36277
36569
|
"settingsStore.count": {
|
|
36278
36570
|
capName: "settings-store",
|
|
36279
36571
|
capScope: "system",
|
|
@@ -37853,6 +38145,11 @@ Object.freeze({
|
|
|
37853
38145
|
form: "single",
|
|
37854
38146
|
optional: false
|
|
37855
38147
|
}],
|
|
38148
|
+
"deviceManager.getChildrenBatch": [{
|
|
38149
|
+
name: "parentDeviceIds",
|
|
38150
|
+
form: "array",
|
|
38151
|
+
optional: false
|
|
38152
|
+
}],
|
|
37856
38153
|
"deviceManager.getConfigSchema": [{
|
|
37857
38154
|
name: "deviceId",
|
|
37858
38155
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -8452,6 +8452,111 @@ var CameraSwitchGroupSchema = object({
|
|
|
8452
8452
|
fetchedAt: number()
|
|
8453
8453
|
});
|
|
8454
8454
|
/**
|
|
8455
|
+
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
8456
|
+
* an addon declares its channels in.
|
|
8457
|
+
*
|
|
8458
|
+
* ## Two axes, deliberately separated
|
|
8459
|
+
*
|
|
8460
|
+
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
8461
|
+
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
8462
|
+
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
8463
|
+
* and rots silently. So a channel is declared where it is consulted, and the
|
|
8464
|
+
* `log-channels` capability enumerates the declarations.
|
|
8465
|
+
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
8466
|
+
* thing: the logging settings document on the `system` cap. Two authorities
|
|
8467
|
+
* over the values is the exact defect
|
|
8468
|
+
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
8469
|
+
* remove; re-introducing it from the cure side would be grotesque.
|
|
8470
|
+
*
|
|
8471
|
+
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
8472
|
+
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
8473
|
+
* the hot path with a value somebody actually read, and by
|
|
8474
|
+
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
8475
|
+
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
8476
|
+
* disarmed one (D49).
|
|
8477
|
+
*
|
|
8478
|
+
* ## The canonical call shape
|
|
8479
|
+
*
|
|
8480
|
+
* ```ts
|
|
8481
|
+
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
8482
|
+
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
8483
|
+
* }
|
|
8484
|
+
* ```
|
|
8485
|
+
*
|
|
8486
|
+
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
8487
|
+
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
8488
|
+
* object literal is never constructed because it lives inside the branch. It
|
|
8489
|
+
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
8490
|
+
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
8491
|
+
* destination floor (measured at 1.93 ns/call when off).
|
|
8492
|
+
*
|
|
8493
|
+
* ## Why a channel emits at `info`
|
|
8494
|
+
*
|
|
8495
|
+
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
8496
|
+
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
8497
|
+
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
8498
|
+
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
8499
|
+
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
8500
|
+
* emits at the channel's declared level, whose schema floor is `info`.
|
|
8501
|
+
*/
|
|
8502
|
+
/**
|
|
8503
|
+
* The level a channel writes at once armed.
|
|
8504
|
+
*
|
|
8505
|
+
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
8506
|
+
* not leave the process for Loki, and the whole point of arming a channel is
|
|
8507
|
+
* to read it later.
|
|
8508
|
+
*/
|
|
8509
|
+
var LogChannelLevelSchema = _enum([
|
|
8510
|
+
"info",
|
|
8511
|
+
"warn",
|
|
8512
|
+
"error"
|
|
8513
|
+
]);
|
|
8514
|
+
/**
|
|
8515
|
+
* What an addon declares about one channel. No value, no state — a
|
|
8516
|
+
* declaration is inert.
|
|
8517
|
+
*/
|
|
8518
|
+
var LogChannelDescriptorSchema = object({
|
|
8519
|
+
/**
|
|
8520
|
+
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
8521
|
+
* the addon's short name so an operator reading a channel list can tell who
|
|
8522
|
+
* owns it without a second lookup.
|
|
8523
|
+
*/
|
|
8524
|
+
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
8525
|
+
/** One sentence: what the operator will SEE after arming it. */
|
|
8526
|
+
description: string().min(1),
|
|
8527
|
+
/** The level its lines are emitted at. Never below `info`. */
|
|
8528
|
+
defaultLevel: LogChannelLevelSchema,
|
|
8529
|
+
/**
|
|
8530
|
+
* Whether this channel can be narrowed to a camera.
|
|
8531
|
+
*
|
|
8532
|
+
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
8533
|
+
* consulted with the numeric device id, AND every line the channel admits
|
|
8534
|
+
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
8535
|
+
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
8536
|
+
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
8537
|
+
* the body is the only way to filter.
|
|
8538
|
+
*
|
|
8539
|
+
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
8540
|
+
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
8541
|
+
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
8542
|
+
* path was never taken.
|
|
8543
|
+
*/
|
|
8544
|
+
perDevice: boolean()
|
|
8545
|
+
});
|
|
8546
|
+
/**
|
|
8547
|
+
* An armed window over one channel, as the document hands it to a mirror.
|
|
8548
|
+
*
|
|
8549
|
+
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
8550
|
+
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
8551
|
+
*/
|
|
8552
|
+
var LogChannelWindowSchema = object({
|
|
8553
|
+
channel: string().min(1),
|
|
8554
|
+
/** Epoch ms the window closes at. */
|
|
8555
|
+
armedUntilMs: number(),
|
|
8556
|
+
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
8557
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
8558
|
+
});
|
|
8559
|
+
/**
|
|
8455
8560
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
8456
8561
|
* recordings and events management surfaces.
|
|
8457
8562
|
*
|
|
@@ -12072,6 +12177,35 @@ var MutationFilterSchema = object({
|
|
|
12072
12177
|
whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
|
|
12073
12178
|
whereNot: record(string(), unknown()).optional()
|
|
12074
12179
|
});
|
|
12180
|
+
/**
|
|
12181
|
+
* One scalar an {@link settingsStoreCapability.methods.aggregate} call asks for.
|
|
12182
|
+
*
|
|
12183
|
+
* `as` names the slot in the result, so the SAME column may be asked twice with
|
|
12184
|
+
* two operations (`MIN(startMs)` and `MAX(startMs)` in one round trip) — which
|
|
12185
|
+
* a `Record<column, op>` shape could not express.
|
|
12186
|
+
*/
|
|
12187
|
+
var AggregateFieldSchema = object({
|
|
12188
|
+
/** Result key. */
|
|
12189
|
+
as: string().min(1),
|
|
12190
|
+
/** Column to aggregate. Must be a real column of a declared collection. */
|
|
12191
|
+
field: string().min(1),
|
|
12192
|
+
op: _enum([
|
|
12193
|
+
"sum",
|
|
12194
|
+
"min",
|
|
12195
|
+
"max"
|
|
12196
|
+
])
|
|
12197
|
+
});
|
|
12198
|
+
/**
|
|
12199
|
+
* `COUNT(*)` plus one number per requested field.
|
|
12200
|
+
*
|
|
12201
|
+
* `null` means NO ROW MATCHED, never zero: a `SUM` over an empty set and a sum
|
|
12202
|
+
* that really is 0 are different facts, and an accounting caller that renders
|
|
12203
|
+
* "0 bytes, oldest = 0" for "nothing here" reports a lie about a disk.
|
|
12204
|
+
*/
|
|
12205
|
+
var AggregateResultSchema = object({
|
|
12206
|
+
count: number().int(),
|
|
12207
|
+
values: record(string(), number().nullable())
|
|
12208
|
+
});
|
|
12075
12209
|
/** A single stored record: `{ id, data }`. */
|
|
12076
12210
|
var SettingsRecordSchema = object({
|
|
12077
12211
|
id: string(),
|
|
@@ -12156,6 +12290,11 @@ method(object({
|
|
|
12156
12290
|
collection: string(),
|
|
12157
12291
|
filter: QueryFilterSchema.optional()
|
|
12158
12292
|
}), number()), method(object({
|
|
12293
|
+
namespace: string().optional(),
|
|
12294
|
+
collection: string(),
|
|
12295
|
+
fields: array(AggregateFieldSchema).readonly(),
|
|
12296
|
+
filter: QueryFilterSchema.optional()
|
|
12297
|
+
}), AggregateResultSchema), method(object({
|
|
12159
12298
|
namespace: string().optional(),
|
|
12160
12299
|
collection: string(),
|
|
12161
12300
|
field: string(),
|
|
@@ -12272,6 +12411,11 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
|
|
|
12272
12411
|
collection: string(),
|
|
12273
12412
|
filter: QueryFilterSchema.optional()
|
|
12274
12413
|
}), number(), { auth: "admin" }), method(object({
|
|
12414
|
+
namespace: string().optional(),
|
|
12415
|
+
collection: string(),
|
|
12416
|
+
fields: array(AggregateFieldSchema).readonly(),
|
|
12417
|
+
filter: QueryFilterSchema.optional()
|
|
12418
|
+
}), AggregateResultSchema, { auth: "admin" }), method(object({
|
|
12275
12419
|
namespace: string().optional(),
|
|
12276
12420
|
collection: string(),
|
|
12277
12421
|
field: string(),
|
|
@@ -12995,24 +13139,6 @@ var deviceProviderCapability = {
|
|
|
12995
13139
|
})
|
|
12996
13140
|
}
|
|
12997
13141
|
};
|
|
12998
|
-
/**
|
|
12999
|
-
* Device Manager capability — hub-side singleton that unifies device persistence,
|
|
13000
|
-
* live registry access, and all management operations into a single tRPC surface.
|
|
13001
|
-
*
|
|
13002
|
-
* Replaces:
|
|
13003
|
-
* - `device-persistence` capability (persistence methods absorbed here)
|
|
13004
|
-
* - `device-management.router.ts` (deleted in Phase 2)
|
|
13005
|
-
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
13006
|
-
*
|
|
13007
|
-
* All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
|
|
13008
|
-
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
13009
|
-
* - No nodeId routing needed — this is a pure hub singleton.
|
|
13010
|
-
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
13011
|
-
* - No shadow registry or cross-node aggregation required.
|
|
13012
|
-
*
|
|
13013
|
-
* Forked workers register devices back to the hub via `ctx.devices`
|
|
13014
|
-
* (DeviceManagerApi → ctx.api.deviceManager.registerDevice), same as today.
|
|
13015
|
-
*/
|
|
13016
13142
|
/** One child-placement directive on a container's `childLayout`. Structurally
|
|
13017
13143
|
* identical to `ChildLayoutEntry` in `device-management.ts` — the cap wire
|
|
13018
13144
|
* shape for the same field. The child is identified by its re-sync-stable
|
|
@@ -13381,7 +13507,7 @@ method(object({
|
|
|
13381
13507
|
* it answers today and the caller filters as it already does.
|
|
13382
13508
|
*/
|
|
13383
13509
|
deviceIds: array(number()).optional()
|
|
13384
|
-
}), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), object({
|
|
13510
|
+
}), 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({
|
|
13385
13511
|
mode: LinkedDevicesModeSchema,
|
|
13386
13512
|
devices: array(LinkedDeviceSchema)
|
|
13387
13513
|
})), 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({
|
|
@@ -14105,6 +14231,59 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
14105
14231
|
kind: "mutation",
|
|
14106
14232
|
auth: "admin"
|
|
14107
14233
|
});
|
|
14234
|
+
/**
|
|
14235
|
+
* `log-channels` — the capability an addon DECLARES its diagnostic channels
|
|
14236
|
+
* through. It stores nothing.
|
|
14237
|
+
*
|
|
14238
|
+
* ## Why a capability at all, and why this shape
|
|
14239
|
+
*
|
|
14240
|
+
* Which channels exist is knowledge only the addon has: `stream-broker` knows
|
|
14241
|
+
* webrtc/ICE/RTP, `provider-reolink` knows baichuan/handshake. A central list
|
|
14242
|
+
* maintained by hand rots at the first addition and rots INVISIBLY — nothing
|
|
14243
|
+
* fails, an operator just never sees the channel somebody added. So the list
|
|
14244
|
+
* is assembled from declarations at runtime.
|
|
14245
|
+
*
|
|
14246
|
+
* The shape is copied from `log-destination.cap.ts`, which already does
|
|
14247
|
+
* exactly this job: `mode: 'collection'`, `internal: true`,
|
|
14248
|
+
* `mount: { kind: 'skip' }` — no tRPC route, no generated hooks — while
|
|
14249
|
+
* `addons.listCapabilityProviders` still enumerates it, and the hub's
|
|
14250
|
+
* `CapabilityRegistry` still holds an RPC proxy per provider so a forked
|
|
14251
|
+
* runner's declarations reach hub-main over the transport that already exists.
|
|
14252
|
+
* No new UDS message, no second registry.
|
|
14253
|
+
*
|
|
14254
|
+
* ## What it deliberately does NOT own
|
|
14255
|
+
*
|
|
14256
|
+
* The VALUES — which channel is armed, for which cameras, until when — live in
|
|
14257
|
+
* ONE place: the logging settings document on the `system` cap
|
|
14258
|
+
* (`getLoggingSettings` / `setLoggingSettings`). Two authorities over the same
|
|
14259
|
+
* value is the defect the plan behind this work exists to remove, and
|
|
14260
|
+
* `setRequestCensus` was retired (D245) rather than allowed to be a second
|
|
14261
|
+
* one. {@link logChannelsCapability} therefore has no getter for a level, no
|
|
14262
|
+
* setter for a window and no persistence of any kind.
|
|
14263
|
+
*
|
|
14264
|
+
* ## Why `apply` is here even so
|
|
14265
|
+
*
|
|
14266
|
+
* The gate lives in the addon's PROCESS; the document lives in hub-main. Some
|
|
14267
|
+
* seam has to carry the value from the authority to the mirror, and a channel
|
|
14268
|
+
* that cannot be reached is precisely the dead knob this whole slice exists to
|
|
14269
|
+
* make impossible (D62 — `audioThresholdDbfs`, the HA entities with no source).
|
|
14270
|
+
* `apply` is that seam and nothing more: it writes an in-memory mirror, it
|
|
14271
|
+
* persists nothing, it is never the source of a value, and it is called only
|
|
14272
|
+
* with a set the hub actually read (D49 — a read that fails does not call it
|
|
14273
|
+
* at all, so no channel is silently disarmed by a bad read).
|
|
14274
|
+
*/
|
|
14275
|
+
/** What `apply` reports back — enough to log, not enough to be a second state. */
|
|
14276
|
+
var LogChannelApplyResultSchema = object({
|
|
14277
|
+
/** How many declared channels are armed in this process after the call. */
|
|
14278
|
+
armed: number().int().min(0),
|
|
14279
|
+
/**
|
|
14280
|
+
* Names the document armed that this process does not declare. Reported
|
|
14281
|
+
* rather than swallowed: a name here is either a typo or an addon that has
|
|
14282
|
+
* not booted, and both deserve a line instead of silence.
|
|
14283
|
+
*/
|
|
14284
|
+
unknown: array(string()).readonly()
|
|
14285
|
+
});
|
|
14286
|
+
method(_void(), array(LogChannelDescriptorSchema).readonly()), method(object({ windows: array(LogChannelWindowSchema).readonly() }), LogChannelApplyResultSchema, { kind: "mutation" });
|
|
14108
14287
|
var LogLevelSchema = _enum([
|
|
14109
14288
|
"debug",
|
|
14110
14289
|
"info",
|
|
@@ -29549,10 +29728,11 @@ var DiagnosticIdSchema = _enum(["request-census"]);
|
|
|
29549
29728
|
* The layers of the level hierarchy, general → specific. The most specific
|
|
29550
29729
|
* layer that carries an explicit value wins.
|
|
29551
29730
|
*
|
|
29552
|
-
* `component`
|
|
29553
|
-
*
|
|
29554
|
-
*
|
|
29555
|
-
*
|
|
29731
|
+
* `component` became RESOLVABLE on 2026-08-27: a component is a declared log
|
|
29732
|
+
* CHANNEL (`stream-broker.webrtc`, `provider-reolink.baichuan`), named by
|
|
29733
|
+
* `scopeComponent`. It was declared-but-dark in the first slice precisely so
|
|
29734
|
+
* that turning it on would not force every consumer of this document to widen
|
|
29735
|
+
* a `levelSource` enum — which is what has now not happened.
|
|
29556
29736
|
*/
|
|
29557
29737
|
var LoggingScopeKindSchema = _enum([
|
|
29558
29738
|
"cluster",
|
|
@@ -29579,6 +29759,14 @@ var LoggingLevelLayerSchema = object({
|
|
|
29579
29759
|
scope: LoggingScopeKindSchema,
|
|
29580
29760
|
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
29581
29761
|
nodeId: string().nullable(),
|
|
29762
|
+
/**
|
|
29763
|
+
* The declared channel this layer speaks for; `null` on every layer but
|
|
29764
|
+
* `component`. Never folded into `nodeId`: a component level is CLUSTER-WIDE
|
|
29765
|
+
* by design — the convention this repo settled on is one orchestrator-wide
|
|
29766
|
+
* setting, never per node (D52) — so a component layer that carried a node
|
|
29767
|
+
* would invite a per-node copy of a value that has no per-node meaning.
|
|
29768
|
+
*/
|
|
29769
|
+
component: string().nullable(),
|
|
29582
29770
|
/** Explicitly set here, or `null` when this layer inherits. */
|
|
29583
29771
|
level: LogLevelSchema$1.nullable()
|
|
29584
29772
|
});
|
|
@@ -29620,6 +29808,49 @@ var DiagnosticWindowPatchSchema = object({
|
|
|
29620
29808
|
reportEveryMs: number().int().positive().optional()
|
|
29621
29809
|
});
|
|
29622
29810
|
/**
|
|
29811
|
+
* A channel ARMED, as the document reports it.
|
|
29812
|
+
*
|
|
29813
|
+
* `armMs` is not echoed back: what an operator needs to see is the deadline
|
|
29814
|
+
* and the time left, because a diagnostic left running is itself an incident
|
|
29815
|
+
* and "armed for 10 minutes" said an hour ago is not an answer.
|
|
29816
|
+
*/
|
|
29817
|
+
var LogChannelWindowStateSchema = object({
|
|
29818
|
+
channel: string(),
|
|
29819
|
+
armed: boolean(),
|
|
29820
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
29821
|
+
armedUntilMs: number(),
|
|
29822
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
29823
|
+
remainingMs: number(),
|
|
29824
|
+
/**
|
|
29825
|
+
* The cameras it is narrowed to, or `null` for every camera.
|
|
29826
|
+
*
|
|
29827
|
+
* A channel declared `perDevice: false` can only ever report `null` here:
|
|
29828
|
+
* its lines do not carry `tags: { deviceId }`, so narrowing them would
|
|
29829
|
+
* produce a filter that silently matches nothing. The server REFUSES such a
|
|
29830
|
+
* patch rather than quietly widening it — ignoring the request would teach
|
|
29831
|
+
* the operator that per-camera filtering works on that channel when it does
|
|
29832
|
+
* not.
|
|
29833
|
+
*/
|
|
29834
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
29835
|
+
});
|
|
29836
|
+
/**
|
|
29837
|
+
* `armMs: 0` DISARMS. Same grammar as {@link DiagnosticWindowPatchSchema}, and
|
|
29838
|
+
* for the same reason: a channel is a window with a deadline, never a switch.
|
|
29839
|
+
*/
|
|
29840
|
+
var LogChannelWindowPatchSchema = object({
|
|
29841
|
+
channel: string().min(1),
|
|
29842
|
+
armMs: number().int().min(0),
|
|
29843
|
+
/**
|
|
29844
|
+
* Narrow to these numeric device ids. Absent or `null` = every camera.
|
|
29845
|
+
*
|
|
29846
|
+
* Numeric because the repo's own rule makes it possible: every log line
|
|
29847
|
+
* about a device carries `tags: { deviceId }` with the numeric id. That rule
|
|
29848
|
+
* was paid for with a 22% thumbnail gap and a 3-hour media blackout both
|
|
29849
|
+
* diagnosed by hand, and this is the first thing that collects on it.
|
|
29850
|
+
*/
|
|
29851
|
+
deviceIds: array(number().int()).readonly().nullable().optional()
|
|
29852
|
+
});
|
|
29853
|
+
/**
|
|
29623
29854
|
* A PATCH, and patches MERGE.
|
|
29624
29855
|
*
|
|
29625
29856
|
* A field absent from the patch is left exactly as it was — arming a
|
|
@@ -29638,7 +29869,14 @@ var LoggingSettingsPatchSchema = object({
|
|
|
29638
29869
|
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
29639
29870
|
* keeps running — a patch is never a full replacement.
|
|
29640
29871
|
*/
|
|
29641
|
-
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
29872
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional(),
|
|
29873
|
+
/**
|
|
29874
|
+
* Only the channels NAMED here change. An armed channel that is not listed
|
|
29875
|
+
* keeps running — same rule as `diagnostics`, because a patch that silently
|
|
29876
|
+
* disarmed the channels it did not mention would make the Levels page and
|
|
29877
|
+
* the Diagnostics page fight over the same value.
|
|
29878
|
+
*/
|
|
29879
|
+
channels: array(LogChannelWindowPatchSchema).readonly().optional()
|
|
29642
29880
|
});
|
|
29643
29881
|
/**
|
|
29644
29882
|
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
@@ -29651,9 +29889,22 @@ var LoggingSettingsPatchSchema = object({
|
|
|
29651
29889
|
* authority over the whole hierarchy and answers for every layer, so the
|
|
29652
29890
|
* layer selector needs a name the transport does not already own.
|
|
29653
29891
|
*/
|
|
29654
|
-
var GetLoggingSettingsInputSchema = object({
|
|
29892
|
+
var GetLoggingSettingsInputSchema = object({
|
|
29893
|
+
scopeNodeId: string().optional(),
|
|
29894
|
+
/**
|
|
29895
|
+
* The declared CHANNEL this document is addressed at, when the caller wants
|
|
29896
|
+
* the `component` layer. Absent = the node/cluster hierarchy only.
|
|
29897
|
+
*
|
|
29898
|
+
* Naming it separately rather than overloading `scopeNodeId` keeps the two
|
|
29899
|
+
* axes from collapsing: a component level is cluster-wide, a node level is
|
|
29900
|
+
* not, and one selector for both would make "which of these two did I just
|
|
29901
|
+
* set" unanswerable — the exact ambiguity `explicit` exists to remove.
|
|
29902
|
+
*/
|
|
29903
|
+
scopeComponent: string().optional()
|
|
29904
|
+
});
|
|
29655
29905
|
var SetLoggingSettingsInputSchema = object({
|
|
29656
29906
|
scopeNodeId: string().optional(),
|
|
29907
|
+
scopeComponent: string().optional(),
|
|
29657
29908
|
patch: LoggingSettingsPatchSchema
|
|
29658
29909
|
});
|
|
29659
29910
|
/**
|
|
@@ -29668,9 +29919,20 @@ var SetLoggingSettingsInputSchema = object({
|
|
|
29668
29919
|
var LoggingSettingsStateSchema = object({
|
|
29669
29920
|
/** The layer this document was read at. `null` = the cluster layer. */
|
|
29670
29921
|
scopeNodeId: string().nullable(),
|
|
29922
|
+
/** The channel this document was read at. `null` = no component layer. */
|
|
29923
|
+
scopeComponent: string().nullable(),
|
|
29671
29924
|
effective: LoggingEffectiveSchema,
|
|
29672
29925
|
explicit: LoggingExplicitSchema,
|
|
29673
29926
|
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
29927
|
+
/**
|
|
29928
|
+
* Every channel the cluster's addons DECLARE, gathered from the
|
|
29929
|
+
* `log-channels` providers. Not stored anywhere: assembled per read, so a
|
|
29930
|
+
* channel added by a redeployed addon appears without anybody editing a
|
|
29931
|
+
* list, and a channel whose addon is gone stops being offered.
|
|
29932
|
+
*/
|
|
29933
|
+
channels: array(LogChannelDescriptorSchema).readonly(),
|
|
29934
|
+
/** The channels ARMED right now, each with its deadline. */
|
|
29935
|
+
activeChannels: array(LogChannelWindowStateSchema).readonly(),
|
|
29674
29936
|
persisted: boolean()
|
|
29675
29937
|
});
|
|
29676
29938
|
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(), {
|
|
@@ -32655,6 +32917,12 @@ Object.freeze({
|
|
|
32655
32917
|
addonId: null,
|
|
32656
32918
|
access: "view"
|
|
32657
32919
|
},
|
|
32920
|
+
"dataStoreProvider.aggregate": {
|
|
32921
|
+
capName: "data-store-provider",
|
|
32922
|
+
capScope: "system",
|
|
32923
|
+
addonId: null,
|
|
32924
|
+
access: "view"
|
|
32925
|
+
},
|
|
32658
32926
|
"dataStoreProvider.count": {
|
|
32659
32927
|
capName: "data-store-provider",
|
|
32660
32928
|
capScope: "system",
|
|
@@ -33069,6 +33337,12 @@ Object.freeze({
|
|
|
33069
33337
|
addonId: null,
|
|
33070
33338
|
access: "view"
|
|
33071
33339
|
},
|
|
33340
|
+
"deviceManager.getChildrenBatch": {
|
|
33341
|
+
capName: "device-manager",
|
|
33342
|
+
capScope: "system",
|
|
33343
|
+
addonId: null,
|
|
33344
|
+
access: "view"
|
|
33345
|
+
},
|
|
33072
33346
|
"deviceManager.getConfigSchema": {
|
|
33073
33347
|
capName: "device-manager",
|
|
33074
33348
|
capScope: "system",
|
|
@@ -34119,6 +34393,18 @@ Object.freeze({
|
|
|
34119
34393
|
addonId: null,
|
|
34120
34394
|
access: "create"
|
|
34121
34395
|
},
|
|
34396
|
+
"logChannels.apply": {
|
|
34397
|
+
capName: "log-channels",
|
|
34398
|
+
capScope: "system",
|
|
34399
|
+
addonId: null,
|
|
34400
|
+
access: "create"
|
|
34401
|
+
},
|
|
34402
|
+
"logChannels.list": {
|
|
34403
|
+
capName: "log-channels",
|
|
34404
|
+
capScope: "system",
|
|
34405
|
+
addonId: null,
|
|
34406
|
+
access: "view"
|
|
34407
|
+
},
|
|
34122
34408
|
"logDestination.query": {
|
|
34123
34409
|
capName: "log-destination",
|
|
34124
34410
|
capScope: "system",
|
|
@@ -36273,6 +36559,12 @@ Object.freeze({
|
|
|
36273
36559
|
addonId: null,
|
|
36274
36560
|
access: "create"
|
|
36275
36561
|
},
|
|
36562
|
+
"settingsStore.aggregate": {
|
|
36563
|
+
capName: "settings-store",
|
|
36564
|
+
capScope: "system",
|
|
36565
|
+
addonId: null,
|
|
36566
|
+
access: "view"
|
|
36567
|
+
},
|
|
36276
36568
|
"settingsStore.count": {
|
|
36277
36569
|
capName: "settings-store",
|
|
36278
36570
|
capScope: "system",
|
|
@@ -37852,6 +38144,11 @@ Object.freeze({
|
|
|
37852
38144
|
form: "single",
|
|
37853
38145
|
optional: false
|
|
37854
38146
|
}],
|
|
38147
|
+
"deviceManager.getChildrenBatch": [{
|
|
38148
|
+
name: "parentDeviceIds",
|
|
38149
|
+
form: "array",
|
|
38150
|
+
optional: false
|
|
38151
|
+
}],
|
|
37855
38152
|
"deviceManager.getConfigSchema": [{
|
|
37856
38153
|
name: "deviceId",
|
|
37857
38154
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-rademacher",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.33",
|
|
4
4
|
"description": "Rademacher HomePilot device-provider addon for CamStack — wraps the @apocaliss92/noderademacher local-hub client (roller shutters over the cover cap)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|