@camstack/addon-provider-wyze 0.2.37 → 0.2.39
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
|
@@ -7500,6 +7500,111 @@ var CameraSwitchGroupSchema = object({
|
|
|
7500
7500
|
fetchedAt: number()
|
|
7501
7501
|
});
|
|
7502
7502
|
/**
|
|
7503
|
+
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
7504
|
+
* an addon declares its channels in.
|
|
7505
|
+
*
|
|
7506
|
+
* ## Two axes, deliberately separated
|
|
7507
|
+
*
|
|
7508
|
+
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
7509
|
+
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
7510
|
+
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
7511
|
+
* and rots silently. So a channel is declared where it is consulted, and the
|
|
7512
|
+
* `log-channels` capability enumerates the declarations.
|
|
7513
|
+
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
7514
|
+
* thing: the logging settings document on the `system` cap. Two authorities
|
|
7515
|
+
* over the values is the exact defect
|
|
7516
|
+
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
7517
|
+
* remove; re-introducing it from the cure side would be grotesque.
|
|
7518
|
+
*
|
|
7519
|
+
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
7520
|
+
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
7521
|
+
* the hot path with a value somebody actually read, and by
|
|
7522
|
+
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
7523
|
+
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
7524
|
+
* disarmed one (D49).
|
|
7525
|
+
*
|
|
7526
|
+
* ## The canonical call shape
|
|
7527
|
+
*
|
|
7528
|
+
* ```ts
|
|
7529
|
+
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
7530
|
+
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
7531
|
+
* }
|
|
7532
|
+
* ```
|
|
7533
|
+
*
|
|
7534
|
+
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
7535
|
+
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
7536
|
+
* object literal is never constructed because it lives inside the branch. It
|
|
7537
|
+
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
7538
|
+
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
7539
|
+
* destination floor (measured at 1.93 ns/call when off).
|
|
7540
|
+
*
|
|
7541
|
+
* ## Why a channel emits at `info`
|
|
7542
|
+
*
|
|
7543
|
+
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
7544
|
+
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
7545
|
+
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
7546
|
+
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
7547
|
+
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
7548
|
+
* emits at the channel's declared level, whose schema floor is `info`.
|
|
7549
|
+
*/
|
|
7550
|
+
/**
|
|
7551
|
+
* The level a channel writes at once armed.
|
|
7552
|
+
*
|
|
7553
|
+
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
7554
|
+
* not leave the process for Loki, and the whole point of arming a channel is
|
|
7555
|
+
* to read it later.
|
|
7556
|
+
*/
|
|
7557
|
+
var LogChannelLevelSchema = _enum([
|
|
7558
|
+
"info",
|
|
7559
|
+
"warn",
|
|
7560
|
+
"error"
|
|
7561
|
+
]);
|
|
7562
|
+
/**
|
|
7563
|
+
* What an addon declares about one channel. No value, no state — a
|
|
7564
|
+
* declaration is inert.
|
|
7565
|
+
*/
|
|
7566
|
+
var LogChannelDescriptorSchema = object({
|
|
7567
|
+
/**
|
|
7568
|
+
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
7569
|
+
* the addon's short name so an operator reading a channel list can tell who
|
|
7570
|
+
* owns it without a second lookup.
|
|
7571
|
+
*/
|
|
7572
|
+
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
7573
|
+
/** One sentence: what the operator will SEE after arming it. */
|
|
7574
|
+
description: string().min(1),
|
|
7575
|
+
/** The level its lines are emitted at. Never below `info`. */
|
|
7576
|
+
defaultLevel: LogChannelLevelSchema,
|
|
7577
|
+
/**
|
|
7578
|
+
* Whether this channel can be narrowed to a camera.
|
|
7579
|
+
*
|
|
7580
|
+
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
7581
|
+
* consulted with the numeric device id, AND every line the channel admits
|
|
7582
|
+
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
7583
|
+
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
7584
|
+
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
7585
|
+
* the body is the only way to filter.
|
|
7586
|
+
*
|
|
7587
|
+
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
7588
|
+
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
7589
|
+
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
7590
|
+
* path was never taken.
|
|
7591
|
+
*/
|
|
7592
|
+
perDevice: boolean()
|
|
7593
|
+
});
|
|
7594
|
+
/**
|
|
7595
|
+
* An armed window over one channel, as the document hands it to a mirror.
|
|
7596
|
+
*
|
|
7597
|
+
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
7598
|
+
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
7599
|
+
*/
|
|
7600
|
+
var LogChannelWindowSchema = object({
|
|
7601
|
+
channel: string().min(1),
|
|
7602
|
+
/** Epoch ms the window closes at. */
|
|
7603
|
+
armedUntilMs: number(),
|
|
7604
|
+
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
7605
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
7606
|
+
});
|
|
7607
|
+
/**
|
|
7503
7608
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
7504
7609
|
* recordings and events management surfaces.
|
|
7505
7610
|
*
|
|
@@ -11120,6 +11225,35 @@ var MutationFilterSchema = object({
|
|
|
11120
11225
|
whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
|
|
11121
11226
|
whereNot: record(string(), unknown()).optional()
|
|
11122
11227
|
});
|
|
11228
|
+
/**
|
|
11229
|
+
* One scalar an {@link settingsStoreCapability.methods.aggregate} call asks for.
|
|
11230
|
+
*
|
|
11231
|
+
* `as` names the slot in the result, so the SAME column may be asked twice with
|
|
11232
|
+
* two operations (`MIN(startMs)` and `MAX(startMs)` in one round trip) — which
|
|
11233
|
+
* a `Record<column, op>` shape could not express.
|
|
11234
|
+
*/
|
|
11235
|
+
var AggregateFieldSchema = object({
|
|
11236
|
+
/** Result key. */
|
|
11237
|
+
as: string().min(1),
|
|
11238
|
+
/** Column to aggregate. Must be a real column of a declared collection. */
|
|
11239
|
+
field: string().min(1),
|
|
11240
|
+
op: _enum([
|
|
11241
|
+
"sum",
|
|
11242
|
+
"min",
|
|
11243
|
+
"max"
|
|
11244
|
+
])
|
|
11245
|
+
});
|
|
11246
|
+
/**
|
|
11247
|
+
* `COUNT(*)` plus one number per requested field.
|
|
11248
|
+
*
|
|
11249
|
+
* `null` means NO ROW MATCHED, never zero: a `SUM` over an empty set and a sum
|
|
11250
|
+
* that really is 0 are different facts, and an accounting caller that renders
|
|
11251
|
+
* "0 bytes, oldest = 0" for "nothing here" reports a lie about a disk.
|
|
11252
|
+
*/
|
|
11253
|
+
var AggregateResultSchema = object({
|
|
11254
|
+
count: number().int(),
|
|
11255
|
+
values: record(string(), number().nullable())
|
|
11256
|
+
});
|
|
11123
11257
|
/** A single stored record: `{ id, data }`. */
|
|
11124
11258
|
var SettingsRecordSchema = object({
|
|
11125
11259
|
id: string(),
|
|
@@ -11204,6 +11338,11 @@ method(object({
|
|
|
11204
11338
|
collection: string(),
|
|
11205
11339
|
filter: QueryFilterSchema.optional()
|
|
11206
11340
|
}), number()), method(object({
|
|
11341
|
+
namespace: string().optional(),
|
|
11342
|
+
collection: string(),
|
|
11343
|
+
fields: array(AggregateFieldSchema).readonly(),
|
|
11344
|
+
filter: QueryFilterSchema.optional()
|
|
11345
|
+
}), AggregateResultSchema), method(object({
|
|
11207
11346
|
namespace: string().optional(),
|
|
11208
11347
|
collection: string(),
|
|
11209
11348
|
field: string(),
|
|
@@ -11320,6 +11459,11 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
|
|
|
11320
11459
|
collection: string(),
|
|
11321
11460
|
filter: QueryFilterSchema.optional()
|
|
11322
11461
|
}), number(), { auth: "admin" }), method(object({
|
|
11462
|
+
namespace: string().optional(),
|
|
11463
|
+
collection: string(),
|
|
11464
|
+
fields: array(AggregateFieldSchema).readonly(),
|
|
11465
|
+
filter: QueryFilterSchema.optional()
|
|
11466
|
+
}), AggregateResultSchema, { auth: "admin" }), method(object({
|
|
11323
11467
|
namespace: string().optional(),
|
|
11324
11468
|
collection: string(),
|
|
11325
11469
|
field: string(),
|
|
@@ -12060,24 +12204,6 @@ var deviceProviderCapability = {
|
|
|
12060
12204
|
})
|
|
12061
12205
|
}
|
|
12062
12206
|
};
|
|
12063
|
-
/**
|
|
12064
|
-
* Device Manager capability — hub-side singleton that unifies device persistence,
|
|
12065
|
-
* live registry access, and all management operations into a single tRPC surface.
|
|
12066
|
-
*
|
|
12067
|
-
* Replaces:
|
|
12068
|
-
* - `device-persistence` capability (persistence methods absorbed here)
|
|
12069
|
-
* - `device-management.router.ts` (deleted in Phase 2)
|
|
12070
|
-
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
12071
|
-
*
|
|
12072
|
-
* All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
|
|
12073
|
-
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
12074
|
-
* - No nodeId routing needed — this is a pure hub singleton.
|
|
12075
|
-
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
12076
|
-
* - No shadow registry or cross-node aggregation required.
|
|
12077
|
-
*
|
|
12078
|
-
* Forked workers register devices back to the hub via `ctx.devices`
|
|
12079
|
-
* (DeviceManagerApi → ctx.api.deviceManager.registerDevice), same as today.
|
|
12080
|
-
*/
|
|
12081
12207
|
/** One child-placement directive on a container's `childLayout`. Structurally
|
|
12082
12208
|
* identical to `ChildLayoutEntry` in `device-management.ts` — the cap wire
|
|
12083
12209
|
* shape for the same field. The child is identified by its re-sync-stable
|
|
@@ -12446,7 +12572,7 @@ method(object({
|
|
|
12446
12572
|
* it answers today and the caller filters as it already does.
|
|
12447
12573
|
*/
|
|
12448
12574
|
deviceIds: array(number()).optional()
|
|
12449
|
-
}), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), object({
|
|
12575
|
+
}), 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({
|
|
12450
12576
|
mode: LinkedDevicesModeSchema,
|
|
12451
12577
|
devices: array(LinkedDeviceSchema)
|
|
12452
12578
|
})), 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({
|
|
@@ -13170,6 +13296,59 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
13170
13296
|
kind: "mutation",
|
|
13171
13297
|
auth: "admin"
|
|
13172
13298
|
});
|
|
13299
|
+
/**
|
|
13300
|
+
* `log-channels` — the capability an addon DECLARES its diagnostic channels
|
|
13301
|
+
* through. It stores nothing.
|
|
13302
|
+
*
|
|
13303
|
+
* ## Why a capability at all, and why this shape
|
|
13304
|
+
*
|
|
13305
|
+
* Which channels exist is knowledge only the addon has: `stream-broker` knows
|
|
13306
|
+
* webrtc/ICE/RTP, `provider-reolink` knows baichuan/handshake. A central list
|
|
13307
|
+
* maintained by hand rots at the first addition and rots INVISIBLY — nothing
|
|
13308
|
+
* fails, an operator just never sees the channel somebody added. So the list
|
|
13309
|
+
* is assembled from declarations at runtime.
|
|
13310
|
+
*
|
|
13311
|
+
* The shape is copied from `log-destination.cap.ts`, which already does
|
|
13312
|
+
* exactly this job: `mode: 'collection'`, `internal: true`,
|
|
13313
|
+
* `mount: { kind: 'skip' }` — no tRPC route, no generated hooks — while
|
|
13314
|
+
* `addons.listCapabilityProviders` still enumerates it, and the hub's
|
|
13315
|
+
* `CapabilityRegistry` still holds an RPC proxy per provider so a forked
|
|
13316
|
+
* runner's declarations reach hub-main over the transport that already exists.
|
|
13317
|
+
* No new UDS message, no second registry.
|
|
13318
|
+
*
|
|
13319
|
+
* ## What it deliberately does NOT own
|
|
13320
|
+
*
|
|
13321
|
+
* The VALUES — which channel is armed, for which cameras, until when — live in
|
|
13322
|
+
* ONE place: the logging settings document on the `system` cap
|
|
13323
|
+
* (`getLoggingSettings` / `setLoggingSettings`). Two authorities over the same
|
|
13324
|
+
* value is the defect the plan behind this work exists to remove, and
|
|
13325
|
+
* `setRequestCensus` was retired (D245) rather than allowed to be a second
|
|
13326
|
+
* one. {@link logChannelsCapability} therefore has no getter for a level, no
|
|
13327
|
+
* setter for a window and no persistence of any kind.
|
|
13328
|
+
*
|
|
13329
|
+
* ## Why `apply` is here even so
|
|
13330
|
+
*
|
|
13331
|
+
* The gate lives in the addon's PROCESS; the document lives in hub-main. Some
|
|
13332
|
+
* seam has to carry the value from the authority to the mirror, and a channel
|
|
13333
|
+
* that cannot be reached is precisely the dead knob this whole slice exists to
|
|
13334
|
+
* make impossible (D62 — `audioThresholdDbfs`, the HA entities with no source).
|
|
13335
|
+
* `apply` is that seam and nothing more: it writes an in-memory mirror, it
|
|
13336
|
+
* persists nothing, it is never the source of a value, and it is called only
|
|
13337
|
+
* with a set the hub actually read (D49 — a read that fails does not call it
|
|
13338
|
+
* at all, so no channel is silently disarmed by a bad read).
|
|
13339
|
+
*/
|
|
13340
|
+
/** What `apply` reports back — enough to log, not enough to be a second state. */
|
|
13341
|
+
var LogChannelApplyResultSchema = object({
|
|
13342
|
+
/** How many declared channels are armed in this process after the call. */
|
|
13343
|
+
armed: number().int().min(0),
|
|
13344
|
+
/**
|
|
13345
|
+
* Names the document armed that this process does not declare. Reported
|
|
13346
|
+
* rather than swallowed: a name here is either a typo or an addon that has
|
|
13347
|
+
* not booted, and both deserve a line instead of silence.
|
|
13348
|
+
*/
|
|
13349
|
+
unknown: array(string()).readonly()
|
|
13350
|
+
});
|
|
13351
|
+
method(_void(), array(LogChannelDescriptorSchema).readonly()), method(object({ windows: array(LogChannelWindowSchema).readonly() }), LogChannelApplyResultSchema, { kind: "mutation" });
|
|
13173
13352
|
var LogLevelSchema = _enum([
|
|
13174
13353
|
"debug",
|
|
13175
13354
|
"info",
|
|
@@ -28726,10 +28905,11 @@ var DiagnosticIdSchema = _enum(["request-census"]);
|
|
|
28726
28905
|
* The layers of the level hierarchy, general → specific. The most specific
|
|
28727
28906
|
* layer that carries an explicit value wins.
|
|
28728
28907
|
*
|
|
28729
|
-
* `component`
|
|
28730
|
-
*
|
|
28731
|
-
*
|
|
28732
|
-
*
|
|
28908
|
+
* `component` became RESOLVABLE on 2026-08-27: a component is a declared log
|
|
28909
|
+
* CHANNEL (`stream-broker.webrtc`, `provider-reolink.baichuan`), named by
|
|
28910
|
+
* `scopeComponent`. It was declared-but-dark in the first slice precisely so
|
|
28911
|
+
* that turning it on would not force every consumer of this document to widen
|
|
28912
|
+
* a `levelSource` enum — which is what has now not happened.
|
|
28733
28913
|
*/
|
|
28734
28914
|
var LoggingScopeKindSchema = _enum([
|
|
28735
28915
|
"cluster",
|
|
@@ -28756,6 +28936,14 @@ var LoggingLevelLayerSchema = object({
|
|
|
28756
28936
|
scope: LoggingScopeKindSchema,
|
|
28757
28937
|
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
28758
28938
|
nodeId: string().nullable(),
|
|
28939
|
+
/**
|
|
28940
|
+
* The declared channel this layer speaks for; `null` on every layer but
|
|
28941
|
+
* `component`. Never folded into `nodeId`: a component level is CLUSTER-WIDE
|
|
28942
|
+
* by design — the convention this repo settled on is one orchestrator-wide
|
|
28943
|
+
* setting, never per node (D52) — so a component layer that carried a node
|
|
28944
|
+
* would invite a per-node copy of a value that has no per-node meaning.
|
|
28945
|
+
*/
|
|
28946
|
+
component: string().nullable(),
|
|
28759
28947
|
/** Explicitly set here, or `null` when this layer inherits. */
|
|
28760
28948
|
level: LogLevelSchema$1.nullable()
|
|
28761
28949
|
});
|
|
@@ -28797,6 +28985,49 @@ var DiagnosticWindowPatchSchema = object({
|
|
|
28797
28985
|
reportEveryMs: number().int().positive().optional()
|
|
28798
28986
|
});
|
|
28799
28987
|
/**
|
|
28988
|
+
* A channel ARMED, as the document reports it.
|
|
28989
|
+
*
|
|
28990
|
+
* `armMs` is not echoed back: what an operator needs to see is the deadline
|
|
28991
|
+
* and the time left, because a diagnostic left running is itself an incident
|
|
28992
|
+
* and "armed for 10 minutes" said an hour ago is not an answer.
|
|
28993
|
+
*/
|
|
28994
|
+
var LogChannelWindowStateSchema = object({
|
|
28995
|
+
channel: string(),
|
|
28996
|
+
armed: boolean(),
|
|
28997
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
28998
|
+
armedUntilMs: number(),
|
|
28999
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
29000
|
+
remainingMs: number(),
|
|
29001
|
+
/**
|
|
29002
|
+
* The cameras it is narrowed to, or `null` for every camera.
|
|
29003
|
+
*
|
|
29004
|
+
* A channel declared `perDevice: false` can only ever report `null` here:
|
|
29005
|
+
* its lines do not carry `tags: { deviceId }`, so narrowing them would
|
|
29006
|
+
* produce a filter that silently matches nothing. The server REFUSES such a
|
|
29007
|
+
* patch rather than quietly widening it — ignoring the request would teach
|
|
29008
|
+
* the operator that per-camera filtering works on that channel when it does
|
|
29009
|
+
* not.
|
|
29010
|
+
*/
|
|
29011
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
29012
|
+
});
|
|
29013
|
+
/**
|
|
29014
|
+
* `armMs: 0` DISARMS. Same grammar as {@link DiagnosticWindowPatchSchema}, and
|
|
29015
|
+
* for the same reason: a channel is a window with a deadline, never a switch.
|
|
29016
|
+
*/
|
|
29017
|
+
var LogChannelWindowPatchSchema = object({
|
|
29018
|
+
channel: string().min(1),
|
|
29019
|
+
armMs: number().int().min(0),
|
|
29020
|
+
/**
|
|
29021
|
+
* Narrow to these numeric device ids. Absent or `null` = every camera.
|
|
29022
|
+
*
|
|
29023
|
+
* Numeric because the repo's own rule makes it possible: every log line
|
|
29024
|
+
* about a device carries `tags: { deviceId }` with the numeric id. That rule
|
|
29025
|
+
* was paid for with a 22% thumbnail gap and a 3-hour media blackout both
|
|
29026
|
+
* diagnosed by hand, and this is the first thing that collects on it.
|
|
29027
|
+
*/
|
|
29028
|
+
deviceIds: array(number().int()).readonly().nullable().optional()
|
|
29029
|
+
});
|
|
29030
|
+
/**
|
|
28800
29031
|
* A PATCH, and patches MERGE.
|
|
28801
29032
|
*
|
|
28802
29033
|
* A field absent from the patch is left exactly as it was — arming a
|
|
@@ -28815,7 +29046,14 @@ var LoggingSettingsPatchSchema = object({
|
|
|
28815
29046
|
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
28816
29047
|
* keeps running — a patch is never a full replacement.
|
|
28817
29048
|
*/
|
|
28818
|
-
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
29049
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional(),
|
|
29050
|
+
/**
|
|
29051
|
+
* Only the channels NAMED here change. An armed channel that is not listed
|
|
29052
|
+
* keeps running — same rule as `diagnostics`, because a patch that silently
|
|
29053
|
+
* disarmed the channels it did not mention would make the Levels page and
|
|
29054
|
+
* the Diagnostics page fight over the same value.
|
|
29055
|
+
*/
|
|
29056
|
+
channels: array(LogChannelWindowPatchSchema).readonly().optional()
|
|
28819
29057
|
});
|
|
28820
29058
|
/**
|
|
28821
29059
|
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
@@ -28828,9 +29066,22 @@ var LoggingSettingsPatchSchema = object({
|
|
|
28828
29066
|
* authority over the whole hierarchy and answers for every layer, so the
|
|
28829
29067
|
* layer selector needs a name the transport does not already own.
|
|
28830
29068
|
*/
|
|
28831
|
-
var GetLoggingSettingsInputSchema = object({
|
|
29069
|
+
var GetLoggingSettingsInputSchema = object({
|
|
29070
|
+
scopeNodeId: string().optional(),
|
|
29071
|
+
/**
|
|
29072
|
+
* The declared CHANNEL this document is addressed at, when the caller wants
|
|
29073
|
+
* the `component` layer. Absent = the node/cluster hierarchy only.
|
|
29074
|
+
*
|
|
29075
|
+
* Naming it separately rather than overloading `scopeNodeId` keeps the two
|
|
29076
|
+
* axes from collapsing: a component level is cluster-wide, a node level is
|
|
29077
|
+
* not, and one selector for both would make "which of these two did I just
|
|
29078
|
+
* set" unanswerable — the exact ambiguity `explicit` exists to remove.
|
|
29079
|
+
*/
|
|
29080
|
+
scopeComponent: string().optional()
|
|
29081
|
+
});
|
|
28832
29082
|
var SetLoggingSettingsInputSchema = object({
|
|
28833
29083
|
scopeNodeId: string().optional(),
|
|
29084
|
+
scopeComponent: string().optional(),
|
|
28834
29085
|
patch: LoggingSettingsPatchSchema
|
|
28835
29086
|
});
|
|
28836
29087
|
/**
|
|
@@ -28845,9 +29096,20 @@ var SetLoggingSettingsInputSchema = object({
|
|
|
28845
29096
|
var LoggingSettingsStateSchema = object({
|
|
28846
29097
|
/** The layer this document was read at. `null` = the cluster layer. */
|
|
28847
29098
|
scopeNodeId: string().nullable(),
|
|
29099
|
+
/** The channel this document was read at. `null` = no component layer. */
|
|
29100
|
+
scopeComponent: string().nullable(),
|
|
28848
29101
|
effective: LoggingEffectiveSchema,
|
|
28849
29102
|
explicit: LoggingExplicitSchema,
|
|
28850
29103
|
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
29104
|
+
/**
|
|
29105
|
+
* Every channel the cluster's addons DECLARE, gathered from the
|
|
29106
|
+
* `log-channels` providers. Not stored anywhere: assembled per read, so a
|
|
29107
|
+
* channel added by a redeployed addon appears without anybody editing a
|
|
29108
|
+
* list, and a channel whose addon is gone stops being offered.
|
|
29109
|
+
*/
|
|
29110
|
+
channels: array(LogChannelDescriptorSchema).readonly(),
|
|
29111
|
+
/** The channels ARMED right now, each with its deadline. */
|
|
29112
|
+
activeChannels: array(LogChannelWindowStateSchema).readonly(),
|
|
28851
29113
|
persisted: boolean()
|
|
28852
29114
|
});
|
|
28853
29115
|
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(), {
|
|
@@ -31832,6 +32094,12 @@ Object.freeze({
|
|
|
31832
32094
|
addonId: null,
|
|
31833
32095
|
access: "view"
|
|
31834
32096
|
},
|
|
32097
|
+
"dataStoreProvider.aggregate": {
|
|
32098
|
+
capName: "data-store-provider",
|
|
32099
|
+
capScope: "system",
|
|
32100
|
+
addonId: null,
|
|
32101
|
+
access: "view"
|
|
32102
|
+
},
|
|
31835
32103
|
"dataStoreProvider.count": {
|
|
31836
32104
|
capName: "data-store-provider",
|
|
31837
32105
|
capScope: "system",
|
|
@@ -32246,6 +32514,12 @@ Object.freeze({
|
|
|
32246
32514
|
addonId: null,
|
|
32247
32515
|
access: "view"
|
|
32248
32516
|
},
|
|
32517
|
+
"deviceManager.getChildrenBatch": {
|
|
32518
|
+
capName: "device-manager",
|
|
32519
|
+
capScope: "system",
|
|
32520
|
+
addonId: null,
|
|
32521
|
+
access: "view"
|
|
32522
|
+
},
|
|
32249
32523
|
"deviceManager.getConfigSchema": {
|
|
32250
32524
|
capName: "device-manager",
|
|
32251
32525
|
capScope: "system",
|
|
@@ -33296,6 +33570,18 @@ Object.freeze({
|
|
|
33296
33570
|
addonId: null,
|
|
33297
33571
|
access: "create"
|
|
33298
33572
|
},
|
|
33573
|
+
"logChannels.apply": {
|
|
33574
|
+
capName: "log-channels",
|
|
33575
|
+
capScope: "system",
|
|
33576
|
+
addonId: null,
|
|
33577
|
+
access: "create"
|
|
33578
|
+
},
|
|
33579
|
+
"logChannels.list": {
|
|
33580
|
+
capName: "log-channels",
|
|
33581
|
+
capScope: "system",
|
|
33582
|
+
addonId: null,
|
|
33583
|
+
access: "view"
|
|
33584
|
+
},
|
|
33299
33585
|
"logDestination.query": {
|
|
33300
33586
|
capName: "log-destination",
|
|
33301
33587
|
capScope: "system",
|
|
@@ -35450,6 +35736,12 @@ Object.freeze({
|
|
|
35450
35736
|
addonId: null,
|
|
35451
35737
|
access: "create"
|
|
35452
35738
|
},
|
|
35739
|
+
"settingsStore.aggregate": {
|
|
35740
|
+
capName: "settings-store",
|
|
35741
|
+
capScope: "system",
|
|
35742
|
+
addonId: null,
|
|
35743
|
+
access: "view"
|
|
35744
|
+
},
|
|
35453
35745
|
"settingsStore.count": {
|
|
35454
35746
|
capName: "settings-store",
|
|
35455
35747
|
capScope: "system",
|
|
@@ -37029,6 +37321,11 @@ Object.freeze({
|
|
|
37029
37321
|
form: "single",
|
|
37030
37322
|
optional: false
|
|
37031
37323
|
}],
|
|
37324
|
+
"deviceManager.getChildrenBatch": [{
|
|
37325
|
+
name: "parentDeviceIds",
|
|
37326
|
+
form: "array",
|
|
37327
|
+
optional: false
|
|
37328
|
+
}],
|
|
37032
37329
|
"deviceManager.getConfigSchema": [{
|
|
37033
37330
|
name: "deviceId",
|
|
37034
37331
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -7479,6 +7479,111 @@ var CameraSwitchGroupSchema = object({
|
|
|
7479
7479
|
fetchedAt: number()
|
|
7480
7480
|
});
|
|
7481
7481
|
/**
|
|
7482
|
+
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
7483
|
+
* an addon declares its channels in.
|
|
7484
|
+
*
|
|
7485
|
+
* ## Two axes, deliberately separated
|
|
7486
|
+
*
|
|
7487
|
+
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
7488
|
+
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
7489
|
+
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
7490
|
+
* and rots silently. So a channel is declared where it is consulted, and the
|
|
7491
|
+
* `log-channels` capability enumerates the declarations.
|
|
7492
|
+
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
7493
|
+
* thing: the logging settings document on the `system` cap. Two authorities
|
|
7494
|
+
* over the values is the exact defect
|
|
7495
|
+
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
7496
|
+
* remove; re-introducing it from the cure side would be grotesque.
|
|
7497
|
+
*
|
|
7498
|
+
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
7499
|
+
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
7500
|
+
* the hot path with a value somebody actually read, and by
|
|
7501
|
+
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
7502
|
+
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
7503
|
+
* disarmed one (D49).
|
|
7504
|
+
*
|
|
7505
|
+
* ## The canonical call shape
|
|
7506
|
+
*
|
|
7507
|
+
* ```ts
|
|
7508
|
+
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
7509
|
+
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
7510
|
+
* }
|
|
7511
|
+
* ```
|
|
7512
|
+
*
|
|
7513
|
+
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
7514
|
+
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
7515
|
+
* object literal is never constructed because it lives inside the branch. It
|
|
7516
|
+
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
7517
|
+
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
7518
|
+
* destination floor (measured at 1.93 ns/call when off).
|
|
7519
|
+
*
|
|
7520
|
+
* ## Why a channel emits at `info`
|
|
7521
|
+
*
|
|
7522
|
+
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
7523
|
+
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
7524
|
+
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
7525
|
+
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
7526
|
+
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
7527
|
+
* emits at the channel's declared level, whose schema floor is `info`.
|
|
7528
|
+
*/
|
|
7529
|
+
/**
|
|
7530
|
+
* The level a channel writes at once armed.
|
|
7531
|
+
*
|
|
7532
|
+
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
7533
|
+
* not leave the process for Loki, and the whole point of arming a channel is
|
|
7534
|
+
* to read it later.
|
|
7535
|
+
*/
|
|
7536
|
+
var LogChannelLevelSchema = _enum([
|
|
7537
|
+
"info",
|
|
7538
|
+
"warn",
|
|
7539
|
+
"error"
|
|
7540
|
+
]);
|
|
7541
|
+
/**
|
|
7542
|
+
* What an addon declares about one channel. No value, no state — a
|
|
7543
|
+
* declaration is inert.
|
|
7544
|
+
*/
|
|
7545
|
+
var LogChannelDescriptorSchema = object({
|
|
7546
|
+
/**
|
|
7547
|
+
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
7548
|
+
* the addon's short name so an operator reading a channel list can tell who
|
|
7549
|
+
* owns it without a second lookup.
|
|
7550
|
+
*/
|
|
7551
|
+
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
7552
|
+
/** One sentence: what the operator will SEE after arming it. */
|
|
7553
|
+
description: string().min(1),
|
|
7554
|
+
/** The level its lines are emitted at. Never below `info`. */
|
|
7555
|
+
defaultLevel: LogChannelLevelSchema,
|
|
7556
|
+
/**
|
|
7557
|
+
* Whether this channel can be narrowed to a camera.
|
|
7558
|
+
*
|
|
7559
|
+
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
7560
|
+
* consulted with the numeric device id, AND every line the channel admits
|
|
7561
|
+
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
7562
|
+
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
7563
|
+
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
7564
|
+
* the body is the only way to filter.
|
|
7565
|
+
*
|
|
7566
|
+
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
7567
|
+
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
7568
|
+
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
7569
|
+
* path was never taken.
|
|
7570
|
+
*/
|
|
7571
|
+
perDevice: boolean()
|
|
7572
|
+
});
|
|
7573
|
+
/**
|
|
7574
|
+
* An armed window over one channel, as the document hands it to a mirror.
|
|
7575
|
+
*
|
|
7576
|
+
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
7577
|
+
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
7578
|
+
*/
|
|
7579
|
+
var LogChannelWindowSchema = object({
|
|
7580
|
+
channel: string().min(1),
|
|
7581
|
+
/** Epoch ms the window closes at. */
|
|
7582
|
+
armedUntilMs: number(),
|
|
7583
|
+
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
7584
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
7585
|
+
});
|
|
7586
|
+
/**
|
|
7482
7587
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
7483
7588
|
* recordings and events management surfaces.
|
|
7484
7589
|
*
|
|
@@ -11099,6 +11204,35 @@ var MutationFilterSchema = object({
|
|
|
11099
11204
|
whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
|
|
11100
11205
|
whereNot: record(string(), unknown()).optional()
|
|
11101
11206
|
});
|
|
11207
|
+
/**
|
|
11208
|
+
* One scalar an {@link settingsStoreCapability.methods.aggregate} call asks for.
|
|
11209
|
+
*
|
|
11210
|
+
* `as` names the slot in the result, so the SAME column may be asked twice with
|
|
11211
|
+
* two operations (`MIN(startMs)` and `MAX(startMs)` in one round trip) — which
|
|
11212
|
+
* a `Record<column, op>` shape could not express.
|
|
11213
|
+
*/
|
|
11214
|
+
var AggregateFieldSchema = object({
|
|
11215
|
+
/** Result key. */
|
|
11216
|
+
as: string().min(1),
|
|
11217
|
+
/** Column to aggregate. Must be a real column of a declared collection. */
|
|
11218
|
+
field: string().min(1),
|
|
11219
|
+
op: _enum([
|
|
11220
|
+
"sum",
|
|
11221
|
+
"min",
|
|
11222
|
+
"max"
|
|
11223
|
+
])
|
|
11224
|
+
});
|
|
11225
|
+
/**
|
|
11226
|
+
* `COUNT(*)` plus one number per requested field.
|
|
11227
|
+
*
|
|
11228
|
+
* `null` means NO ROW MATCHED, never zero: a `SUM` over an empty set and a sum
|
|
11229
|
+
* that really is 0 are different facts, and an accounting caller that renders
|
|
11230
|
+
* "0 bytes, oldest = 0" for "nothing here" reports a lie about a disk.
|
|
11231
|
+
*/
|
|
11232
|
+
var AggregateResultSchema = object({
|
|
11233
|
+
count: number().int(),
|
|
11234
|
+
values: record(string(), number().nullable())
|
|
11235
|
+
});
|
|
11102
11236
|
/** A single stored record: `{ id, data }`. */
|
|
11103
11237
|
var SettingsRecordSchema = object({
|
|
11104
11238
|
id: string(),
|
|
@@ -11183,6 +11317,11 @@ method(object({
|
|
|
11183
11317
|
collection: string(),
|
|
11184
11318
|
filter: QueryFilterSchema.optional()
|
|
11185
11319
|
}), number()), method(object({
|
|
11320
|
+
namespace: string().optional(),
|
|
11321
|
+
collection: string(),
|
|
11322
|
+
fields: array(AggregateFieldSchema).readonly(),
|
|
11323
|
+
filter: QueryFilterSchema.optional()
|
|
11324
|
+
}), AggregateResultSchema), method(object({
|
|
11186
11325
|
namespace: string().optional(),
|
|
11187
11326
|
collection: string(),
|
|
11188
11327
|
field: string(),
|
|
@@ -11299,6 +11438,11 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
|
|
|
11299
11438
|
collection: string(),
|
|
11300
11439
|
filter: QueryFilterSchema.optional()
|
|
11301
11440
|
}), number(), { auth: "admin" }), method(object({
|
|
11441
|
+
namespace: string().optional(),
|
|
11442
|
+
collection: string(),
|
|
11443
|
+
fields: array(AggregateFieldSchema).readonly(),
|
|
11444
|
+
filter: QueryFilterSchema.optional()
|
|
11445
|
+
}), AggregateResultSchema, { auth: "admin" }), method(object({
|
|
11302
11446
|
namespace: string().optional(),
|
|
11303
11447
|
collection: string(),
|
|
11304
11448
|
field: string(),
|
|
@@ -12039,24 +12183,6 @@ var deviceProviderCapability = {
|
|
|
12039
12183
|
})
|
|
12040
12184
|
}
|
|
12041
12185
|
};
|
|
12042
|
-
/**
|
|
12043
|
-
* Device Manager capability — hub-side singleton that unifies device persistence,
|
|
12044
|
-
* live registry access, and all management operations into a single tRPC surface.
|
|
12045
|
-
*
|
|
12046
|
-
* Replaces:
|
|
12047
|
-
* - `device-persistence` capability (persistence methods absorbed here)
|
|
12048
|
-
* - `device-management.router.ts` (deleted in Phase 2)
|
|
12049
|
-
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
12050
|
-
*
|
|
12051
|
-
* All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
|
|
12052
|
-
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
12053
|
-
* - No nodeId routing needed — this is a pure hub singleton.
|
|
12054
|
-
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
12055
|
-
* - No shadow registry or cross-node aggregation required.
|
|
12056
|
-
*
|
|
12057
|
-
* Forked workers register devices back to the hub via `ctx.devices`
|
|
12058
|
-
* (DeviceManagerApi → ctx.api.deviceManager.registerDevice), same as today.
|
|
12059
|
-
*/
|
|
12060
12186
|
/** One child-placement directive on a container's `childLayout`. Structurally
|
|
12061
12187
|
* identical to `ChildLayoutEntry` in `device-management.ts` — the cap wire
|
|
12062
12188
|
* shape for the same field. The child is identified by its re-sync-stable
|
|
@@ -12425,7 +12551,7 @@ method(object({
|
|
|
12425
12551
|
* it answers today and the caller filters as it already does.
|
|
12426
12552
|
*/
|
|
12427
12553
|
deviceIds: array(number()).optional()
|
|
12428
|
-
}), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), object({
|
|
12554
|
+
}), 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({
|
|
12429
12555
|
mode: LinkedDevicesModeSchema,
|
|
12430
12556
|
devices: array(LinkedDeviceSchema)
|
|
12431
12557
|
})), 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({
|
|
@@ -13149,6 +13275,59 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
13149
13275
|
kind: "mutation",
|
|
13150
13276
|
auth: "admin"
|
|
13151
13277
|
});
|
|
13278
|
+
/**
|
|
13279
|
+
* `log-channels` — the capability an addon DECLARES its diagnostic channels
|
|
13280
|
+
* through. It stores nothing.
|
|
13281
|
+
*
|
|
13282
|
+
* ## Why a capability at all, and why this shape
|
|
13283
|
+
*
|
|
13284
|
+
* Which channels exist is knowledge only the addon has: `stream-broker` knows
|
|
13285
|
+
* webrtc/ICE/RTP, `provider-reolink` knows baichuan/handshake. A central list
|
|
13286
|
+
* maintained by hand rots at the first addition and rots INVISIBLY — nothing
|
|
13287
|
+
* fails, an operator just never sees the channel somebody added. So the list
|
|
13288
|
+
* is assembled from declarations at runtime.
|
|
13289
|
+
*
|
|
13290
|
+
* The shape is copied from `log-destination.cap.ts`, which already does
|
|
13291
|
+
* exactly this job: `mode: 'collection'`, `internal: true`,
|
|
13292
|
+
* `mount: { kind: 'skip' }` — no tRPC route, no generated hooks — while
|
|
13293
|
+
* `addons.listCapabilityProviders` still enumerates it, and the hub's
|
|
13294
|
+
* `CapabilityRegistry` still holds an RPC proxy per provider so a forked
|
|
13295
|
+
* runner's declarations reach hub-main over the transport that already exists.
|
|
13296
|
+
* No new UDS message, no second registry.
|
|
13297
|
+
*
|
|
13298
|
+
* ## What it deliberately does NOT own
|
|
13299
|
+
*
|
|
13300
|
+
* The VALUES — which channel is armed, for which cameras, until when — live in
|
|
13301
|
+
* ONE place: the logging settings document on the `system` cap
|
|
13302
|
+
* (`getLoggingSettings` / `setLoggingSettings`). Two authorities over the same
|
|
13303
|
+
* value is the defect the plan behind this work exists to remove, and
|
|
13304
|
+
* `setRequestCensus` was retired (D245) rather than allowed to be a second
|
|
13305
|
+
* one. {@link logChannelsCapability} therefore has no getter for a level, no
|
|
13306
|
+
* setter for a window and no persistence of any kind.
|
|
13307
|
+
*
|
|
13308
|
+
* ## Why `apply` is here even so
|
|
13309
|
+
*
|
|
13310
|
+
* The gate lives in the addon's PROCESS; the document lives in hub-main. Some
|
|
13311
|
+
* seam has to carry the value from the authority to the mirror, and a channel
|
|
13312
|
+
* that cannot be reached is precisely the dead knob this whole slice exists to
|
|
13313
|
+
* make impossible (D62 — `audioThresholdDbfs`, the HA entities with no source).
|
|
13314
|
+
* `apply` is that seam and nothing more: it writes an in-memory mirror, it
|
|
13315
|
+
* persists nothing, it is never the source of a value, and it is called only
|
|
13316
|
+
* with a set the hub actually read (D49 — a read that fails does not call it
|
|
13317
|
+
* at all, so no channel is silently disarmed by a bad read).
|
|
13318
|
+
*/
|
|
13319
|
+
/** What `apply` reports back — enough to log, not enough to be a second state. */
|
|
13320
|
+
var LogChannelApplyResultSchema = object({
|
|
13321
|
+
/** How many declared channels are armed in this process after the call. */
|
|
13322
|
+
armed: number().int().min(0),
|
|
13323
|
+
/**
|
|
13324
|
+
* Names the document armed that this process does not declare. Reported
|
|
13325
|
+
* rather than swallowed: a name here is either a typo or an addon that has
|
|
13326
|
+
* not booted, and both deserve a line instead of silence.
|
|
13327
|
+
*/
|
|
13328
|
+
unknown: array(string()).readonly()
|
|
13329
|
+
});
|
|
13330
|
+
method(_void(), array(LogChannelDescriptorSchema).readonly()), method(object({ windows: array(LogChannelWindowSchema).readonly() }), LogChannelApplyResultSchema, { kind: "mutation" });
|
|
13152
13331
|
var LogLevelSchema = _enum([
|
|
13153
13332
|
"debug",
|
|
13154
13333
|
"info",
|
|
@@ -28705,10 +28884,11 @@ var DiagnosticIdSchema = _enum(["request-census"]);
|
|
|
28705
28884
|
* The layers of the level hierarchy, general → specific. The most specific
|
|
28706
28885
|
* layer that carries an explicit value wins.
|
|
28707
28886
|
*
|
|
28708
|
-
* `component`
|
|
28709
|
-
*
|
|
28710
|
-
*
|
|
28711
|
-
*
|
|
28887
|
+
* `component` became RESOLVABLE on 2026-08-27: a component is a declared log
|
|
28888
|
+
* CHANNEL (`stream-broker.webrtc`, `provider-reolink.baichuan`), named by
|
|
28889
|
+
* `scopeComponent`. It was declared-but-dark in the first slice precisely so
|
|
28890
|
+
* that turning it on would not force every consumer of this document to widen
|
|
28891
|
+
* a `levelSource` enum — which is what has now not happened.
|
|
28712
28892
|
*/
|
|
28713
28893
|
var LoggingScopeKindSchema = _enum([
|
|
28714
28894
|
"cluster",
|
|
@@ -28735,6 +28915,14 @@ var LoggingLevelLayerSchema = object({
|
|
|
28735
28915
|
scope: LoggingScopeKindSchema,
|
|
28736
28916
|
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
28737
28917
|
nodeId: string().nullable(),
|
|
28918
|
+
/**
|
|
28919
|
+
* The declared channel this layer speaks for; `null` on every layer but
|
|
28920
|
+
* `component`. Never folded into `nodeId`: a component level is CLUSTER-WIDE
|
|
28921
|
+
* by design — the convention this repo settled on is one orchestrator-wide
|
|
28922
|
+
* setting, never per node (D52) — so a component layer that carried a node
|
|
28923
|
+
* would invite a per-node copy of a value that has no per-node meaning.
|
|
28924
|
+
*/
|
|
28925
|
+
component: string().nullable(),
|
|
28738
28926
|
/** Explicitly set here, or `null` when this layer inherits. */
|
|
28739
28927
|
level: LogLevelSchema$1.nullable()
|
|
28740
28928
|
});
|
|
@@ -28776,6 +28964,49 @@ var DiagnosticWindowPatchSchema = object({
|
|
|
28776
28964
|
reportEveryMs: number().int().positive().optional()
|
|
28777
28965
|
});
|
|
28778
28966
|
/**
|
|
28967
|
+
* A channel ARMED, as the document reports it.
|
|
28968
|
+
*
|
|
28969
|
+
* `armMs` is not echoed back: what an operator needs to see is the deadline
|
|
28970
|
+
* and the time left, because a diagnostic left running is itself an incident
|
|
28971
|
+
* and "armed for 10 minutes" said an hour ago is not an answer.
|
|
28972
|
+
*/
|
|
28973
|
+
var LogChannelWindowStateSchema = object({
|
|
28974
|
+
channel: string(),
|
|
28975
|
+
armed: boolean(),
|
|
28976
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
28977
|
+
armedUntilMs: number(),
|
|
28978
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
28979
|
+
remainingMs: number(),
|
|
28980
|
+
/**
|
|
28981
|
+
* The cameras it is narrowed to, or `null` for every camera.
|
|
28982
|
+
*
|
|
28983
|
+
* A channel declared `perDevice: false` can only ever report `null` here:
|
|
28984
|
+
* its lines do not carry `tags: { deviceId }`, so narrowing them would
|
|
28985
|
+
* produce a filter that silently matches nothing. The server REFUSES such a
|
|
28986
|
+
* patch rather than quietly widening it — ignoring the request would teach
|
|
28987
|
+
* the operator that per-camera filtering works on that channel when it does
|
|
28988
|
+
* not.
|
|
28989
|
+
*/
|
|
28990
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
28991
|
+
});
|
|
28992
|
+
/**
|
|
28993
|
+
* `armMs: 0` DISARMS. Same grammar as {@link DiagnosticWindowPatchSchema}, and
|
|
28994
|
+
* for the same reason: a channel is a window with a deadline, never a switch.
|
|
28995
|
+
*/
|
|
28996
|
+
var LogChannelWindowPatchSchema = object({
|
|
28997
|
+
channel: string().min(1),
|
|
28998
|
+
armMs: number().int().min(0),
|
|
28999
|
+
/**
|
|
29000
|
+
* Narrow to these numeric device ids. Absent or `null` = every camera.
|
|
29001
|
+
*
|
|
29002
|
+
* Numeric because the repo's own rule makes it possible: every log line
|
|
29003
|
+
* about a device carries `tags: { deviceId }` with the numeric id. That rule
|
|
29004
|
+
* was paid for with a 22% thumbnail gap and a 3-hour media blackout both
|
|
29005
|
+
* diagnosed by hand, and this is the first thing that collects on it.
|
|
29006
|
+
*/
|
|
29007
|
+
deviceIds: array(number().int()).readonly().nullable().optional()
|
|
29008
|
+
});
|
|
29009
|
+
/**
|
|
28779
29010
|
* A PATCH, and patches MERGE.
|
|
28780
29011
|
*
|
|
28781
29012
|
* A field absent from the patch is left exactly as it was — arming a
|
|
@@ -28794,7 +29025,14 @@ var LoggingSettingsPatchSchema = object({
|
|
|
28794
29025
|
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
28795
29026
|
* keeps running — a patch is never a full replacement.
|
|
28796
29027
|
*/
|
|
28797
|
-
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
29028
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional(),
|
|
29029
|
+
/**
|
|
29030
|
+
* Only the channels NAMED here change. An armed channel that is not listed
|
|
29031
|
+
* keeps running — same rule as `diagnostics`, because a patch that silently
|
|
29032
|
+
* disarmed the channels it did not mention would make the Levels page and
|
|
29033
|
+
* the Diagnostics page fight over the same value.
|
|
29034
|
+
*/
|
|
29035
|
+
channels: array(LogChannelWindowPatchSchema).readonly().optional()
|
|
28798
29036
|
});
|
|
28799
29037
|
/**
|
|
28800
29038
|
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
@@ -28807,9 +29045,22 @@ var LoggingSettingsPatchSchema = object({
|
|
|
28807
29045
|
* authority over the whole hierarchy and answers for every layer, so the
|
|
28808
29046
|
* layer selector needs a name the transport does not already own.
|
|
28809
29047
|
*/
|
|
28810
|
-
var GetLoggingSettingsInputSchema = object({
|
|
29048
|
+
var GetLoggingSettingsInputSchema = object({
|
|
29049
|
+
scopeNodeId: string().optional(),
|
|
29050
|
+
/**
|
|
29051
|
+
* The declared CHANNEL this document is addressed at, when the caller wants
|
|
29052
|
+
* the `component` layer. Absent = the node/cluster hierarchy only.
|
|
29053
|
+
*
|
|
29054
|
+
* Naming it separately rather than overloading `scopeNodeId` keeps the two
|
|
29055
|
+
* axes from collapsing: a component level is cluster-wide, a node level is
|
|
29056
|
+
* not, and one selector for both would make "which of these two did I just
|
|
29057
|
+
* set" unanswerable — the exact ambiguity `explicit` exists to remove.
|
|
29058
|
+
*/
|
|
29059
|
+
scopeComponent: string().optional()
|
|
29060
|
+
});
|
|
28811
29061
|
var SetLoggingSettingsInputSchema = object({
|
|
28812
29062
|
scopeNodeId: string().optional(),
|
|
29063
|
+
scopeComponent: string().optional(),
|
|
28813
29064
|
patch: LoggingSettingsPatchSchema
|
|
28814
29065
|
});
|
|
28815
29066
|
/**
|
|
@@ -28824,9 +29075,20 @@ var SetLoggingSettingsInputSchema = object({
|
|
|
28824
29075
|
var LoggingSettingsStateSchema = object({
|
|
28825
29076
|
/** The layer this document was read at. `null` = the cluster layer. */
|
|
28826
29077
|
scopeNodeId: string().nullable(),
|
|
29078
|
+
/** The channel this document was read at. `null` = no component layer. */
|
|
29079
|
+
scopeComponent: string().nullable(),
|
|
28827
29080
|
effective: LoggingEffectiveSchema,
|
|
28828
29081
|
explicit: LoggingExplicitSchema,
|
|
28829
29082
|
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
29083
|
+
/**
|
|
29084
|
+
* Every channel the cluster's addons DECLARE, gathered from the
|
|
29085
|
+
* `log-channels` providers. Not stored anywhere: assembled per read, so a
|
|
29086
|
+
* channel added by a redeployed addon appears without anybody editing a
|
|
29087
|
+
* list, and a channel whose addon is gone stops being offered.
|
|
29088
|
+
*/
|
|
29089
|
+
channels: array(LogChannelDescriptorSchema).readonly(),
|
|
29090
|
+
/** The channels ARMED right now, each with its deadline. */
|
|
29091
|
+
activeChannels: array(LogChannelWindowStateSchema).readonly(),
|
|
28830
29092
|
persisted: boolean()
|
|
28831
29093
|
});
|
|
28832
29094
|
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(), {
|
|
@@ -31811,6 +32073,12 @@ Object.freeze({
|
|
|
31811
32073
|
addonId: null,
|
|
31812
32074
|
access: "view"
|
|
31813
32075
|
},
|
|
32076
|
+
"dataStoreProvider.aggregate": {
|
|
32077
|
+
capName: "data-store-provider",
|
|
32078
|
+
capScope: "system",
|
|
32079
|
+
addonId: null,
|
|
32080
|
+
access: "view"
|
|
32081
|
+
},
|
|
31814
32082
|
"dataStoreProvider.count": {
|
|
31815
32083
|
capName: "data-store-provider",
|
|
31816
32084
|
capScope: "system",
|
|
@@ -32225,6 +32493,12 @@ Object.freeze({
|
|
|
32225
32493
|
addonId: null,
|
|
32226
32494
|
access: "view"
|
|
32227
32495
|
},
|
|
32496
|
+
"deviceManager.getChildrenBatch": {
|
|
32497
|
+
capName: "device-manager",
|
|
32498
|
+
capScope: "system",
|
|
32499
|
+
addonId: null,
|
|
32500
|
+
access: "view"
|
|
32501
|
+
},
|
|
32228
32502
|
"deviceManager.getConfigSchema": {
|
|
32229
32503
|
capName: "device-manager",
|
|
32230
32504
|
capScope: "system",
|
|
@@ -33275,6 +33549,18 @@ Object.freeze({
|
|
|
33275
33549
|
addonId: null,
|
|
33276
33550
|
access: "create"
|
|
33277
33551
|
},
|
|
33552
|
+
"logChannels.apply": {
|
|
33553
|
+
capName: "log-channels",
|
|
33554
|
+
capScope: "system",
|
|
33555
|
+
addonId: null,
|
|
33556
|
+
access: "create"
|
|
33557
|
+
},
|
|
33558
|
+
"logChannels.list": {
|
|
33559
|
+
capName: "log-channels",
|
|
33560
|
+
capScope: "system",
|
|
33561
|
+
addonId: null,
|
|
33562
|
+
access: "view"
|
|
33563
|
+
},
|
|
33278
33564
|
"logDestination.query": {
|
|
33279
33565
|
capName: "log-destination",
|
|
33280
33566
|
capScope: "system",
|
|
@@ -35429,6 +35715,12 @@ Object.freeze({
|
|
|
35429
35715
|
addonId: null,
|
|
35430
35716
|
access: "create"
|
|
35431
35717
|
},
|
|
35718
|
+
"settingsStore.aggregate": {
|
|
35719
|
+
capName: "settings-store",
|
|
35720
|
+
capScope: "system",
|
|
35721
|
+
addonId: null,
|
|
35722
|
+
access: "view"
|
|
35723
|
+
},
|
|
35432
35724
|
"settingsStore.count": {
|
|
35433
35725
|
capName: "settings-store",
|
|
35434
35726
|
capScope: "system",
|
|
@@ -37008,6 +37300,11 @@ Object.freeze({
|
|
|
37008
37300
|
form: "single",
|
|
37009
37301
|
optional: false
|
|
37010
37302
|
}],
|
|
37303
|
+
"deviceManager.getChildrenBatch": [{
|
|
37304
|
+
name: "parentDeviceIds",
|
|
37305
|
+
form: "array",
|
|
37306
|
+
optional: false
|
|
37307
|
+
}],
|
|
37011
37308
|
"deviceManager.getConfigSchema": [{
|
|
37012
37309
|
name: "deviceId",
|
|
37013
37310
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-wyze",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.39",
|
|
4
4
|
"description": "Wyze camera device-provider addon for CamStack — wraps the @apocaliss92/wyze-bridge-js P2P/DTLS client, feeding the stream-broker via the pull-rfc4571 lazy-publish path (a structural twin of addon-provider-reolink)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|