@camstack/addon-smtp-nodemailer 1.2.32 → 1.2.34
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/smtp.addon.js +322 -25
- package/dist/smtp.addon.mjs +322 -25
- package/package.json +1 -1
package/dist/smtp.addon.js
CHANGED
|
@@ -7489,6 +7489,111 @@ var CameraSwitchGroupSchema = object({
|
|
|
7489
7489
|
fetchedAt: number()
|
|
7490
7490
|
});
|
|
7491
7491
|
/**
|
|
7492
|
+
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
7493
|
+
* an addon declares its channels in.
|
|
7494
|
+
*
|
|
7495
|
+
* ## Two axes, deliberately separated
|
|
7496
|
+
*
|
|
7497
|
+
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
7498
|
+
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
7499
|
+
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
7500
|
+
* and rots silently. So a channel is declared where it is consulted, and the
|
|
7501
|
+
* `log-channels` capability enumerates the declarations.
|
|
7502
|
+
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
7503
|
+
* thing: the logging settings document on the `system` cap. Two authorities
|
|
7504
|
+
* over the values is the exact defect
|
|
7505
|
+
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
7506
|
+
* remove; re-introducing it from the cure side would be grotesque.
|
|
7507
|
+
*
|
|
7508
|
+
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
7509
|
+
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
7510
|
+
* the hot path with a value somebody actually read, and by
|
|
7511
|
+
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
7512
|
+
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
7513
|
+
* disarmed one (D49).
|
|
7514
|
+
*
|
|
7515
|
+
* ## The canonical call shape
|
|
7516
|
+
*
|
|
7517
|
+
* ```ts
|
|
7518
|
+
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
7519
|
+
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
7520
|
+
* }
|
|
7521
|
+
* ```
|
|
7522
|
+
*
|
|
7523
|
+
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
7524
|
+
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
7525
|
+
* object literal is never constructed because it lives inside the branch. It
|
|
7526
|
+
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
7527
|
+
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
7528
|
+
* destination floor (measured at 1.93 ns/call when off).
|
|
7529
|
+
*
|
|
7530
|
+
* ## Why a channel emits at `info`
|
|
7531
|
+
*
|
|
7532
|
+
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
7533
|
+
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
7534
|
+
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
7535
|
+
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
7536
|
+
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
7537
|
+
* emits at the channel's declared level, whose schema floor is `info`.
|
|
7538
|
+
*/
|
|
7539
|
+
/**
|
|
7540
|
+
* The level a channel writes at once armed.
|
|
7541
|
+
*
|
|
7542
|
+
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
7543
|
+
* not leave the process for Loki, and the whole point of arming a channel is
|
|
7544
|
+
* to read it later.
|
|
7545
|
+
*/
|
|
7546
|
+
var LogChannelLevelSchema = _enum([
|
|
7547
|
+
"info",
|
|
7548
|
+
"warn",
|
|
7549
|
+
"error"
|
|
7550
|
+
]);
|
|
7551
|
+
/**
|
|
7552
|
+
* What an addon declares about one channel. No value, no state — a
|
|
7553
|
+
* declaration is inert.
|
|
7554
|
+
*/
|
|
7555
|
+
var LogChannelDescriptorSchema = object({
|
|
7556
|
+
/**
|
|
7557
|
+
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
7558
|
+
* the addon's short name so an operator reading a channel list can tell who
|
|
7559
|
+
* owns it without a second lookup.
|
|
7560
|
+
*/
|
|
7561
|
+
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
7562
|
+
/** One sentence: what the operator will SEE after arming it. */
|
|
7563
|
+
description: string().min(1),
|
|
7564
|
+
/** The level its lines are emitted at. Never below `info`. */
|
|
7565
|
+
defaultLevel: LogChannelLevelSchema,
|
|
7566
|
+
/**
|
|
7567
|
+
* Whether this channel can be narrowed to a camera.
|
|
7568
|
+
*
|
|
7569
|
+
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
7570
|
+
* consulted with the numeric device id, AND every line the channel admits
|
|
7571
|
+
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
7572
|
+
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
7573
|
+
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
7574
|
+
* the body is the only way to filter.
|
|
7575
|
+
*
|
|
7576
|
+
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
7577
|
+
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
7578
|
+
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
7579
|
+
* path was never taken.
|
|
7580
|
+
*/
|
|
7581
|
+
perDevice: boolean()
|
|
7582
|
+
});
|
|
7583
|
+
/**
|
|
7584
|
+
* An armed window over one channel, as the document hands it to a mirror.
|
|
7585
|
+
*
|
|
7586
|
+
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
7587
|
+
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
7588
|
+
*/
|
|
7589
|
+
var LogChannelWindowSchema = object({
|
|
7590
|
+
channel: string().min(1),
|
|
7591
|
+
/** Epoch ms the window closes at. */
|
|
7592
|
+
armedUntilMs: number(),
|
|
7593
|
+
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
7594
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
7595
|
+
});
|
|
7596
|
+
/**
|
|
7492
7597
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
7493
7598
|
* recordings and events management surfaces.
|
|
7494
7599
|
*
|
|
@@ -11007,6 +11112,35 @@ var MutationFilterSchema = object({
|
|
|
11007
11112
|
whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
|
|
11008
11113
|
whereNot: record(string(), unknown()).optional()
|
|
11009
11114
|
});
|
|
11115
|
+
/**
|
|
11116
|
+
* One scalar an {@link settingsStoreCapability.methods.aggregate} call asks for.
|
|
11117
|
+
*
|
|
11118
|
+
* `as` names the slot in the result, so the SAME column may be asked twice with
|
|
11119
|
+
* two operations (`MIN(startMs)` and `MAX(startMs)` in one round trip) — which
|
|
11120
|
+
* a `Record<column, op>` shape could not express.
|
|
11121
|
+
*/
|
|
11122
|
+
var AggregateFieldSchema = object({
|
|
11123
|
+
/** Result key. */
|
|
11124
|
+
as: string().min(1),
|
|
11125
|
+
/** Column to aggregate. Must be a real column of a declared collection. */
|
|
11126
|
+
field: string().min(1),
|
|
11127
|
+
op: _enum([
|
|
11128
|
+
"sum",
|
|
11129
|
+
"min",
|
|
11130
|
+
"max"
|
|
11131
|
+
])
|
|
11132
|
+
});
|
|
11133
|
+
/**
|
|
11134
|
+
* `COUNT(*)` plus one number per requested field.
|
|
11135
|
+
*
|
|
11136
|
+
* `null` means NO ROW MATCHED, never zero: a `SUM` over an empty set and a sum
|
|
11137
|
+
* that really is 0 are different facts, and an accounting caller that renders
|
|
11138
|
+
* "0 bytes, oldest = 0" for "nothing here" reports a lie about a disk.
|
|
11139
|
+
*/
|
|
11140
|
+
var AggregateResultSchema = object({
|
|
11141
|
+
count: number().int(),
|
|
11142
|
+
values: record(string(), number().nullable())
|
|
11143
|
+
});
|
|
11010
11144
|
/** A single stored record: `{ id, data }`. */
|
|
11011
11145
|
var SettingsRecordSchema = object({
|
|
11012
11146
|
id: string(),
|
|
@@ -11091,6 +11225,11 @@ method(object({
|
|
|
11091
11225
|
collection: string(),
|
|
11092
11226
|
filter: QueryFilterSchema.optional()
|
|
11093
11227
|
}), number()), method(object({
|
|
11228
|
+
namespace: string().optional(),
|
|
11229
|
+
collection: string(),
|
|
11230
|
+
fields: array(AggregateFieldSchema).readonly(),
|
|
11231
|
+
filter: QueryFilterSchema.optional()
|
|
11232
|
+
}), AggregateResultSchema), method(object({
|
|
11094
11233
|
namespace: string().optional(),
|
|
11095
11234
|
collection: string(),
|
|
11096
11235
|
field: string(),
|
|
@@ -11207,6 +11346,11 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
|
|
|
11207
11346
|
collection: string(),
|
|
11208
11347
|
filter: QueryFilterSchema.optional()
|
|
11209
11348
|
}), number(), { auth: "admin" }), method(object({
|
|
11349
|
+
namespace: string().optional(),
|
|
11350
|
+
collection: string(),
|
|
11351
|
+
fields: array(AggregateFieldSchema).readonly(),
|
|
11352
|
+
filter: QueryFilterSchema.optional()
|
|
11353
|
+
}), AggregateResultSchema, { auth: "admin" }), method(object({
|
|
11210
11354
|
namespace: string().optional(),
|
|
11211
11355
|
collection: string(),
|
|
11212
11356
|
field: string(),
|
|
@@ -11768,24 +11912,6 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
|
|
|
11768
11912
|
kind: "mutation",
|
|
11769
11913
|
auth: "admin"
|
|
11770
11914
|
});
|
|
11771
|
-
/**
|
|
11772
|
-
* Device Manager capability — hub-side singleton that unifies device persistence,
|
|
11773
|
-
* live registry access, and all management operations into a single tRPC surface.
|
|
11774
|
-
*
|
|
11775
|
-
* Replaces:
|
|
11776
|
-
* - `device-persistence` capability (persistence methods absorbed here)
|
|
11777
|
-
* - `device-management.router.ts` (deleted in Phase 2)
|
|
11778
|
-
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
11779
|
-
*
|
|
11780
|
-
* All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
|
|
11781
|
-
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
11782
|
-
* - No nodeId routing needed — this is a pure hub singleton.
|
|
11783
|
-
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
11784
|
-
* - No shadow registry or cross-node aggregation required.
|
|
11785
|
-
*
|
|
11786
|
-
* Forked workers register devices back to the hub via `ctx.devices`
|
|
11787
|
-
* (DeviceManagerApi → ctx.api.deviceManager.registerDevice), same as today.
|
|
11788
|
-
*/
|
|
11789
11915
|
/** One child-placement directive on a container's `childLayout`. Structurally
|
|
11790
11916
|
* identical to `ChildLayoutEntry` in `device-management.ts` — the cap wire
|
|
11791
11917
|
* shape for the same field. The child is identified by its re-sync-stable
|
|
@@ -12154,7 +12280,7 @@ method(object({
|
|
|
12154
12280
|
* it answers today and the caller filters as it already does.
|
|
12155
12281
|
*/
|
|
12156
12282
|
deviceIds: array(number()).optional()
|
|
12157
|
-
}), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), object({
|
|
12283
|
+
}), 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({
|
|
12158
12284
|
mode: LinkedDevicesModeSchema,
|
|
12159
12285
|
devices: array(LinkedDeviceSchema)
|
|
12160
12286
|
})), 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({
|
|
@@ -12878,6 +13004,59 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
12878
13004
|
kind: "mutation",
|
|
12879
13005
|
auth: "admin"
|
|
12880
13006
|
});
|
|
13007
|
+
/**
|
|
13008
|
+
* `log-channels` — the capability an addon DECLARES its diagnostic channels
|
|
13009
|
+
* through. It stores nothing.
|
|
13010
|
+
*
|
|
13011
|
+
* ## Why a capability at all, and why this shape
|
|
13012
|
+
*
|
|
13013
|
+
* Which channels exist is knowledge only the addon has: `stream-broker` knows
|
|
13014
|
+
* webrtc/ICE/RTP, `provider-reolink` knows baichuan/handshake. A central list
|
|
13015
|
+
* maintained by hand rots at the first addition and rots INVISIBLY — nothing
|
|
13016
|
+
* fails, an operator just never sees the channel somebody added. So the list
|
|
13017
|
+
* is assembled from declarations at runtime.
|
|
13018
|
+
*
|
|
13019
|
+
* The shape is copied from `log-destination.cap.ts`, which already does
|
|
13020
|
+
* exactly this job: `mode: 'collection'`, `internal: true`,
|
|
13021
|
+
* `mount: { kind: 'skip' }` — no tRPC route, no generated hooks — while
|
|
13022
|
+
* `addons.listCapabilityProviders` still enumerates it, and the hub's
|
|
13023
|
+
* `CapabilityRegistry` still holds an RPC proxy per provider so a forked
|
|
13024
|
+
* runner's declarations reach hub-main over the transport that already exists.
|
|
13025
|
+
* No new UDS message, no second registry.
|
|
13026
|
+
*
|
|
13027
|
+
* ## What it deliberately does NOT own
|
|
13028
|
+
*
|
|
13029
|
+
* The VALUES — which channel is armed, for which cameras, until when — live in
|
|
13030
|
+
* ONE place: the logging settings document on the `system` cap
|
|
13031
|
+
* (`getLoggingSettings` / `setLoggingSettings`). Two authorities over the same
|
|
13032
|
+
* value is the defect the plan behind this work exists to remove, and
|
|
13033
|
+
* `setRequestCensus` was retired (D245) rather than allowed to be a second
|
|
13034
|
+
* one. {@link logChannelsCapability} therefore has no getter for a level, no
|
|
13035
|
+
* setter for a window and no persistence of any kind.
|
|
13036
|
+
*
|
|
13037
|
+
* ## Why `apply` is here even so
|
|
13038
|
+
*
|
|
13039
|
+
* The gate lives in the addon's PROCESS; the document lives in hub-main. Some
|
|
13040
|
+
* seam has to carry the value from the authority to the mirror, and a channel
|
|
13041
|
+
* that cannot be reached is precisely the dead knob this whole slice exists to
|
|
13042
|
+
* make impossible (D62 — `audioThresholdDbfs`, the HA entities with no source).
|
|
13043
|
+
* `apply` is that seam and nothing more: it writes an in-memory mirror, it
|
|
13044
|
+
* persists nothing, it is never the source of a value, and it is called only
|
|
13045
|
+
* with a set the hub actually read (D49 — a read that fails does not call it
|
|
13046
|
+
* at all, so no channel is silently disarmed by a bad read).
|
|
13047
|
+
*/
|
|
13048
|
+
/** What `apply` reports back — enough to log, not enough to be a second state. */
|
|
13049
|
+
var LogChannelApplyResultSchema = object({
|
|
13050
|
+
/** How many declared channels are armed in this process after the call. */
|
|
13051
|
+
armed: number().int().min(0),
|
|
13052
|
+
/**
|
|
13053
|
+
* Names the document armed that this process does not declare. Reported
|
|
13054
|
+
* rather than swallowed: a name here is either a typo or an addon that has
|
|
13055
|
+
* not booted, and both deserve a line instead of silence.
|
|
13056
|
+
*/
|
|
13057
|
+
unknown: array(string()).readonly()
|
|
13058
|
+
});
|
|
13059
|
+
method(_void(), array(LogChannelDescriptorSchema).readonly()), method(object({ windows: array(LogChannelWindowSchema).readonly() }), LogChannelApplyResultSchema, { kind: "mutation" });
|
|
12881
13060
|
var LogLevelSchema = _enum([
|
|
12882
13061
|
"debug",
|
|
12883
13062
|
"info",
|
|
@@ -26308,10 +26487,11 @@ var DiagnosticIdSchema = _enum(["request-census"]);
|
|
|
26308
26487
|
* The layers of the level hierarchy, general → specific. The most specific
|
|
26309
26488
|
* layer that carries an explicit value wins.
|
|
26310
26489
|
*
|
|
26311
|
-
* `component`
|
|
26312
|
-
*
|
|
26313
|
-
*
|
|
26314
|
-
*
|
|
26490
|
+
* `component` became RESOLVABLE on 2026-08-27: a component is a declared log
|
|
26491
|
+
* CHANNEL (`stream-broker.webrtc`, `provider-reolink.baichuan`), named by
|
|
26492
|
+
* `scopeComponent`. It was declared-but-dark in the first slice precisely so
|
|
26493
|
+
* that turning it on would not force every consumer of this document to widen
|
|
26494
|
+
* a `levelSource` enum — which is what has now not happened.
|
|
26315
26495
|
*/
|
|
26316
26496
|
var LoggingScopeKindSchema = _enum([
|
|
26317
26497
|
"cluster",
|
|
@@ -26338,6 +26518,14 @@ var LoggingLevelLayerSchema = object({
|
|
|
26338
26518
|
scope: LoggingScopeKindSchema,
|
|
26339
26519
|
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
26340
26520
|
nodeId: string().nullable(),
|
|
26521
|
+
/**
|
|
26522
|
+
* The declared channel this layer speaks for; `null` on every layer but
|
|
26523
|
+
* `component`. Never folded into `nodeId`: a component level is CLUSTER-WIDE
|
|
26524
|
+
* by design — the convention this repo settled on is one orchestrator-wide
|
|
26525
|
+
* setting, never per node (D52) — so a component layer that carried a node
|
|
26526
|
+
* would invite a per-node copy of a value that has no per-node meaning.
|
|
26527
|
+
*/
|
|
26528
|
+
component: string().nullable(),
|
|
26341
26529
|
/** Explicitly set here, or `null` when this layer inherits. */
|
|
26342
26530
|
level: LogLevelSchema$1.nullable()
|
|
26343
26531
|
});
|
|
@@ -26379,6 +26567,49 @@ var DiagnosticWindowPatchSchema = object({
|
|
|
26379
26567
|
reportEveryMs: number().int().positive().optional()
|
|
26380
26568
|
});
|
|
26381
26569
|
/**
|
|
26570
|
+
* A channel ARMED, as the document reports it.
|
|
26571
|
+
*
|
|
26572
|
+
* `armMs` is not echoed back: what an operator needs to see is the deadline
|
|
26573
|
+
* and the time left, because a diagnostic left running is itself an incident
|
|
26574
|
+
* and "armed for 10 minutes" said an hour ago is not an answer.
|
|
26575
|
+
*/
|
|
26576
|
+
var LogChannelWindowStateSchema = object({
|
|
26577
|
+
channel: string(),
|
|
26578
|
+
armed: boolean(),
|
|
26579
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
26580
|
+
armedUntilMs: number(),
|
|
26581
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
26582
|
+
remainingMs: number(),
|
|
26583
|
+
/**
|
|
26584
|
+
* The cameras it is narrowed to, or `null` for every camera.
|
|
26585
|
+
*
|
|
26586
|
+
* A channel declared `perDevice: false` can only ever report `null` here:
|
|
26587
|
+
* its lines do not carry `tags: { deviceId }`, so narrowing them would
|
|
26588
|
+
* produce a filter that silently matches nothing. The server REFUSES such a
|
|
26589
|
+
* patch rather than quietly widening it — ignoring the request would teach
|
|
26590
|
+
* the operator that per-camera filtering works on that channel when it does
|
|
26591
|
+
* not.
|
|
26592
|
+
*/
|
|
26593
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
26594
|
+
});
|
|
26595
|
+
/**
|
|
26596
|
+
* `armMs: 0` DISARMS. Same grammar as {@link DiagnosticWindowPatchSchema}, and
|
|
26597
|
+
* for the same reason: a channel is a window with a deadline, never a switch.
|
|
26598
|
+
*/
|
|
26599
|
+
var LogChannelWindowPatchSchema = object({
|
|
26600
|
+
channel: string().min(1),
|
|
26601
|
+
armMs: number().int().min(0),
|
|
26602
|
+
/**
|
|
26603
|
+
* Narrow to these numeric device ids. Absent or `null` = every camera.
|
|
26604
|
+
*
|
|
26605
|
+
* Numeric because the repo's own rule makes it possible: every log line
|
|
26606
|
+
* about a device carries `tags: { deviceId }` with the numeric id. That rule
|
|
26607
|
+
* was paid for with a 22% thumbnail gap and a 3-hour media blackout both
|
|
26608
|
+
* diagnosed by hand, and this is the first thing that collects on it.
|
|
26609
|
+
*/
|
|
26610
|
+
deviceIds: array(number().int()).readonly().nullable().optional()
|
|
26611
|
+
});
|
|
26612
|
+
/**
|
|
26382
26613
|
* A PATCH, and patches MERGE.
|
|
26383
26614
|
*
|
|
26384
26615
|
* A field absent from the patch is left exactly as it was — arming a
|
|
@@ -26397,7 +26628,14 @@ var LoggingSettingsPatchSchema = object({
|
|
|
26397
26628
|
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
26398
26629
|
* keeps running — a patch is never a full replacement.
|
|
26399
26630
|
*/
|
|
26400
|
-
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
26631
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional(),
|
|
26632
|
+
/**
|
|
26633
|
+
* Only the channels NAMED here change. An armed channel that is not listed
|
|
26634
|
+
* keeps running — same rule as `diagnostics`, because a patch that silently
|
|
26635
|
+
* disarmed the channels it did not mention would make the Levels page and
|
|
26636
|
+
* the Diagnostics page fight over the same value.
|
|
26637
|
+
*/
|
|
26638
|
+
channels: array(LogChannelWindowPatchSchema).readonly().optional()
|
|
26401
26639
|
});
|
|
26402
26640
|
/**
|
|
26403
26641
|
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
@@ -26410,9 +26648,22 @@ var LoggingSettingsPatchSchema = object({
|
|
|
26410
26648
|
* authority over the whole hierarchy and answers for every layer, so the
|
|
26411
26649
|
* layer selector needs a name the transport does not already own.
|
|
26412
26650
|
*/
|
|
26413
|
-
var GetLoggingSettingsInputSchema = object({
|
|
26651
|
+
var GetLoggingSettingsInputSchema = object({
|
|
26652
|
+
scopeNodeId: string().optional(),
|
|
26653
|
+
/**
|
|
26654
|
+
* The declared CHANNEL this document is addressed at, when the caller wants
|
|
26655
|
+
* the `component` layer. Absent = the node/cluster hierarchy only.
|
|
26656
|
+
*
|
|
26657
|
+
* Naming it separately rather than overloading `scopeNodeId` keeps the two
|
|
26658
|
+
* axes from collapsing: a component level is cluster-wide, a node level is
|
|
26659
|
+
* not, and one selector for both would make "which of these two did I just
|
|
26660
|
+
* set" unanswerable — the exact ambiguity `explicit` exists to remove.
|
|
26661
|
+
*/
|
|
26662
|
+
scopeComponent: string().optional()
|
|
26663
|
+
});
|
|
26414
26664
|
var SetLoggingSettingsInputSchema = object({
|
|
26415
26665
|
scopeNodeId: string().optional(),
|
|
26666
|
+
scopeComponent: string().optional(),
|
|
26416
26667
|
patch: LoggingSettingsPatchSchema
|
|
26417
26668
|
});
|
|
26418
26669
|
/**
|
|
@@ -26427,9 +26678,20 @@ var SetLoggingSettingsInputSchema = object({
|
|
|
26427
26678
|
var LoggingSettingsStateSchema = object({
|
|
26428
26679
|
/** The layer this document was read at. `null` = the cluster layer. */
|
|
26429
26680
|
scopeNodeId: string().nullable(),
|
|
26681
|
+
/** The channel this document was read at. `null` = no component layer. */
|
|
26682
|
+
scopeComponent: string().nullable(),
|
|
26430
26683
|
effective: LoggingEffectiveSchema,
|
|
26431
26684
|
explicit: LoggingExplicitSchema,
|
|
26432
26685
|
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
26686
|
+
/**
|
|
26687
|
+
* Every channel the cluster's addons DECLARE, gathered from the
|
|
26688
|
+
* `log-channels` providers. Not stored anywhere: assembled per read, so a
|
|
26689
|
+
* channel added by a redeployed addon appears without anybody editing a
|
|
26690
|
+
* list, and a channel whose addon is gone stops being offered.
|
|
26691
|
+
*/
|
|
26692
|
+
channels: array(LogChannelDescriptorSchema).readonly(),
|
|
26693
|
+
/** The channels ARMED right now, each with its deadline. */
|
|
26694
|
+
activeChannels: array(LogChannelWindowStateSchema).readonly(),
|
|
26433
26695
|
persisted: boolean()
|
|
26434
26696
|
});
|
|
26435
26697
|
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(), {
|
|
@@ -28006,6 +28268,12 @@ Object.freeze({
|
|
|
28006
28268
|
addonId: null,
|
|
28007
28269
|
access: "view"
|
|
28008
28270
|
},
|
|
28271
|
+
"dataStoreProvider.aggregate": {
|
|
28272
|
+
capName: "data-store-provider",
|
|
28273
|
+
capScope: "system",
|
|
28274
|
+
addonId: null,
|
|
28275
|
+
access: "view"
|
|
28276
|
+
},
|
|
28009
28277
|
"dataStoreProvider.count": {
|
|
28010
28278
|
capName: "data-store-provider",
|
|
28011
28279
|
capScope: "system",
|
|
@@ -28420,6 +28688,12 @@ Object.freeze({
|
|
|
28420
28688
|
addonId: null,
|
|
28421
28689
|
access: "view"
|
|
28422
28690
|
},
|
|
28691
|
+
"deviceManager.getChildrenBatch": {
|
|
28692
|
+
capName: "device-manager",
|
|
28693
|
+
capScope: "system",
|
|
28694
|
+
addonId: null,
|
|
28695
|
+
access: "view"
|
|
28696
|
+
},
|
|
28423
28697
|
"deviceManager.getConfigSchema": {
|
|
28424
28698
|
capName: "device-manager",
|
|
28425
28699
|
capScope: "system",
|
|
@@ -29470,6 +29744,18 @@ Object.freeze({
|
|
|
29470
29744
|
addonId: null,
|
|
29471
29745
|
access: "create"
|
|
29472
29746
|
},
|
|
29747
|
+
"logChannels.apply": {
|
|
29748
|
+
capName: "log-channels",
|
|
29749
|
+
capScope: "system",
|
|
29750
|
+
addonId: null,
|
|
29751
|
+
access: "create"
|
|
29752
|
+
},
|
|
29753
|
+
"logChannels.list": {
|
|
29754
|
+
capName: "log-channels",
|
|
29755
|
+
capScope: "system",
|
|
29756
|
+
addonId: null,
|
|
29757
|
+
access: "view"
|
|
29758
|
+
},
|
|
29473
29759
|
"logDestination.query": {
|
|
29474
29760
|
capName: "log-destination",
|
|
29475
29761
|
capScope: "system",
|
|
@@ -31624,6 +31910,12 @@ Object.freeze({
|
|
|
31624
31910
|
addonId: null,
|
|
31625
31911
|
access: "create"
|
|
31626
31912
|
},
|
|
31913
|
+
"settingsStore.aggregate": {
|
|
31914
|
+
capName: "settings-store",
|
|
31915
|
+
capScope: "system",
|
|
31916
|
+
addonId: null,
|
|
31917
|
+
access: "view"
|
|
31918
|
+
},
|
|
31627
31919
|
"settingsStore.count": {
|
|
31628
31920
|
capName: "settings-store",
|
|
31629
31921
|
capScope: "system",
|
|
@@ -33203,6 +33495,11 @@ Object.freeze({
|
|
|
33203
33495
|
form: "single",
|
|
33204
33496
|
optional: false
|
|
33205
33497
|
}],
|
|
33498
|
+
"deviceManager.getChildrenBatch": [{
|
|
33499
|
+
name: "parentDeviceIds",
|
|
33500
|
+
form: "array",
|
|
33501
|
+
optional: false
|
|
33502
|
+
}],
|
|
33206
33503
|
"deviceManager.getConfigSchema": [{
|
|
33207
33504
|
name: "deviceId",
|
|
33208
33505
|
form: "single",
|
package/dist/smtp.addon.mjs
CHANGED
|
@@ -7487,6 +7487,111 @@ var CameraSwitchGroupSchema = object({
|
|
|
7487
7487
|
fetchedAt: number()
|
|
7488
7488
|
});
|
|
7489
7489
|
/**
|
|
7490
|
+
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
7491
|
+
* an addon declares its channels in.
|
|
7492
|
+
*
|
|
7493
|
+
* ## Two axes, deliberately separated
|
|
7494
|
+
*
|
|
7495
|
+
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
7496
|
+
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
7497
|
+
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
7498
|
+
* and rots silently. So a channel is declared where it is consulted, and the
|
|
7499
|
+
* `log-channels` capability enumerates the declarations.
|
|
7500
|
+
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
7501
|
+
* thing: the logging settings document on the `system` cap. Two authorities
|
|
7502
|
+
* over the values is the exact defect
|
|
7503
|
+
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
7504
|
+
* remove; re-introducing it from the cure side would be grotesque.
|
|
7505
|
+
*
|
|
7506
|
+
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
7507
|
+
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
7508
|
+
* the hot path with a value somebody actually read, and by
|
|
7509
|
+
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
7510
|
+
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
7511
|
+
* disarmed one (D49).
|
|
7512
|
+
*
|
|
7513
|
+
* ## The canonical call shape
|
|
7514
|
+
*
|
|
7515
|
+
* ```ts
|
|
7516
|
+
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
7517
|
+
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
7518
|
+
* }
|
|
7519
|
+
* ```
|
|
7520
|
+
*
|
|
7521
|
+
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
7522
|
+
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
7523
|
+
* object literal is never constructed because it lives inside the branch. It
|
|
7524
|
+
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
7525
|
+
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
7526
|
+
* destination floor (measured at 1.93 ns/call when off).
|
|
7527
|
+
*
|
|
7528
|
+
* ## Why a channel emits at `info`
|
|
7529
|
+
*
|
|
7530
|
+
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
7531
|
+
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
7532
|
+
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
7533
|
+
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
7534
|
+
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
7535
|
+
* emits at the channel's declared level, whose schema floor is `info`.
|
|
7536
|
+
*/
|
|
7537
|
+
/**
|
|
7538
|
+
* The level a channel writes at once armed.
|
|
7539
|
+
*
|
|
7540
|
+
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
7541
|
+
* not leave the process for Loki, and the whole point of arming a channel is
|
|
7542
|
+
* to read it later.
|
|
7543
|
+
*/
|
|
7544
|
+
var LogChannelLevelSchema = _enum([
|
|
7545
|
+
"info",
|
|
7546
|
+
"warn",
|
|
7547
|
+
"error"
|
|
7548
|
+
]);
|
|
7549
|
+
/**
|
|
7550
|
+
* What an addon declares about one channel. No value, no state — a
|
|
7551
|
+
* declaration is inert.
|
|
7552
|
+
*/
|
|
7553
|
+
var LogChannelDescriptorSchema = object({
|
|
7554
|
+
/**
|
|
7555
|
+
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
7556
|
+
* the addon's short name so an operator reading a channel list can tell who
|
|
7557
|
+
* owns it without a second lookup.
|
|
7558
|
+
*/
|
|
7559
|
+
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
7560
|
+
/** One sentence: what the operator will SEE after arming it. */
|
|
7561
|
+
description: string().min(1),
|
|
7562
|
+
/** The level its lines are emitted at. Never below `info`. */
|
|
7563
|
+
defaultLevel: LogChannelLevelSchema,
|
|
7564
|
+
/**
|
|
7565
|
+
* Whether this channel can be narrowed to a camera.
|
|
7566
|
+
*
|
|
7567
|
+
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
7568
|
+
* consulted with the numeric device id, AND every line the channel admits
|
|
7569
|
+
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
7570
|
+
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
7571
|
+
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
7572
|
+
* the body is the only way to filter.
|
|
7573
|
+
*
|
|
7574
|
+
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
7575
|
+
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
7576
|
+
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
7577
|
+
* path was never taken.
|
|
7578
|
+
*/
|
|
7579
|
+
perDevice: boolean()
|
|
7580
|
+
});
|
|
7581
|
+
/**
|
|
7582
|
+
* An armed window over one channel, as the document hands it to a mirror.
|
|
7583
|
+
*
|
|
7584
|
+
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
7585
|
+
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
7586
|
+
*/
|
|
7587
|
+
var LogChannelWindowSchema = object({
|
|
7588
|
+
channel: string().min(1),
|
|
7589
|
+
/** Epoch ms the window closes at. */
|
|
7590
|
+
armedUntilMs: number(),
|
|
7591
|
+
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
7592
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
7593
|
+
});
|
|
7594
|
+
/**
|
|
7490
7595
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
7491
7596
|
* recordings and events management surfaces.
|
|
7492
7597
|
*
|
|
@@ -11005,6 +11110,35 @@ var MutationFilterSchema = object({
|
|
|
11005
11110
|
whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
|
|
11006
11111
|
whereNot: record(string(), unknown()).optional()
|
|
11007
11112
|
});
|
|
11113
|
+
/**
|
|
11114
|
+
* One scalar an {@link settingsStoreCapability.methods.aggregate} call asks for.
|
|
11115
|
+
*
|
|
11116
|
+
* `as` names the slot in the result, so the SAME column may be asked twice with
|
|
11117
|
+
* two operations (`MIN(startMs)` and `MAX(startMs)` in one round trip) — which
|
|
11118
|
+
* a `Record<column, op>` shape could not express.
|
|
11119
|
+
*/
|
|
11120
|
+
var AggregateFieldSchema = object({
|
|
11121
|
+
/** Result key. */
|
|
11122
|
+
as: string().min(1),
|
|
11123
|
+
/** Column to aggregate. Must be a real column of a declared collection. */
|
|
11124
|
+
field: string().min(1),
|
|
11125
|
+
op: _enum([
|
|
11126
|
+
"sum",
|
|
11127
|
+
"min",
|
|
11128
|
+
"max"
|
|
11129
|
+
])
|
|
11130
|
+
});
|
|
11131
|
+
/**
|
|
11132
|
+
* `COUNT(*)` plus one number per requested field.
|
|
11133
|
+
*
|
|
11134
|
+
* `null` means NO ROW MATCHED, never zero: a `SUM` over an empty set and a sum
|
|
11135
|
+
* that really is 0 are different facts, and an accounting caller that renders
|
|
11136
|
+
* "0 bytes, oldest = 0" for "nothing here" reports a lie about a disk.
|
|
11137
|
+
*/
|
|
11138
|
+
var AggregateResultSchema = object({
|
|
11139
|
+
count: number().int(),
|
|
11140
|
+
values: record(string(), number().nullable())
|
|
11141
|
+
});
|
|
11008
11142
|
/** A single stored record: `{ id, data }`. */
|
|
11009
11143
|
var SettingsRecordSchema = object({
|
|
11010
11144
|
id: string(),
|
|
@@ -11089,6 +11223,11 @@ method(object({
|
|
|
11089
11223
|
collection: string(),
|
|
11090
11224
|
filter: QueryFilterSchema.optional()
|
|
11091
11225
|
}), number()), method(object({
|
|
11226
|
+
namespace: string().optional(),
|
|
11227
|
+
collection: string(),
|
|
11228
|
+
fields: array(AggregateFieldSchema).readonly(),
|
|
11229
|
+
filter: QueryFilterSchema.optional()
|
|
11230
|
+
}), AggregateResultSchema), method(object({
|
|
11092
11231
|
namespace: string().optional(),
|
|
11093
11232
|
collection: string(),
|
|
11094
11233
|
field: string(),
|
|
@@ -11205,6 +11344,11 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
|
|
|
11205
11344
|
collection: string(),
|
|
11206
11345
|
filter: QueryFilterSchema.optional()
|
|
11207
11346
|
}), number(), { auth: "admin" }), method(object({
|
|
11347
|
+
namespace: string().optional(),
|
|
11348
|
+
collection: string(),
|
|
11349
|
+
fields: array(AggregateFieldSchema).readonly(),
|
|
11350
|
+
filter: QueryFilterSchema.optional()
|
|
11351
|
+
}), AggregateResultSchema, { auth: "admin" }), method(object({
|
|
11208
11352
|
namespace: string().optional(),
|
|
11209
11353
|
collection: string(),
|
|
11210
11354
|
field: string(),
|
|
@@ -11766,24 +11910,6 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
|
|
|
11766
11910
|
kind: "mutation",
|
|
11767
11911
|
auth: "admin"
|
|
11768
11912
|
});
|
|
11769
|
-
/**
|
|
11770
|
-
* Device Manager capability — hub-side singleton that unifies device persistence,
|
|
11771
|
-
* live registry access, and all management operations into a single tRPC surface.
|
|
11772
|
-
*
|
|
11773
|
-
* Replaces:
|
|
11774
|
-
* - `device-persistence` capability (persistence methods absorbed here)
|
|
11775
|
-
* - `device-management.router.ts` (deleted in Phase 2)
|
|
11776
|
-
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
11777
|
-
*
|
|
11778
|
-
* All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
|
|
11779
|
-
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
11780
|
-
* - No nodeId routing needed — this is a pure hub singleton.
|
|
11781
|
-
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
11782
|
-
* - No shadow registry or cross-node aggregation required.
|
|
11783
|
-
*
|
|
11784
|
-
* Forked workers register devices back to the hub via `ctx.devices`
|
|
11785
|
-
* (DeviceManagerApi → ctx.api.deviceManager.registerDevice), same as today.
|
|
11786
|
-
*/
|
|
11787
11913
|
/** One child-placement directive on a container's `childLayout`. Structurally
|
|
11788
11914
|
* identical to `ChildLayoutEntry` in `device-management.ts` — the cap wire
|
|
11789
11915
|
* shape for the same field. The child is identified by its re-sync-stable
|
|
@@ -12152,7 +12278,7 @@ method(object({
|
|
|
12152
12278
|
* it answers today and the caller filters as it already does.
|
|
12153
12279
|
*/
|
|
12154
12280
|
deviceIds: array(number()).optional()
|
|
12155
|
-
}), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), object({
|
|
12281
|
+
}), 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({
|
|
12156
12282
|
mode: LinkedDevicesModeSchema,
|
|
12157
12283
|
devices: array(LinkedDeviceSchema)
|
|
12158
12284
|
})), 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({
|
|
@@ -12876,6 +13002,59 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
12876
13002
|
kind: "mutation",
|
|
12877
13003
|
auth: "admin"
|
|
12878
13004
|
});
|
|
13005
|
+
/**
|
|
13006
|
+
* `log-channels` — the capability an addon DECLARES its diagnostic channels
|
|
13007
|
+
* through. It stores nothing.
|
|
13008
|
+
*
|
|
13009
|
+
* ## Why a capability at all, and why this shape
|
|
13010
|
+
*
|
|
13011
|
+
* Which channels exist is knowledge only the addon has: `stream-broker` knows
|
|
13012
|
+
* webrtc/ICE/RTP, `provider-reolink` knows baichuan/handshake. A central list
|
|
13013
|
+
* maintained by hand rots at the first addition and rots INVISIBLY — nothing
|
|
13014
|
+
* fails, an operator just never sees the channel somebody added. So the list
|
|
13015
|
+
* is assembled from declarations at runtime.
|
|
13016
|
+
*
|
|
13017
|
+
* The shape is copied from `log-destination.cap.ts`, which already does
|
|
13018
|
+
* exactly this job: `mode: 'collection'`, `internal: true`,
|
|
13019
|
+
* `mount: { kind: 'skip' }` — no tRPC route, no generated hooks — while
|
|
13020
|
+
* `addons.listCapabilityProviders` still enumerates it, and the hub's
|
|
13021
|
+
* `CapabilityRegistry` still holds an RPC proxy per provider so a forked
|
|
13022
|
+
* runner's declarations reach hub-main over the transport that already exists.
|
|
13023
|
+
* No new UDS message, no second registry.
|
|
13024
|
+
*
|
|
13025
|
+
* ## What it deliberately does NOT own
|
|
13026
|
+
*
|
|
13027
|
+
* The VALUES — which channel is armed, for which cameras, until when — live in
|
|
13028
|
+
* ONE place: the logging settings document on the `system` cap
|
|
13029
|
+
* (`getLoggingSettings` / `setLoggingSettings`). Two authorities over the same
|
|
13030
|
+
* value is the defect the plan behind this work exists to remove, and
|
|
13031
|
+
* `setRequestCensus` was retired (D245) rather than allowed to be a second
|
|
13032
|
+
* one. {@link logChannelsCapability} therefore has no getter for a level, no
|
|
13033
|
+
* setter for a window and no persistence of any kind.
|
|
13034
|
+
*
|
|
13035
|
+
* ## Why `apply` is here even so
|
|
13036
|
+
*
|
|
13037
|
+
* The gate lives in the addon's PROCESS; the document lives in hub-main. Some
|
|
13038
|
+
* seam has to carry the value from the authority to the mirror, and a channel
|
|
13039
|
+
* that cannot be reached is precisely the dead knob this whole slice exists to
|
|
13040
|
+
* make impossible (D62 — `audioThresholdDbfs`, the HA entities with no source).
|
|
13041
|
+
* `apply` is that seam and nothing more: it writes an in-memory mirror, it
|
|
13042
|
+
* persists nothing, it is never the source of a value, and it is called only
|
|
13043
|
+
* with a set the hub actually read (D49 — a read that fails does not call it
|
|
13044
|
+
* at all, so no channel is silently disarmed by a bad read).
|
|
13045
|
+
*/
|
|
13046
|
+
/** What `apply` reports back — enough to log, not enough to be a second state. */
|
|
13047
|
+
var LogChannelApplyResultSchema = object({
|
|
13048
|
+
/** How many declared channels are armed in this process after the call. */
|
|
13049
|
+
armed: number().int().min(0),
|
|
13050
|
+
/**
|
|
13051
|
+
* Names the document armed that this process does not declare. Reported
|
|
13052
|
+
* rather than swallowed: a name here is either a typo or an addon that has
|
|
13053
|
+
* not booted, and both deserve a line instead of silence.
|
|
13054
|
+
*/
|
|
13055
|
+
unknown: array(string()).readonly()
|
|
13056
|
+
});
|
|
13057
|
+
method(_void(), array(LogChannelDescriptorSchema).readonly()), method(object({ windows: array(LogChannelWindowSchema).readonly() }), LogChannelApplyResultSchema, { kind: "mutation" });
|
|
12879
13058
|
var LogLevelSchema = _enum([
|
|
12880
13059
|
"debug",
|
|
12881
13060
|
"info",
|
|
@@ -26306,10 +26485,11 @@ var DiagnosticIdSchema = _enum(["request-census"]);
|
|
|
26306
26485
|
* The layers of the level hierarchy, general → specific. The most specific
|
|
26307
26486
|
* layer that carries an explicit value wins.
|
|
26308
26487
|
*
|
|
26309
|
-
* `component`
|
|
26310
|
-
*
|
|
26311
|
-
*
|
|
26312
|
-
*
|
|
26488
|
+
* `component` became RESOLVABLE on 2026-08-27: a component is a declared log
|
|
26489
|
+
* CHANNEL (`stream-broker.webrtc`, `provider-reolink.baichuan`), named by
|
|
26490
|
+
* `scopeComponent`. It was declared-but-dark in the first slice precisely so
|
|
26491
|
+
* that turning it on would not force every consumer of this document to widen
|
|
26492
|
+
* a `levelSource` enum — which is what has now not happened.
|
|
26313
26493
|
*/
|
|
26314
26494
|
var LoggingScopeKindSchema = _enum([
|
|
26315
26495
|
"cluster",
|
|
@@ -26336,6 +26516,14 @@ var LoggingLevelLayerSchema = object({
|
|
|
26336
26516
|
scope: LoggingScopeKindSchema,
|
|
26337
26517
|
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
26338
26518
|
nodeId: string().nullable(),
|
|
26519
|
+
/**
|
|
26520
|
+
* The declared channel this layer speaks for; `null` on every layer but
|
|
26521
|
+
* `component`. Never folded into `nodeId`: a component level is CLUSTER-WIDE
|
|
26522
|
+
* by design — the convention this repo settled on is one orchestrator-wide
|
|
26523
|
+
* setting, never per node (D52) — so a component layer that carried a node
|
|
26524
|
+
* would invite a per-node copy of a value that has no per-node meaning.
|
|
26525
|
+
*/
|
|
26526
|
+
component: string().nullable(),
|
|
26339
26527
|
/** Explicitly set here, or `null` when this layer inherits. */
|
|
26340
26528
|
level: LogLevelSchema$1.nullable()
|
|
26341
26529
|
});
|
|
@@ -26377,6 +26565,49 @@ var DiagnosticWindowPatchSchema = object({
|
|
|
26377
26565
|
reportEveryMs: number().int().positive().optional()
|
|
26378
26566
|
});
|
|
26379
26567
|
/**
|
|
26568
|
+
* A channel ARMED, as the document reports it.
|
|
26569
|
+
*
|
|
26570
|
+
* `armMs` is not echoed back: what an operator needs to see is the deadline
|
|
26571
|
+
* and the time left, because a diagnostic left running is itself an incident
|
|
26572
|
+
* and "armed for 10 minutes" said an hour ago is not an answer.
|
|
26573
|
+
*/
|
|
26574
|
+
var LogChannelWindowStateSchema = object({
|
|
26575
|
+
channel: string(),
|
|
26576
|
+
armed: boolean(),
|
|
26577
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
26578
|
+
armedUntilMs: number(),
|
|
26579
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
26580
|
+
remainingMs: number(),
|
|
26581
|
+
/**
|
|
26582
|
+
* The cameras it is narrowed to, or `null` for every camera.
|
|
26583
|
+
*
|
|
26584
|
+
* A channel declared `perDevice: false` can only ever report `null` here:
|
|
26585
|
+
* its lines do not carry `tags: { deviceId }`, so narrowing them would
|
|
26586
|
+
* produce a filter that silently matches nothing. The server REFUSES such a
|
|
26587
|
+
* patch rather than quietly widening it — ignoring the request would teach
|
|
26588
|
+
* the operator that per-camera filtering works on that channel when it does
|
|
26589
|
+
* not.
|
|
26590
|
+
*/
|
|
26591
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
26592
|
+
});
|
|
26593
|
+
/**
|
|
26594
|
+
* `armMs: 0` DISARMS. Same grammar as {@link DiagnosticWindowPatchSchema}, and
|
|
26595
|
+
* for the same reason: a channel is a window with a deadline, never a switch.
|
|
26596
|
+
*/
|
|
26597
|
+
var LogChannelWindowPatchSchema = object({
|
|
26598
|
+
channel: string().min(1),
|
|
26599
|
+
armMs: number().int().min(0),
|
|
26600
|
+
/**
|
|
26601
|
+
* Narrow to these numeric device ids. Absent or `null` = every camera.
|
|
26602
|
+
*
|
|
26603
|
+
* Numeric because the repo's own rule makes it possible: every log line
|
|
26604
|
+
* about a device carries `tags: { deviceId }` with the numeric id. That rule
|
|
26605
|
+
* was paid for with a 22% thumbnail gap and a 3-hour media blackout both
|
|
26606
|
+
* diagnosed by hand, and this is the first thing that collects on it.
|
|
26607
|
+
*/
|
|
26608
|
+
deviceIds: array(number().int()).readonly().nullable().optional()
|
|
26609
|
+
});
|
|
26610
|
+
/**
|
|
26380
26611
|
* A PATCH, and patches MERGE.
|
|
26381
26612
|
*
|
|
26382
26613
|
* A field absent from the patch is left exactly as it was — arming a
|
|
@@ -26395,7 +26626,14 @@ var LoggingSettingsPatchSchema = object({
|
|
|
26395
26626
|
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
26396
26627
|
* keeps running — a patch is never a full replacement.
|
|
26397
26628
|
*/
|
|
26398
|
-
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
26629
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional(),
|
|
26630
|
+
/**
|
|
26631
|
+
* Only the channels NAMED here change. An armed channel that is not listed
|
|
26632
|
+
* keeps running — same rule as `diagnostics`, because a patch that silently
|
|
26633
|
+
* disarmed the channels it did not mention would make the Levels page and
|
|
26634
|
+
* the Diagnostics page fight over the same value.
|
|
26635
|
+
*/
|
|
26636
|
+
channels: array(LogChannelWindowPatchSchema).readonly().optional()
|
|
26399
26637
|
});
|
|
26400
26638
|
/**
|
|
26401
26639
|
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
@@ -26408,9 +26646,22 @@ var LoggingSettingsPatchSchema = object({
|
|
|
26408
26646
|
* authority over the whole hierarchy and answers for every layer, so the
|
|
26409
26647
|
* layer selector needs a name the transport does not already own.
|
|
26410
26648
|
*/
|
|
26411
|
-
var GetLoggingSettingsInputSchema = object({
|
|
26649
|
+
var GetLoggingSettingsInputSchema = object({
|
|
26650
|
+
scopeNodeId: string().optional(),
|
|
26651
|
+
/**
|
|
26652
|
+
* The declared CHANNEL this document is addressed at, when the caller wants
|
|
26653
|
+
* the `component` layer. Absent = the node/cluster hierarchy only.
|
|
26654
|
+
*
|
|
26655
|
+
* Naming it separately rather than overloading `scopeNodeId` keeps the two
|
|
26656
|
+
* axes from collapsing: a component level is cluster-wide, a node level is
|
|
26657
|
+
* not, and one selector for both would make "which of these two did I just
|
|
26658
|
+
* set" unanswerable — the exact ambiguity `explicit` exists to remove.
|
|
26659
|
+
*/
|
|
26660
|
+
scopeComponent: string().optional()
|
|
26661
|
+
});
|
|
26412
26662
|
var SetLoggingSettingsInputSchema = object({
|
|
26413
26663
|
scopeNodeId: string().optional(),
|
|
26664
|
+
scopeComponent: string().optional(),
|
|
26414
26665
|
patch: LoggingSettingsPatchSchema
|
|
26415
26666
|
});
|
|
26416
26667
|
/**
|
|
@@ -26425,9 +26676,20 @@ var SetLoggingSettingsInputSchema = object({
|
|
|
26425
26676
|
var LoggingSettingsStateSchema = object({
|
|
26426
26677
|
/** The layer this document was read at. `null` = the cluster layer. */
|
|
26427
26678
|
scopeNodeId: string().nullable(),
|
|
26679
|
+
/** The channel this document was read at. `null` = no component layer. */
|
|
26680
|
+
scopeComponent: string().nullable(),
|
|
26428
26681
|
effective: LoggingEffectiveSchema,
|
|
26429
26682
|
explicit: LoggingExplicitSchema,
|
|
26430
26683
|
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
26684
|
+
/**
|
|
26685
|
+
* Every channel the cluster's addons DECLARE, gathered from the
|
|
26686
|
+
* `log-channels` providers. Not stored anywhere: assembled per read, so a
|
|
26687
|
+
* channel added by a redeployed addon appears without anybody editing a
|
|
26688
|
+
* list, and a channel whose addon is gone stops being offered.
|
|
26689
|
+
*/
|
|
26690
|
+
channels: array(LogChannelDescriptorSchema).readonly(),
|
|
26691
|
+
/** The channels ARMED right now, each with its deadline. */
|
|
26692
|
+
activeChannels: array(LogChannelWindowStateSchema).readonly(),
|
|
26431
26693
|
persisted: boolean()
|
|
26432
26694
|
});
|
|
26433
26695
|
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(), {
|
|
@@ -28004,6 +28266,12 @@ Object.freeze({
|
|
|
28004
28266
|
addonId: null,
|
|
28005
28267
|
access: "view"
|
|
28006
28268
|
},
|
|
28269
|
+
"dataStoreProvider.aggregate": {
|
|
28270
|
+
capName: "data-store-provider",
|
|
28271
|
+
capScope: "system",
|
|
28272
|
+
addonId: null,
|
|
28273
|
+
access: "view"
|
|
28274
|
+
},
|
|
28007
28275
|
"dataStoreProvider.count": {
|
|
28008
28276
|
capName: "data-store-provider",
|
|
28009
28277
|
capScope: "system",
|
|
@@ -28418,6 +28686,12 @@ Object.freeze({
|
|
|
28418
28686
|
addonId: null,
|
|
28419
28687
|
access: "view"
|
|
28420
28688
|
},
|
|
28689
|
+
"deviceManager.getChildrenBatch": {
|
|
28690
|
+
capName: "device-manager",
|
|
28691
|
+
capScope: "system",
|
|
28692
|
+
addonId: null,
|
|
28693
|
+
access: "view"
|
|
28694
|
+
},
|
|
28421
28695
|
"deviceManager.getConfigSchema": {
|
|
28422
28696
|
capName: "device-manager",
|
|
28423
28697
|
capScope: "system",
|
|
@@ -29468,6 +29742,18 @@ Object.freeze({
|
|
|
29468
29742
|
addonId: null,
|
|
29469
29743
|
access: "create"
|
|
29470
29744
|
},
|
|
29745
|
+
"logChannels.apply": {
|
|
29746
|
+
capName: "log-channels",
|
|
29747
|
+
capScope: "system",
|
|
29748
|
+
addonId: null,
|
|
29749
|
+
access: "create"
|
|
29750
|
+
},
|
|
29751
|
+
"logChannels.list": {
|
|
29752
|
+
capName: "log-channels",
|
|
29753
|
+
capScope: "system",
|
|
29754
|
+
addonId: null,
|
|
29755
|
+
access: "view"
|
|
29756
|
+
},
|
|
29471
29757
|
"logDestination.query": {
|
|
29472
29758
|
capName: "log-destination",
|
|
29473
29759
|
capScope: "system",
|
|
@@ -31622,6 +31908,12 @@ Object.freeze({
|
|
|
31622
31908
|
addonId: null,
|
|
31623
31909
|
access: "create"
|
|
31624
31910
|
},
|
|
31911
|
+
"settingsStore.aggregate": {
|
|
31912
|
+
capName: "settings-store",
|
|
31913
|
+
capScope: "system",
|
|
31914
|
+
addonId: null,
|
|
31915
|
+
access: "view"
|
|
31916
|
+
},
|
|
31625
31917
|
"settingsStore.count": {
|
|
31626
31918
|
capName: "settings-store",
|
|
31627
31919
|
capScope: "system",
|
|
@@ -33201,6 +33493,11 @@ Object.freeze({
|
|
|
33201
33493
|
form: "single",
|
|
33202
33494
|
optional: false
|
|
33203
33495
|
}],
|
|
33496
|
+
"deviceManager.getChildrenBatch": [{
|
|
33497
|
+
name: "parentDeviceIds",
|
|
33498
|
+
form: "array",
|
|
33499
|
+
optional: false
|
|
33500
|
+
}],
|
|
33204
33501
|
"deviceManager.getConfigSchema": [{
|
|
33205
33502
|
name: "deviceId",
|
|
33206
33503
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-smtp-nodemailer",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.34",
|
|
4
4
|
"description": "SMTP email provider addon for CamStack — wraps `nodemailer` and registers a `smtp-provider` cap collection entry. Used by magic-link login + notifier addons.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|