@camstack/addon-terminal 0.1.37 → 0.1.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 +409 -30
- package/dist/addon.mjs +409 -30
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -7567,6 +7567,111 @@ var CameraSwitchGroupSchema = object({
|
|
|
7567
7567
|
var DETECTION_PIPELINE_CAP_NAME = "detection-pipeline";
|
|
7568
7568
|
var AUDIO_ANALYSIS_CAP_NAME = "audio-analysis";
|
|
7569
7569
|
/**
|
|
7570
|
+
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
7571
|
+
* an addon declares its channels in.
|
|
7572
|
+
*
|
|
7573
|
+
* ## Two axes, deliberately separated
|
|
7574
|
+
*
|
|
7575
|
+
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
7576
|
+
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
7577
|
+
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
7578
|
+
* and rots silently. So a channel is declared where it is consulted, and the
|
|
7579
|
+
* `log-channels` capability enumerates the declarations.
|
|
7580
|
+
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
7581
|
+
* thing: the logging settings document on the `system` cap. Two authorities
|
|
7582
|
+
* over the values is the exact defect
|
|
7583
|
+
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
7584
|
+
* remove; re-introducing it from the cure side would be grotesque.
|
|
7585
|
+
*
|
|
7586
|
+
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
7587
|
+
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
7588
|
+
* the hot path with a value somebody actually read, and by
|
|
7589
|
+
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
7590
|
+
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
7591
|
+
* disarmed one (D49).
|
|
7592
|
+
*
|
|
7593
|
+
* ## The canonical call shape
|
|
7594
|
+
*
|
|
7595
|
+
* ```ts
|
|
7596
|
+
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
7597
|
+
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
7598
|
+
* }
|
|
7599
|
+
* ```
|
|
7600
|
+
*
|
|
7601
|
+
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
7602
|
+
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
7603
|
+
* object literal is never constructed because it lives inside the branch. It
|
|
7604
|
+
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
7605
|
+
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
7606
|
+
* destination floor (measured at 1.93 ns/call when off).
|
|
7607
|
+
*
|
|
7608
|
+
* ## Why a channel emits at `info`
|
|
7609
|
+
*
|
|
7610
|
+
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
7611
|
+
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
7612
|
+
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
7613
|
+
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
7614
|
+
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
7615
|
+
* emits at the channel's declared level, whose schema floor is `info`.
|
|
7616
|
+
*/
|
|
7617
|
+
/**
|
|
7618
|
+
* The level a channel writes at once armed.
|
|
7619
|
+
*
|
|
7620
|
+
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
7621
|
+
* not leave the process for Loki, and the whole point of arming a channel is
|
|
7622
|
+
* to read it later.
|
|
7623
|
+
*/
|
|
7624
|
+
var LogChannelLevelSchema = _enum([
|
|
7625
|
+
"info",
|
|
7626
|
+
"warn",
|
|
7627
|
+
"error"
|
|
7628
|
+
]);
|
|
7629
|
+
/**
|
|
7630
|
+
* What an addon declares about one channel. No value, no state — a
|
|
7631
|
+
* declaration is inert.
|
|
7632
|
+
*/
|
|
7633
|
+
var LogChannelDescriptorSchema = object({
|
|
7634
|
+
/**
|
|
7635
|
+
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
7636
|
+
* the addon's short name so an operator reading a channel list can tell who
|
|
7637
|
+
* owns it without a second lookup.
|
|
7638
|
+
*/
|
|
7639
|
+
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
7640
|
+
/** One sentence: what the operator will SEE after arming it. */
|
|
7641
|
+
description: string().min(1),
|
|
7642
|
+
/** The level its lines are emitted at. Never below `info`. */
|
|
7643
|
+
defaultLevel: LogChannelLevelSchema,
|
|
7644
|
+
/**
|
|
7645
|
+
* Whether this channel can be narrowed to a camera.
|
|
7646
|
+
*
|
|
7647
|
+
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
7648
|
+
* consulted with the numeric device id, AND every line the channel admits
|
|
7649
|
+
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
7650
|
+
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
7651
|
+
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
7652
|
+
* the body is the only way to filter.
|
|
7653
|
+
*
|
|
7654
|
+
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
7655
|
+
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
7656
|
+
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
7657
|
+
* path was never taken.
|
|
7658
|
+
*/
|
|
7659
|
+
perDevice: boolean()
|
|
7660
|
+
});
|
|
7661
|
+
/**
|
|
7662
|
+
* An armed window over one channel, as the document hands it to a mirror.
|
|
7663
|
+
*
|
|
7664
|
+
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
7665
|
+
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
7666
|
+
*/
|
|
7667
|
+
var LogChannelWindowSchema = object({
|
|
7668
|
+
channel: string().min(1),
|
|
7669
|
+
/** Epoch ms the window closes at. */
|
|
7670
|
+
armedUntilMs: number(),
|
|
7671
|
+
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
7672
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
7673
|
+
});
|
|
7674
|
+
/**
|
|
7570
7675
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
7571
7676
|
* recordings and events management surfaces.
|
|
7572
7677
|
*
|
|
@@ -11187,6 +11292,35 @@ var MutationFilterSchema = object({
|
|
|
11187
11292
|
whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
|
|
11188
11293
|
whereNot: record(string(), unknown()).optional()
|
|
11189
11294
|
});
|
|
11295
|
+
/**
|
|
11296
|
+
* One scalar an {@link settingsStoreCapability.methods.aggregate} call asks for.
|
|
11297
|
+
*
|
|
11298
|
+
* `as` names the slot in the result, so the SAME column may be asked twice with
|
|
11299
|
+
* two operations (`MIN(startMs)` and `MAX(startMs)` in one round trip) — which
|
|
11300
|
+
* a `Record<column, op>` shape could not express.
|
|
11301
|
+
*/
|
|
11302
|
+
var AggregateFieldSchema = object({
|
|
11303
|
+
/** Result key. */
|
|
11304
|
+
as: string().min(1),
|
|
11305
|
+
/** Column to aggregate. Must be a real column of a declared collection. */
|
|
11306
|
+
field: string().min(1),
|
|
11307
|
+
op: _enum([
|
|
11308
|
+
"sum",
|
|
11309
|
+
"min",
|
|
11310
|
+
"max"
|
|
11311
|
+
])
|
|
11312
|
+
});
|
|
11313
|
+
/**
|
|
11314
|
+
* `COUNT(*)` plus one number per requested field.
|
|
11315
|
+
*
|
|
11316
|
+
* `null` means NO ROW MATCHED, never zero: a `SUM` over an empty set and a sum
|
|
11317
|
+
* that really is 0 are different facts, and an accounting caller that renders
|
|
11318
|
+
* "0 bytes, oldest = 0" for "nothing here" reports a lie about a disk.
|
|
11319
|
+
*/
|
|
11320
|
+
var AggregateResultSchema = object({
|
|
11321
|
+
count: number().int(),
|
|
11322
|
+
values: record(string(), number().nullable())
|
|
11323
|
+
});
|
|
11190
11324
|
/** A single stored record: `{ id, data }`. */
|
|
11191
11325
|
var SettingsRecordSchema = object({
|
|
11192
11326
|
id: string(),
|
|
@@ -11271,6 +11405,11 @@ method(object({
|
|
|
11271
11405
|
collection: string(),
|
|
11272
11406
|
filter: QueryFilterSchema.optional()
|
|
11273
11407
|
}), number()), method(object({
|
|
11408
|
+
namespace: string().optional(),
|
|
11409
|
+
collection: string(),
|
|
11410
|
+
fields: array(AggregateFieldSchema).readonly(),
|
|
11411
|
+
filter: QueryFilterSchema.optional()
|
|
11412
|
+
}), AggregateResultSchema), method(object({
|
|
11274
11413
|
namespace: string().optional(),
|
|
11275
11414
|
collection: string(),
|
|
11276
11415
|
field: string(),
|
|
@@ -11387,6 +11526,11 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
|
|
|
11387
11526
|
collection: string(),
|
|
11388
11527
|
filter: QueryFilterSchema.optional()
|
|
11389
11528
|
}), number(), { auth: "admin" }), method(object({
|
|
11529
|
+
namespace: string().optional(),
|
|
11530
|
+
collection: string(),
|
|
11531
|
+
fields: array(AggregateFieldSchema).readonly(),
|
|
11532
|
+
filter: QueryFilterSchema.optional()
|
|
11533
|
+
}), AggregateResultSchema, { auth: "admin" }), method(object({
|
|
11390
11534
|
namespace: string().optional(),
|
|
11391
11535
|
collection: string(),
|
|
11392
11536
|
field: string(),
|
|
@@ -12055,24 +12199,6 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
|
|
|
12055
12199
|
kind: "mutation",
|
|
12056
12200
|
auth: "admin"
|
|
12057
12201
|
});
|
|
12058
|
-
/**
|
|
12059
|
-
* Device Manager capability — hub-side singleton that unifies device persistence,
|
|
12060
|
-
* live registry access, and all management operations into a single tRPC surface.
|
|
12061
|
-
*
|
|
12062
|
-
* Replaces:
|
|
12063
|
-
* - `device-persistence` capability (persistence methods absorbed here)
|
|
12064
|
-
* - `device-management.router.ts` (deleted in Phase 2)
|
|
12065
|
-
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
12066
|
-
*
|
|
12067
|
-
* All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
|
|
12068
|
-
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
12069
|
-
* - No nodeId routing needed — this is a pure hub singleton.
|
|
12070
|
-
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
12071
|
-
* - No shadow registry or cross-node aggregation required.
|
|
12072
|
-
*
|
|
12073
|
-
* Forked workers register devices back to the hub via `ctx.devices`
|
|
12074
|
-
* (DeviceManagerApi → ctx.api.deviceManager.registerDevice), same as today.
|
|
12075
|
-
*/
|
|
12076
12202
|
/** One child-placement directive on a container's `childLayout`. Structurally
|
|
12077
12203
|
* identical to `ChildLayoutEntry` in `device-management.ts` — the cap wire
|
|
12078
12204
|
* shape for the same field. The child is identified by its re-sync-stable
|
|
@@ -12441,7 +12567,7 @@ method(object({
|
|
|
12441
12567
|
* it answers today and the caller filters as it already does.
|
|
12442
12568
|
*/
|
|
12443
12569
|
deviceIds: array(number()).optional()
|
|
12444
|
-
}), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), object({
|
|
12570
|
+
}), 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({
|
|
12445
12571
|
mode: LinkedDevicesModeSchema,
|
|
12446
12572
|
devices: array(LinkedDeviceSchema)
|
|
12447
12573
|
})), 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({
|
|
@@ -13165,6 +13291,59 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
13165
13291
|
kind: "mutation",
|
|
13166
13292
|
auth: "admin"
|
|
13167
13293
|
});
|
|
13294
|
+
/**
|
|
13295
|
+
* `log-channels` — the capability an addon DECLARES its diagnostic channels
|
|
13296
|
+
* through. It stores nothing.
|
|
13297
|
+
*
|
|
13298
|
+
* ## Why a capability at all, and why this shape
|
|
13299
|
+
*
|
|
13300
|
+
* Which channels exist is knowledge only the addon has: `stream-broker` knows
|
|
13301
|
+
* webrtc/ICE/RTP, `provider-reolink` knows baichuan/handshake. A central list
|
|
13302
|
+
* maintained by hand rots at the first addition and rots INVISIBLY — nothing
|
|
13303
|
+
* fails, an operator just never sees the channel somebody added. So the list
|
|
13304
|
+
* is assembled from declarations at runtime.
|
|
13305
|
+
*
|
|
13306
|
+
* The shape is copied from `log-destination.cap.ts`, which already does
|
|
13307
|
+
* exactly this job: `mode: 'collection'`, `internal: true`,
|
|
13308
|
+
* `mount: { kind: 'skip' }` — no tRPC route, no generated hooks — while
|
|
13309
|
+
* `addons.listCapabilityProviders` still enumerates it, and the hub's
|
|
13310
|
+
* `CapabilityRegistry` still holds an RPC proxy per provider so a forked
|
|
13311
|
+
* runner's declarations reach hub-main over the transport that already exists.
|
|
13312
|
+
* No new UDS message, no second registry.
|
|
13313
|
+
*
|
|
13314
|
+
* ## What it deliberately does NOT own
|
|
13315
|
+
*
|
|
13316
|
+
* The VALUES — which channel is armed, for which cameras, until when — live in
|
|
13317
|
+
* ONE place: the logging settings document on the `system` cap
|
|
13318
|
+
* (`getLoggingSettings` / `setLoggingSettings`). Two authorities over the same
|
|
13319
|
+
* value is the defect the plan behind this work exists to remove, and
|
|
13320
|
+
* `setRequestCensus` was retired (D245) rather than allowed to be a second
|
|
13321
|
+
* one. {@link logChannelsCapability} therefore has no getter for a level, no
|
|
13322
|
+
* setter for a window and no persistence of any kind.
|
|
13323
|
+
*
|
|
13324
|
+
* ## Why `apply` is here even so
|
|
13325
|
+
*
|
|
13326
|
+
* The gate lives in the addon's PROCESS; the document lives in hub-main. Some
|
|
13327
|
+
* seam has to carry the value from the authority to the mirror, and a channel
|
|
13328
|
+
* that cannot be reached is precisely the dead knob this whole slice exists to
|
|
13329
|
+
* make impossible (D62 — `audioThresholdDbfs`, the HA entities with no source).
|
|
13330
|
+
* `apply` is that seam and nothing more: it writes an in-memory mirror, it
|
|
13331
|
+
* persists nothing, it is never the source of a value, and it is called only
|
|
13332
|
+
* with a set the hub actually read (D49 — a read that fails does not call it
|
|
13333
|
+
* at all, so no channel is silently disarmed by a bad read).
|
|
13334
|
+
*/
|
|
13335
|
+
/** What `apply` reports back — enough to log, not enough to be a second state. */
|
|
13336
|
+
var LogChannelApplyResultSchema = object({
|
|
13337
|
+
/** How many declared channels are armed in this process after the call. */
|
|
13338
|
+
armed: number().int().min(0),
|
|
13339
|
+
/**
|
|
13340
|
+
* Names the document armed that this process does not declare. Reported
|
|
13341
|
+
* rather than swallowed: a name here is either a typo or an addon that has
|
|
13342
|
+
* not booted, and both deserve a line instead of silence.
|
|
13343
|
+
*/
|
|
13344
|
+
unknown: array(string()).readonly()
|
|
13345
|
+
});
|
|
13346
|
+
method(_void(), array(LogChannelDescriptorSchema).readonly()), method(object({ windows: array(LogChannelWindowSchema).readonly() }), LogChannelApplyResultSchema, { kind: "mutation" });
|
|
13168
13347
|
var LogLevelSchema = _enum([
|
|
13169
13348
|
"debug",
|
|
13170
13349
|
"info",
|
|
@@ -28595,17 +28774,60 @@ var SetSiteLocationInputSchema = object({
|
|
|
28595
28774
|
longitude: number().min(-180).max(180)
|
|
28596
28775
|
}).nullable();
|
|
28597
28776
|
/**
|
|
28598
|
-
*
|
|
28777
|
+
* The TRANSPORT a call arrived on.
|
|
28778
|
+
*
|
|
28779
|
+
* Every counted call carries exactly one of these, and `unknown` is a PLANE
|
|
28780
|
+
* rather than a gap: a plane that cannot attribute a call declares it here, so
|
|
28781
|
+
* the call lands in a named bucket instead of vanishing. `planes` summing to
|
|
28782
|
+
* `procedureCalls` is what makes "the sum of the planes explains the total"
|
|
28783
|
+
* checkable rather than asserted.
|
|
28784
|
+
*
|
|
28785
|
+
* - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
|
|
28786
|
+
* - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
|
|
28787
|
+
* connection; the viewer talks to the hub over `wsLink`
|
|
28788
|
+
* exclusively, so this is the plane the HTTP census could not see.
|
|
28789
|
+
* - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
|
|
28790
|
+
* never touches a socket and therefore never touched a census.
|
|
28791
|
+
* - `unknown` — counted, plane undecidable. No hook produces it today, and
|
|
28792
|
+
* that is exactly what its `0` asserts: every plane the hub has can name
|
|
28793
|
+
* itself. It is an output bucket, never a knob — a call that arrives on a
|
|
28794
|
+
* plane nobody instrumented lands here instead of vanishing from the total.
|
|
28795
|
+
*/
|
|
28796
|
+
var TransportPlaneSchema = _enum([
|
|
28797
|
+
"http",
|
|
28798
|
+
"ws",
|
|
28799
|
+
"mesh",
|
|
28800
|
+
"unknown"
|
|
28801
|
+
]);
|
|
28802
|
+
/**
|
|
28803
|
+
* Calls per plane. Every key is always present, `0` included — an absent plane
|
|
28804
|
+
* reads as "not instrumented", which is the one thing this census must never
|
|
28805
|
+
* make an operator wonder about.
|
|
28806
|
+
*/
|
|
28807
|
+
var TransportPlaneCountsSchema = object({
|
|
28808
|
+
http: number(),
|
|
28809
|
+
ws: number(),
|
|
28810
|
+
mesh: number(),
|
|
28811
|
+
unknown: number()
|
|
28812
|
+
});
|
|
28813
|
+
/**
|
|
28814
|
+
* One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
|
|
28599
28815
|
* census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
|
|
28600
28816
|
* `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
|
|
28601
28817
|
* already prints - never a token, never an `Authorization` header.
|
|
28818
|
+
*
|
|
28819
|
+
* `subscriptions` is counted APART from `calls`: a subscription is opened once
|
|
28820
|
+
* and lives for hours, so folding it into a call count makes one long-lived
|
|
28821
|
+
* stream look like a storm.
|
|
28602
28822
|
*/
|
|
28603
28823
|
var RequestCensusGroupSchema = object({
|
|
28824
|
+
plane: TransportPlaneSchema,
|
|
28604
28825
|
procedure: string(),
|
|
28605
28826
|
userAgent: string(),
|
|
28606
28827
|
ip: string(),
|
|
28607
28828
|
principal: string(),
|
|
28608
28829
|
calls: number(),
|
|
28830
|
+
subscriptions: number(),
|
|
28609
28831
|
perMin: number()
|
|
28610
28832
|
});
|
|
28611
28833
|
/**
|
|
@@ -28618,6 +28840,14 @@ var RequestCensusGroupSchema = object({
|
|
|
28618
28840
|
var RequestCensusProcedureSchema = object({
|
|
28619
28841
|
procedure: string(),
|
|
28620
28842
|
calls: number(),
|
|
28843
|
+
/**
|
|
28844
|
+
* The same total, split by transport. THIS is the row that answers the
|
|
28845
|
+
* question the census exists for: one look at `deviceManager.listAll` says
|
|
28846
|
+
* which plane carried the 4 960, without joining two log lines by eye.
|
|
28847
|
+
*/
|
|
28848
|
+
planes: TransportPlaneCountsSchema,
|
|
28849
|
+
/** Subscription STARTS on this procedure. Never folded into `calls`. */
|
|
28850
|
+
subscriptions: number(),
|
|
28621
28851
|
perMin: number()
|
|
28622
28852
|
});
|
|
28623
28853
|
/**
|
|
@@ -28645,14 +28875,45 @@ var RequestCensusStatusSchema = object({
|
|
|
28645
28875
|
*/
|
|
28646
28876
|
procedureCalls: number(),
|
|
28647
28877
|
/**
|
|
28878
|
+
* `procedureCalls` split by transport. The four keys sum to
|
|
28879
|
+
* `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
|
|
28880
|
+
* `planesExplainTotal` is that identity, checked rather than assumed.
|
|
28881
|
+
*/
|
|
28882
|
+
planes: TransportPlaneCountsSchema,
|
|
28883
|
+
/**
|
|
28884
|
+
* True iff `planes` sums to `procedureCalls`. False means a call was counted
|
|
28885
|
+
* on no plane at all - which is a RESULT (a plane is missing from the
|
|
28886
|
+
* instrument), not a failure, and it has to be visible to be read as one.
|
|
28887
|
+
*/
|
|
28888
|
+
planesExplainTotal: boolean(),
|
|
28889
|
+
/**
|
|
28648
28890
|
* tRPC WebSocket connections opened during the window. NOT calls - the WS
|
|
28649
|
-
*
|
|
28650
|
-
*
|
|
28891
|
+
* adapter resolves one context per connection - kept because a plane's call
|
|
28892
|
+
* count of zero against 37 open connections says something different from a
|
|
28893
|
+
* plane with no connections at all.
|
|
28651
28894
|
*/
|
|
28652
28895
|
wsConnections: number(),
|
|
28896
|
+
/**
|
|
28897
|
+
* Client frames the WS plane looked at. `wsMessages` far above
|
|
28898
|
+
* `planes.ws + subscriptions` means most traffic is not operations
|
|
28899
|
+
* (keepalives, connection params) - which is itself an answer.
|
|
28900
|
+
*/
|
|
28901
|
+
wsMessages: number(),
|
|
28902
|
+
/**
|
|
28903
|
+
* Subscription STARTS across every plane, excluded from `procedureCalls` on
|
|
28904
|
+
* purpose: one live-events stream opened at boot and held for six hours is
|
|
28905
|
+
* one subscription, and counting it as a call would let a quiet plane
|
|
28906
|
+
* masquerade as the storm.
|
|
28907
|
+
*/
|
|
28908
|
+
subscriptions: number(),
|
|
28909
|
+
/** `subscription.stop` frames. Starts minus stops is what is still open. */
|
|
28910
|
+
subscriptionStops: number(),
|
|
28653
28911
|
distinctGroups: number(),
|
|
28654
|
-
/**
|
|
28655
|
-
*
|
|
28912
|
+
/**
|
|
28913
|
+
* Operations counted in the totals whose CALLER attribution was shed at the
|
|
28914
|
+
* cardinality bound. Unrelated to the `unknown` PLANE: these calls know
|
|
28915
|
+
* which transport they arrived on, they just lost their group row.
|
|
28916
|
+
*/
|
|
28656
28917
|
unattributedCalls: number(),
|
|
28657
28918
|
procedures: array(RequestCensusProcedureSchema).readonly(),
|
|
28658
28919
|
groups: array(RequestCensusGroupSchema).readonly()
|
|
@@ -28675,10 +28936,11 @@ var DiagnosticIdSchema = _enum(["request-census"]);
|
|
|
28675
28936
|
* The layers of the level hierarchy, general → specific. The most specific
|
|
28676
28937
|
* layer that carries an explicit value wins.
|
|
28677
28938
|
*
|
|
28678
|
-
* `component`
|
|
28679
|
-
*
|
|
28680
|
-
*
|
|
28681
|
-
*
|
|
28939
|
+
* `component` became RESOLVABLE on 2026-08-27: a component is a declared log
|
|
28940
|
+
* CHANNEL (`stream-broker.webrtc`, `provider-reolink.baichuan`), named by
|
|
28941
|
+
* `scopeComponent`. It was declared-but-dark in the first slice precisely so
|
|
28942
|
+
* that turning it on would not force every consumer of this document to widen
|
|
28943
|
+
* a `levelSource` enum — which is what has now not happened.
|
|
28682
28944
|
*/
|
|
28683
28945
|
var LoggingScopeKindSchema = _enum([
|
|
28684
28946
|
"cluster",
|
|
@@ -28705,6 +28967,14 @@ var LoggingLevelLayerSchema = object({
|
|
|
28705
28967
|
scope: LoggingScopeKindSchema,
|
|
28706
28968
|
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
28707
28969
|
nodeId: string().nullable(),
|
|
28970
|
+
/**
|
|
28971
|
+
* The declared channel this layer speaks for; `null` on every layer but
|
|
28972
|
+
* `component`. Never folded into `nodeId`: a component level is CLUSTER-WIDE
|
|
28973
|
+
* by design — the convention this repo settled on is one orchestrator-wide
|
|
28974
|
+
* setting, never per node (D52) — so a component layer that carried a node
|
|
28975
|
+
* would invite a per-node copy of a value that has no per-node meaning.
|
|
28976
|
+
*/
|
|
28977
|
+
component: string().nullable(),
|
|
28708
28978
|
/** Explicitly set here, or `null` when this layer inherits. */
|
|
28709
28979
|
level: LogLevelSchema$1.nullable()
|
|
28710
28980
|
});
|
|
@@ -28746,6 +29016,49 @@ var DiagnosticWindowPatchSchema = object({
|
|
|
28746
29016
|
reportEveryMs: number().int().positive().optional()
|
|
28747
29017
|
});
|
|
28748
29018
|
/**
|
|
29019
|
+
* A channel ARMED, as the document reports it.
|
|
29020
|
+
*
|
|
29021
|
+
* `armMs` is not echoed back: what an operator needs to see is the deadline
|
|
29022
|
+
* and the time left, because a diagnostic left running is itself an incident
|
|
29023
|
+
* and "armed for 10 minutes" said an hour ago is not an answer.
|
|
29024
|
+
*/
|
|
29025
|
+
var LogChannelWindowStateSchema = object({
|
|
29026
|
+
channel: string(),
|
|
29027
|
+
armed: boolean(),
|
|
29028
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
29029
|
+
armedUntilMs: number(),
|
|
29030
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
29031
|
+
remainingMs: number(),
|
|
29032
|
+
/**
|
|
29033
|
+
* The cameras it is narrowed to, or `null` for every camera.
|
|
29034
|
+
*
|
|
29035
|
+
* A channel declared `perDevice: false` can only ever report `null` here:
|
|
29036
|
+
* its lines do not carry `tags: { deviceId }`, so narrowing them would
|
|
29037
|
+
* produce a filter that silently matches nothing. The server REFUSES such a
|
|
29038
|
+
* patch rather than quietly widening it — ignoring the request would teach
|
|
29039
|
+
* the operator that per-camera filtering works on that channel when it does
|
|
29040
|
+
* not.
|
|
29041
|
+
*/
|
|
29042
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
29043
|
+
});
|
|
29044
|
+
/**
|
|
29045
|
+
* `armMs: 0` DISARMS. Same grammar as {@link DiagnosticWindowPatchSchema}, and
|
|
29046
|
+
* for the same reason: a channel is a window with a deadline, never a switch.
|
|
29047
|
+
*/
|
|
29048
|
+
var LogChannelWindowPatchSchema = object({
|
|
29049
|
+
channel: string().min(1),
|
|
29050
|
+
armMs: number().int().min(0),
|
|
29051
|
+
/**
|
|
29052
|
+
* Narrow to these numeric device ids. Absent or `null` = every camera.
|
|
29053
|
+
*
|
|
29054
|
+
* Numeric because the repo's own rule makes it possible: every log line
|
|
29055
|
+
* about a device carries `tags: { deviceId }` with the numeric id. That rule
|
|
29056
|
+
* was paid for with a 22% thumbnail gap and a 3-hour media blackout both
|
|
29057
|
+
* diagnosed by hand, and this is the first thing that collects on it.
|
|
29058
|
+
*/
|
|
29059
|
+
deviceIds: array(number().int()).readonly().nullable().optional()
|
|
29060
|
+
});
|
|
29061
|
+
/**
|
|
28749
29062
|
* A PATCH, and patches MERGE.
|
|
28750
29063
|
*
|
|
28751
29064
|
* A field absent from the patch is left exactly as it was — arming a
|
|
@@ -28764,7 +29077,14 @@ var LoggingSettingsPatchSchema = object({
|
|
|
28764
29077
|
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
28765
29078
|
* keeps running — a patch is never a full replacement.
|
|
28766
29079
|
*/
|
|
28767
|
-
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
29080
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional(),
|
|
29081
|
+
/**
|
|
29082
|
+
* Only the channels NAMED here change. An armed channel that is not listed
|
|
29083
|
+
* keeps running — same rule as `diagnostics`, because a patch that silently
|
|
29084
|
+
* disarmed the channels it did not mention would make the Levels page and
|
|
29085
|
+
* the Diagnostics page fight over the same value.
|
|
29086
|
+
*/
|
|
29087
|
+
channels: array(LogChannelWindowPatchSchema).readonly().optional()
|
|
28768
29088
|
});
|
|
28769
29089
|
/**
|
|
28770
29090
|
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
@@ -28777,9 +29097,22 @@ var LoggingSettingsPatchSchema = object({
|
|
|
28777
29097
|
* authority over the whole hierarchy and answers for every layer, so the
|
|
28778
29098
|
* layer selector needs a name the transport does not already own.
|
|
28779
29099
|
*/
|
|
28780
|
-
var GetLoggingSettingsInputSchema = object({
|
|
29100
|
+
var GetLoggingSettingsInputSchema = object({
|
|
29101
|
+
scopeNodeId: string().optional(),
|
|
29102
|
+
/**
|
|
29103
|
+
* The declared CHANNEL this document is addressed at, when the caller wants
|
|
29104
|
+
* the `component` layer. Absent = the node/cluster hierarchy only.
|
|
29105
|
+
*
|
|
29106
|
+
* Naming it separately rather than overloading `scopeNodeId` keeps the two
|
|
29107
|
+
* axes from collapsing: a component level is cluster-wide, a node level is
|
|
29108
|
+
* not, and one selector for both would make "which of these two did I just
|
|
29109
|
+
* set" unanswerable — the exact ambiguity `explicit` exists to remove.
|
|
29110
|
+
*/
|
|
29111
|
+
scopeComponent: string().optional()
|
|
29112
|
+
});
|
|
28781
29113
|
var SetLoggingSettingsInputSchema = object({
|
|
28782
29114
|
scopeNodeId: string().optional(),
|
|
29115
|
+
scopeComponent: string().optional(),
|
|
28783
29116
|
patch: LoggingSettingsPatchSchema
|
|
28784
29117
|
});
|
|
28785
29118
|
/**
|
|
@@ -28794,9 +29127,20 @@ var SetLoggingSettingsInputSchema = object({
|
|
|
28794
29127
|
var LoggingSettingsStateSchema = object({
|
|
28795
29128
|
/** The layer this document was read at. `null` = the cluster layer. */
|
|
28796
29129
|
scopeNodeId: string().nullable(),
|
|
29130
|
+
/** The channel this document was read at. `null` = no component layer. */
|
|
29131
|
+
scopeComponent: string().nullable(),
|
|
28797
29132
|
effective: LoggingEffectiveSchema,
|
|
28798
29133
|
explicit: LoggingExplicitSchema,
|
|
28799
29134
|
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
29135
|
+
/**
|
|
29136
|
+
* Every channel the cluster's addons DECLARE, gathered from the
|
|
29137
|
+
* `log-channels` providers. Not stored anywhere: assembled per read, so a
|
|
29138
|
+
* channel added by a redeployed addon appears without anybody editing a
|
|
29139
|
+
* list, and a channel whose addon is gone stops being offered.
|
|
29140
|
+
*/
|
|
29141
|
+
channels: array(LogChannelDescriptorSchema).readonly(),
|
|
29142
|
+
/** The channels ARMED right now, each with its deadline. */
|
|
29143
|
+
activeChannels: array(LogChannelWindowStateSchema).readonly(),
|
|
28800
29144
|
persisted: boolean()
|
|
28801
29145
|
});
|
|
28802
29146
|
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(), {
|
|
@@ -31779,6 +32123,12 @@ Object.freeze({
|
|
|
31779
32123
|
addonId: null,
|
|
31780
32124
|
access: "view"
|
|
31781
32125
|
},
|
|
32126
|
+
"dataStoreProvider.aggregate": {
|
|
32127
|
+
capName: "data-store-provider",
|
|
32128
|
+
capScope: "system",
|
|
32129
|
+
addonId: null,
|
|
32130
|
+
access: "view"
|
|
32131
|
+
},
|
|
31782
32132
|
"dataStoreProvider.count": {
|
|
31783
32133
|
capName: "data-store-provider",
|
|
31784
32134
|
capScope: "system",
|
|
@@ -32193,6 +32543,12 @@ Object.freeze({
|
|
|
32193
32543
|
addonId: null,
|
|
32194
32544
|
access: "view"
|
|
32195
32545
|
},
|
|
32546
|
+
"deviceManager.getChildrenBatch": {
|
|
32547
|
+
capName: "device-manager",
|
|
32548
|
+
capScope: "system",
|
|
32549
|
+
addonId: null,
|
|
32550
|
+
access: "view"
|
|
32551
|
+
},
|
|
32196
32552
|
"deviceManager.getConfigSchema": {
|
|
32197
32553
|
capName: "device-manager",
|
|
32198
32554
|
capScope: "system",
|
|
@@ -33243,6 +33599,18 @@ Object.freeze({
|
|
|
33243
33599
|
addonId: null,
|
|
33244
33600
|
access: "create"
|
|
33245
33601
|
},
|
|
33602
|
+
"logChannels.apply": {
|
|
33603
|
+
capName: "log-channels",
|
|
33604
|
+
capScope: "system",
|
|
33605
|
+
addonId: null,
|
|
33606
|
+
access: "create"
|
|
33607
|
+
},
|
|
33608
|
+
"logChannels.list": {
|
|
33609
|
+
capName: "log-channels",
|
|
33610
|
+
capScope: "system",
|
|
33611
|
+
addonId: null,
|
|
33612
|
+
access: "view"
|
|
33613
|
+
},
|
|
33246
33614
|
"logDestination.query": {
|
|
33247
33615
|
capName: "log-destination",
|
|
33248
33616
|
capScope: "system",
|
|
@@ -35397,6 +35765,12 @@ Object.freeze({
|
|
|
35397
35765
|
addonId: null,
|
|
35398
35766
|
access: "create"
|
|
35399
35767
|
},
|
|
35768
|
+
"settingsStore.aggregate": {
|
|
35769
|
+
capName: "settings-store",
|
|
35770
|
+
capScope: "system",
|
|
35771
|
+
addonId: null,
|
|
35772
|
+
access: "view"
|
|
35773
|
+
},
|
|
35400
35774
|
"settingsStore.count": {
|
|
35401
35775
|
capName: "settings-store",
|
|
35402
35776
|
capScope: "system",
|
|
@@ -36976,6 +37350,11 @@ Object.freeze({
|
|
|
36976
37350
|
form: "single",
|
|
36977
37351
|
optional: false
|
|
36978
37352
|
}],
|
|
37353
|
+
"deviceManager.getChildrenBatch": [{
|
|
37354
|
+
name: "parentDeviceIds",
|
|
37355
|
+
form: "array",
|
|
37356
|
+
optional: false
|
|
37357
|
+
}],
|
|
36979
37358
|
"deviceManager.getConfigSchema": [{
|
|
36980
37359
|
name: "deviceId",
|
|
36981
37360
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -7544,6 +7544,111 @@ var CameraSwitchGroupSchema = object({
|
|
|
7544
7544
|
var DETECTION_PIPELINE_CAP_NAME = "detection-pipeline";
|
|
7545
7545
|
var AUDIO_ANALYSIS_CAP_NAME = "audio-analysis";
|
|
7546
7546
|
/**
|
|
7547
|
+
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
7548
|
+
* an addon declares its channels in.
|
|
7549
|
+
*
|
|
7550
|
+
* ## Two axes, deliberately separated
|
|
7551
|
+
*
|
|
7552
|
+
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
7553
|
+
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
7554
|
+
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
7555
|
+
* and rots silently. So a channel is declared where it is consulted, and the
|
|
7556
|
+
* `log-channels` capability enumerates the declarations.
|
|
7557
|
+
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
7558
|
+
* thing: the logging settings document on the `system` cap. Two authorities
|
|
7559
|
+
* over the values is the exact defect
|
|
7560
|
+
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
7561
|
+
* remove; re-introducing it from the cure side would be grotesque.
|
|
7562
|
+
*
|
|
7563
|
+
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
7564
|
+
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
7565
|
+
* the hot path with a value somebody actually read, and by
|
|
7566
|
+
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
7567
|
+
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
7568
|
+
* disarmed one (D49).
|
|
7569
|
+
*
|
|
7570
|
+
* ## The canonical call shape
|
|
7571
|
+
*
|
|
7572
|
+
* ```ts
|
|
7573
|
+
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
7574
|
+
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
7575
|
+
* }
|
|
7576
|
+
* ```
|
|
7577
|
+
*
|
|
7578
|
+
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
7579
|
+
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
7580
|
+
* object literal is never constructed because it lives inside the branch. It
|
|
7581
|
+
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
7582
|
+
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
7583
|
+
* destination floor (measured at 1.93 ns/call when off).
|
|
7584
|
+
*
|
|
7585
|
+
* ## Why a channel emits at `info`
|
|
7586
|
+
*
|
|
7587
|
+
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
7588
|
+
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
7589
|
+
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
7590
|
+
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
7591
|
+
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
7592
|
+
* emits at the channel's declared level, whose schema floor is `info`.
|
|
7593
|
+
*/
|
|
7594
|
+
/**
|
|
7595
|
+
* The level a channel writes at once armed.
|
|
7596
|
+
*
|
|
7597
|
+
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
7598
|
+
* not leave the process for Loki, and the whole point of arming a channel is
|
|
7599
|
+
* to read it later.
|
|
7600
|
+
*/
|
|
7601
|
+
var LogChannelLevelSchema = _enum([
|
|
7602
|
+
"info",
|
|
7603
|
+
"warn",
|
|
7604
|
+
"error"
|
|
7605
|
+
]);
|
|
7606
|
+
/**
|
|
7607
|
+
* What an addon declares about one channel. No value, no state — a
|
|
7608
|
+
* declaration is inert.
|
|
7609
|
+
*/
|
|
7610
|
+
var LogChannelDescriptorSchema = object({
|
|
7611
|
+
/**
|
|
7612
|
+
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
7613
|
+
* the addon's short name so an operator reading a channel list can tell who
|
|
7614
|
+
* owns it without a second lookup.
|
|
7615
|
+
*/
|
|
7616
|
+
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
7617
|
+
/** One sentence: what the operator will SEE after arming it. */
|
|
7618
|
+
description: string().min(1),
|
|
7619
|
+
/** The level its lines are emitted at. Never below `info`. */
|
|
7620
|
+
defaultLevel: LogChannelLevelSchema,
|
|
7621
|
+
/**
|
|
7622
|
+
* Whether this channel can be narrowed to a camera.
|
|
7623
|
+
*
|
|
7624
|
+
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
7625
|
+
* consulted with the numeric device id, AND every line the channel admits
|
|
7626
|
+
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
7627
|
+
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
7628
|
+
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
7629
|
+
* the body is the only way to filter.
|
|
7630
|
+
*
|
|
7631
|
+
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
7632
|
+
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
7633
|
+
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
7634
|
+
* path was never taken.
|
|
7635
|
+
*/
|
|
7636
|
+
perDevice: boolean()
|
|
7637
|
+
});
|
|
7638
|
+
/**
|
|
7639
|
+
* An armed window over one channel, as the document hands it to a mirror.
|
|
7640
|
+
*
|
|
7641
|
+
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
7642
|
+
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
7643
|
+
*/
|
|
7644
|
+
var LogChannelWindowSchema = object({
|
|
7645
|
+
channel: string().min(1),
|
|
7646
|
+
/** Epoch ms the window closes at. */
|
|
7647
|
+
armedUntilMs: number(),
|
|
7648
|
+
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
7649
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
7650
|
+
});
|
|
7651
|
+
/**
|
|
7547
7652
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
7548
7653
|
* recordings and events management surfaces.
|
|
7549
7654
|
*
|
|
@@ -11164,6 +11269,35 @@ var MutationFilterSchema = object({
|
|
|
11164
11269
|
whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
|
|
11165
11270
|
whereNot: record(string(), unknown()).optional()
|
|
11166
11271
|
});
|
|
11272
|
+
/**
|
|
11273
|
+
* One scalar an {@link settingsStoreCapability.methods.aggregate} call asks for.
|
|
11274
|
+
*
|
|
11275
|
+
* `as` names the slot in the result, so the SAME column may be asked twice with
|
|
11276
|
+
* two operations (`MIN(startMs)` and `MAX(startMs)` in one round trip) — which
|
|
11277
|
+
* a `Record<column, op>` shape could not express.
|
|
11278
|
+
*/
|
|
11279
|
+
var AggregateFieldSchema = object({
|
|
11280
|
+
/** Result key. */
|
|
11281
|
+
as: string().min(1),
|
|
11282
|
+
/** Column to aggregate. Must be a real column of a declared collection. */
|
|
11283
|
+
field: string().min(1),
|
|
11284
|
+
op: _enum([
|
|
11285
|
+
"sum",
|
|
11286
|
+
"min",
|
|
11287
|
+
"max"
|
|
11288
|
+
])
|
|
11289
|
+
});
|
|
11290
|
+
/**
|
|
11291
|
+
* `COUNT(*)` plus one number per requested field.
|
|
11292
|
+
*
|
|
11293
|
+
* `null` means NO ROW MATCHED, never zero: a `SUM` over an empty set and a sum
|
|
11294
|
+
* that really is 0 are different facts, and an accounting caller that renders
|
|
11295
|
+
* "0 bytes, oldest = 0" for "nothing here" reports a lie about a disk.
|
|
11296
|
+
*/
|
|
11297
|
+
var AggregateResultSchema = object({
|
|
11298
|
+
count: number().int(),
|
|
11299
|
+
values: record(string(), number().nullable())
|
|
11300
|
+
});
|
|
11167
11301
|
/** A single stored record: `{ id, data }`. */
|
|
11168
11302
|
var SettingsRecordSchema = object({
|
|
11169
11303
|
id: string(),
|
|
@@ -11248,6 +11382,11 @@ method(object({
|
|
|
11248
11382
|
collection: string(),
|
|
11249
11383
|
filter: QueryFilterSchema.optional()
|
|
11250
11384
|
}), number()), method(object({
|
|
11385
|
+
namespace: string().optional(),
|
|
11386
|
+
collection: string(),
|
|
11387
|
+
fields: array(AggregateFieldSchema).readonly(),
|
|
11388
|
+
filter: QueryFilterSchema.optional()
|
|
11389
|
+
}), AggregateResultSchema), method(object({
|
|
11251
11390
|
namespace: string().optional(),
|
|
11252
11391
|
collection: string(),
|
|
11253
11392
|
field: string(),
|
|
@@ -11364,6 +11503,11 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
|
|
|
11364
11503
|
collection: string(),
|
|
11365
11504
|
filter: QueryFilterSchema.optional()
|
|
11366
11505
|
}), number(), { auth: "admin" }), method(object({
|
|
11506
|
+
namespace: string().optional(),
|
|
11507
|
+
collection: string(),
|
|
11508
|
+
fields: array(AggregateFieldSchema).readonly(),
|
|
11509
|
+
filter: QueryFilterSchema.optional()
|
|
11510
|
+
}), AggregateResultSchema, { auth: "admin" }), method(object({
|
|
11367
11511
|
namespace: string().optional(),
|
|
11368
11512
|
collection: string(),
|
|
11369
11513
|
field: string(),
|
|
@@ -12032,24 +12176,6 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
|
|
|
12032
12176
|
kind: "mutation",
|
|
12033
12177
|
auth: "admin"
|
|
12034
12178
|
});
|
|
12035
|
-
/**
|
|
12036
|
-
* Device Manager capability — hub-side singleton that unifies device persistence,
|
|
12037
|
-
* live registry access, and all management operations into a single tRPC surface.
|
|
12038
|
-
*
|
|
12039
|
-
* Replaces:
|
|
12040
|
-
* - `device-persistence` capability (persistence methods absorbed here)
|
|
12041
|
-
* - `device-management.router.ts` (deleted in Phase 2)
|
|
12042
|
-
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
12043
|
-
*
|
|
12044
|
-
* All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
|
|
12045
|
-
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
12046
|
-
* - No nodeId routing needed — this is a pure hub singleton.
|
|
12047
|
-
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
12048
|
-
* - No shadow registry or cross-node aggregation required.
|
|
12049
|
-
*
|
|
12050
|
-
* Forked workers register devices back to the hub via `ctx.devices`
|
|
12051
|
-
* (DeviceManagerApi → ctx.api.deviceManager.registerDevice), same as today.
|
|
12052
|
-
*/
|
|
12053
12179
|
/** One child-placement directive on a container's `childLayout`. Structurally
|
|
12054
12180
|
* identical to `ChildLayoutEntry` in `device-management.ts` — the cap wire
|
|
12055
12181
|
* shape for the same field. The child is identified by its re-sync-stable
|
|
@@ -12418,7 +12544,7 @@ method(object({
|
|
|
12418
12544
|
* it answers today and the caller filters as it already does.
|
|
12419
12545
|
*/
|
|
12420
12546
|
deviceIds: array(number()).optional()
|
|
12421
|
-
}), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), object({
|
|
12547
|
+
}), 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({
|
|
12422
12548
|
mode: LinkedDevicesModeSchema,
|
|
12423
12549
|
devices: array(LinkedDeviceSchema)
|
|
12424
12550
|
})), 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({
|
|
@@ -13142,6 +13268,59 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
13142
13268
|
kind: "mutation",
|
|
13143
13269
|
auth: "admin"
|
|
13144
13270
|
});
|
|
13271
|
+
/**
|
|
13272
|
+
* `log-channels` — the capability an addon DECLARES its diagnostic channels
|
|
13273
|
+
* through. It stores nothing.
|
|
13274
|
+
*
|
|
13275
|
+
* ## Why a capability at all, and why this shape
|
|
13276
|
+
*
|
|
13277
|
+
* Which channels exist is knowledge only the addon has: `stream-broker` knows
|
|
13278
|
+
* webrtc/ICE/RTP, `provider-reolink` knows baichuan/handshake. A central list
|
|
13279
|
+
* maintained by hand rots at the first addition and rots INVISIBLY — nothing
|
|
13280
|
+
* fails, an operator just never sees the channel somebody added. So the list
|
|
13281
|
+
* is assembled from declarations at runtime.
|
|
13282
|
+
*
|
|
13283
|
+
* The shape is copied from `log-destination.cap.ts`, which already does
|
|
13284
|
+
* exactly this job: `mode: 'collection'`, `internal: true`,
|
|
13285
|
+
* `mount: { kind: 'skip' }` — no tRPC route, no generated hooks — while
|
|
13286
|
+
* `addons.listCapabilityProviders` still enumerates it, and the hub's
|
|
13287
|
+
* `CapabilityRegistry` still holds an RPC proxy per provider so a forked
|
|
13288
|
+
* runner's declarations reach hub-main over the transport that already exists.
|
|
13289
|
+
* No new UDS message, no second registry.
|
|
13290
|
+
*
|
|
13291
|
+
* ## What it deliberately does NOT own
|
|
13292
|
+
*
|
|
13293
|
+
* The VALUES — which channel is armed, for which cameras, until when — live in
|
|
13294
|
+
* ONE place: the logging settings document on the `system` cap
|
|
13295
|
+
* (`getLoggingSettings` / `setLoggingSettings`). Two authorities over the same
|
|
13296
|
+
* value is the defect the plan behind this work exists to remove, and
|
|
13297
|
+
* `setRequestCensus` was retired (D245) rather than allowed to be a second
|
|
13298
|
+
* one. {@link logChannelsCapability} therefore has no getter for a level, no
|
|
13299
|
+
* setter for a window and no persistence of any kind.
|
|
13300
|
+
*
|
|
13301
|
+
* ## Why `apply` is here even so
|
|
13302
|
+
*
|
|
13303
|
+
* The gate lives in the addon's PROCESS; the document lives in hub-main. Some
|
|
13304
|
+
* seam has to carry the value from the authority to the mirror, and a channel
|
|
13305
|
+
* that cannot be reached is precisely the dead knob this whole slice exists to
|
|
13306
|
+
* make impossible (D62 — `audioThresholdDbfs`, the HA entities with no source).
|
|
13307
|
+
* `apply` is that seam and nothing more: it writes an in-memory mirror, it
|
|
13308
|
+
* persists nothing, it is never the source of a value, and it is called only
|
|
13309
|
+
* with a set the hub actually read (D49 — a read that fails does not call it
|
|
13310
|
+
* at all, so no channel is silently disarmed by a bad read).
|
|
13311
|
+
*/
|
|
13312
|
+
/** What `apply` reports back — enough to log, not enough to be a second state. */
|
|
13313
|
+
var LogChannelApplyResultSchema = object({
|
|
13314
|
+
/** How many declared channels are armed in this process after the call. */
|
|
13315
|
+
armed: number().int().min(0),
|
|
13316
|
+
/**
|
|
13317
|
+
* Names the document armed that this process does not declare. Reported
|
|
13318
|
+
* rather than swallowed: a name here is either a typo or an addon that has
|
|
13319
|
+
* not booted, and both deserve a line instead of silence.
|
|
13320
|
+
*/
|
|
13321
|
+
unknown: array(string()).readonly()
|
|
13322
|
+
});
|
|
13323
|
+
method(_void(), array(LogChannelDescriptorSchema).readonly()), method(object({ windows: array(LogChannelWindowSchema).readonly() }), LogChannelApplyResultSchema, { kind: "mutation" });
|
|
13145
13324
|
var LogLevelSchema = _enum([
|
|
13146
13325
|
"debug",
|
|
13147
13326
|
"info",
|
|
@@ -28572,17 +28751,60 @@ var SetSiteLocationInputSchema = object({
|
|
|
28572
28751
|
longitude: number().min(-180).max(180)
|
|
28573
28752
|
}).nullable();
|
|
28574
28753
|
/**
|
|
28575
|
-
*
|
|
28754
|
+
* The TRANSPORT a call arrived on.
|
|
28755
|
+
*
|
|
28756
|
+
* Every counted call carries exactly one of these, and `unknown` is a PLANE
|
|
28757
|
+
* rather than a gap: a plane that cannot attribute a call declares it here, so
|
|
28758
|
+
* the call lands in a named bucket instead of vanishing. `planes` summing to
|
|
28759
|
+
* `procedureCalls` is what makes "the sum of the planes explains the total"
|
|
28760
|
+
* checkable rather than asserted.
|
|
28761
|
+
*
|
|
28762
|
+
* - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
|
|
28763
|
+
* - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
|
|
28764
|
+
* connection; the viewer talks to the hub over `wsLink`
|
|
28765
|
+
* exclusively, so this is the plane the HTTP census could not see.
|
|
28766
|
+
* - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
|
|
28767
|
+
* never touches a socket and therefore never touched a census.
|
|
28768
|
+
* - `unknown` — counted, plane undecidable. No hook produces it today, and
|
|
28769
|
+
* that is exactly what its `0` asserts: every plane the hub has can name
|
|
28770
|
+
* itself. It is an output bucket, never a knob — a call that arrives on a
|
|
28771
|
+
* plane nobody instrumented lands here instead of vanishing from the total.
|
|
28772
|
+
*/
|
|
28773
|
+
var TransportPlaneSchema = _enum([
|
|
28774
|
+
"http",
|
|
28775
|
+
"ws",
|
|
28776
|
+
"mesh",
|
|
28777
|
+
"unknown"
|
|
28778
|
+
]);
|
|
28779
|
+
/**
|
|
28780
|
+
* Calls per plane. Every key is always present, `0` included — an absent plane
|
|
28781
|
+
* reads as "not instrumented", which is the one thing this census must never
|
|
28782
|
+
* make an operator wonder about.
|
|
28783
|
+
*/
|
|
28784
|
+
var TransportPlaneCountsSchema = object({
|
|
28785
|
+
http: number(),
|
|
28786
|
+
ws: number(),
|
|
28787
|
+
mesh: number(),
|
|
28788
|
+
unknown: number()
|
|
28789
|
+
});
|
|
28790
|
+
/**
|
|
28791
|
+
* One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
|
|
28576
28792
|
* census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
|
|
28577
28793
|
* `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
|
|
28578
28794
|
* already prints - never a token, never an `Authorization` header.
|
|
28795
|
+
*
|
|
28796
|
+
* `subscriptions` is counted APART from `calls`: a subscription is opened once
|
|
28797
|
+
* and lives for hours, so folding it into a call count makes one long-lived
|
|
28798
|
+
* stream look like a storm.
|
|
28579
28799
|
*/
|
|
28580
28800
|
var RequestCensusGroupSchema = object({
|
|
28801
|
+
plane: TransportPlaneSchema,
|
|
28581
28802
|
procedure: string(),
|
|
28582
28803
|
userAgent: string(),
|
|
28583
28804
|
ip: string(),
|
|
28584
28805
|
principal: string(),
|
|
28585
28806
|
calls: number(),
|
|
28807
|
+
subscriptions: number(),
|
|
28586
28808
|
perMin: number()
|
|
28587
28809
|
});
|
|
28588
28810
|
/**
|
|
@@ -28595,6 +28817,14 @@ var RequestCensusGroupSchema = object({
|
|
|
28595
28817
|
var RequestCensusProcedureSchema = object({
|
|
28596
28818
|
procedure: string(),
|
|
28597
28819
|
calls: number(),
|
|
28820
|
+
/**
|
|
28821
|
+
* The same total, split by transport. THIS is the row that answers the
|
|
28822
|
+
* question the census exists for: one look at `deviceManager.listAll` says
|
|
28823
|
+
* which plane carried the 4 960, without joining two log lines by eye.
|
|
28824
|
+
*/
|
|
28825
|
+
planes: TransportPlaneCountsSchema,
|
|
28826
|
+
/** Subscription STARTS on this procedure. Never folded into `calls`. */
|
|
28827
|
+
subscriptions: number(),
|
|
28598
28828
|
perMin: number()
|
|
28599
28829
|
});
|
|
28600
28830
|
/**
|
|
@@ -28622,14 +28852,45 @@ var RequestCensusStatusSchema = object({
|
|
|
28622
28852
|
*/
|
|
28623
28853
|
procedureCalls: number(),
|
|
28624
28854
|
/**
|
|
28855
|
+
* `procedureCalls` split by transport. The four keys sum to
|
|
28856
|
+
* `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
|
|
28857
|
+
* `planesExplainTotal` is that identity, checked rather than assumed.
|
|
28858
|
+
*/
|
|
28859
|
+
planes: TransportPlaneCountsSchema,
|
|
28860
|
+
/**
|
|
28861
|
+
* True iff `planes` sums to `procedureCalls`. False means a call was counted
|
|
28862
|
+
* on no plane at all - which is a RESULT (a plane is missing from the
|
|
28863
|
+
* instrument), not a failure, and it has to be visible to be read as one.
|
|
28864
|
+
*/
|
|
28865
|
+
planesExplainTotal: boolean(),
|
|
28866
|
+
/**
|
|
28625
28867
|
* tRPC WebSocket connections opened during the window. NOT calls - the WS
|
|
28626
|
-
*
|
|
28627
|
-
*
|
|
28868
|
+
* adapter resolves one context per connection - kept because a plane's call
|
|
28869
|
+
* count of zero against 37 open connections says something different from a
|
|
28870
|
+
* plane with no connections at all.
|
|
28628
28871
|
*/
|
|
28629
28872
|
wsConnections: number(),
|
|
28873
|
+
/**
|
|
28874
|
+
* Client frames the WS plane looked at. `wsMessages` far above
|
|
28875
|
+
* `planes.ws + subscriptions` means most traffic is not operations
|
|
28876
|
+
* (keepalives, connection params) - which is itself an answer.
|
|
28877
|
+
*/
|
|
28878
|
+
wsMessages: number(),
|
|
28879
|
+
/**
|
|
28880
|
+
* Subscription STARTS across every plane, excluded from `procedureCalls` on
|
|
28881
|
+
* purpose: one live-events stream opened at boot and held for six hours is
|
|
28882
|
+
* one subscription, and counting it as a call would let a quiet plane
|
|
28883
|
+
* masquerade as the storm.
|
|
28884
|
+
*/
|
|
28885
|
+
subscriptions: number(),
|
|
28886
|
+
/** `subscription.stop` frames. Starts minus stops is what is still open. */
|
|
28887
|
+
subscriptionStops: number(),
|
|
28630
28888
|
distinctGroups: number(),
|
|
28631
|
-
/**
|
|
28632
|
-
*
|
|
28889
|
+
/**
|
|
28890
|
+
* Operations counted in the totals whose CALLER attribution was shed at the
|
|
28891
|
+
* cardinality bound. Unrelated to the `unknown` PLANE: these calls know
|
|
28892
|
+
* which transport they arrived on, they just lost their group row.
|
|
28893
|
+
*/
|
|
28633
28894
|
unattributedCalls: number(),
|
|
28634
28895
|
procedures: array(RequestCensusProcedureSchema).readonly(),
|
|
28635
28896
|
groups: array(RequestCensusGroupSchema).readonly()
|
|
@@ -28652,10 +28913,11 @@ var DiagnosticIdSchema = _enum(["request-census"]);
|
|
|
28652
28913
|
* The layers of the level hierarchy, general → specific. The most specific
|
|
28653
28914
|
* layer that carries an explicit value wins.
|
|
28654
28915
|
*
|
|
28655
|
-
* `component`
|
|
28656
|
-
*
|
|
28657
|
-
*
|
|
28658
|
-
*
|
|
28916
|
+
* `component` became RESOLVABLE on 2026-08-27: a component is a declared log
|
|
28917
|
+
* CHANNEL (`stream-broker.webrtc`, `provider-reolink.baichuan`), named by
|
|
28918
|
+
* `scopeComponent`. It was declared-but-dark in the first slice precisely so
|
|
28919
|
+
* that turning it on would not force every consumer of this document to widen
|
|
28920
|
+
* a `levelSource` enum — which is what has now not happened.
|
|
28659
28921
|
*/
|
|
28660
28922
|
var LoggingScopeKindSchema = _enum([
|
|
28661
28923
|
"cluster",
|
|
@@ -28682,6 +28944,14 @@ var LoggingLevelLayerSchema = object({
|
|
|
28682
28944
|
scope: LoggingScopeKindSchema,
|
|
28683
28945
|
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
28684
28946
|
nodeId: string().nullable(),
|
|
28947
|
+
/**
|
|
28948
|
+
* The declared channel this layer speaks for; `null` on every layer but
|
|
28949
|
+
* `component`. Never folded into `nodeId`: a component level is CLUSTER-WIDE
|
|
28950
|
+
* by design — the convention this repo settled on is one orchestrator-wide
|
|
28951
|
+
* setting, never per node (D52) — so a component layer that carried a node
|
|
28952
|
+
* would invite a per-node copy of a value that has no per-node meaning.
|
|
28953
|
+
*/
|
|
28954
|
+
component: string().nullable(),
|
|
28685
28955
|
/** Explicitly set here, or `null` when this layer inherits. */
|
|
28686
28956
|
level: LogLevelSchema$1.nullable()
|
|
28687
28957
|
});
|
|
@@ -28723,6 +28993,49 @@ var DiagnosticWindowPatchSchema = object({
|
|
|
28723
28993
|
reportEveryMs: number().int().positive().optional()
|
|
28724
28994
|
});
|
|
28725
28995
|
/**
|
|
28996
|
+
* A channel ARMED, as the document reports it.
|
|
28997
|
+
*
|
|
28998
|
+
* `armMs` is not echoed back: what an operator needs to see is the deadline
|
|
28999
|
+
* and the time left, because a diagnostic left running is itself an incident
|
|
29000
|
+
* and "armed for 10 minutes" said an hour ago is not an answer.
|
|
29001
|
+
*/
|
|
29002
|
+
var LogChannelWindowStateSchema = object({
|
|
29003
|
+
channel: string(),
|
|
29004
|
+
armed: boolean(),
|
|
29005
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
29006
|
+
armedUntilMs: number(),
|
|
29007
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
29008
|
+
remainingMs: number(),
|
|
29009
|
+
/**
|
|
29010
|
+
* The cameras it is narrowed to, or `null` for every camera.
|
|
29011
|
+
*
|
|
29012
|
+
* A channel declared `perDevice: false` can only ever report `null` here:
|
|
29013
|
+
* its lines do not carry `tags: { deviceId }`, so narrowing them would
|
|
29014
|
+
* produce a filter that silently matches nothing. The server REFUSES such a
|
|
29015
|
+
* patch rather than quietly widening it — ignoring the request would teach
|
|
29016
|
+
* the operator that per-camera filtering works on that channel when it does
|
|
29017
|
+
* not.
|
|
29018
|
+
*/
|
|
29019
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
29020
|
+
});
|
|
29021
|
+
/**
|
|
29022
|
+
* `armMs: 0` DISARMS. Same grammar as {@link DiagnosticWindowPatchSchema}, and
|
|
29023
|
+
* for the same reason: a channel is a window with a deadline, never a switch.
|
|
29024
|
+
*/
|
|
29025
|
+
var LogChannelWindowPatchSchema = object({
|
|
29026
|
+
channel: string().min(1),
|
|
29027
|
+
armMs: number().int().min(0),
|
|
29028
|
+
/**
|
|
29029
|
+
* Narrow to these numeric device ids. Absent or `null` = every camera.
|
|
29030
|
+
*
|
|
29031
|
+
* Numeric because the repo's own rule makes it possible: every log line
|
|
29032
|
+
* about a device carries `tags: { deviceId }` with the numeric id. That rule
|
|
29033
|
+
* was paid for with a 22% thumbnail gap and a 3-hour media blackout both
|
|
29034
|
+
* diagnosed by hand, and this is the first thing that collects on it.
|
|
29035
|
+
*/
|
|
29036
|
+
deviceIds: array(number().int()).readonly().nullable().optional()
|
|
29037
|
+
});
|
|
29038
|
+
/**
|
|
28726
29039
|
* A PATCH, and patches MERGE.
|
|
28727
29040
|
*
|
|
28728
29041
|
* A field absent from the patch is left exactly as it was — arming a
|
|
@@ -28741,7 +29054,14 @@ var LoggingSettingsPatchSchema = object({
|
|
|
28741
29054
|
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
28742
29055
|
* keeps running — a patch is never a full replacement.
|
|
28743
29056
|
*/
|
|
28744
|
-
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
29057
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional(),
|
|
29058
|
+
/**
|
|
29059
|
+
* Only the channels NAMED here change. An armed channel that is not listed
|
|
29060
|
+
* keeps running — same rule as `diagnostics`, because a patch that silently
|
|
29061
|
+
* disarmed the channels it did not mention would make the Levels page and
|
|
29062
|
+
* the Diagnostics page fight over the same value.
|
|
29063
|
+
*/
|
|
29064
|
+
channels: array(LogChannelWindowPatchSchema).readonly().optional()
|
|
28745
29065
|
});
|
|
28746
29066
|
/**
|
|
28747
29067
|
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
@@ -28754,9 +29074,22 @@ var LoggingSettingsPatchSchema = object({
|
|
|
28754
29074
|
* authority over the whole hierarchy and answers for every layer, so the
|
|
28755
29075
|
* layer selector needs a name the transport does not already own.
|
|
28756
29076
|
*/
|
|
28757
|
-
var GetLoggingSettingsInputSchema = object({
|
|
29077
|
+
var GetLoggingSettingsInputSchema = object({
|
|
29078
|
+
scopeNodeId: string().optional(),
|
|
29079
|
+
/**
|
|
29080
|
+
* The declared CHANNEL this document is addressed at, when the caller wants
|
|
29081
|
+
* the `component` layer. Absent = the node/cluster hierarchy only.
|
|
29082
|
+
*
|
|
29083
|
+
* Naming it separately rather than overloading `scopeNodeId` keeps the two
|
|
29084
|
+
* axes from collapsing: a component level is cluster-wide, a node level is
|
|
29085
|
+
* not, and one selector for both would make "which of these two did I just
|
|
29086
|
+
* set" unanswerable — the exact ambiguity `explicit` exists to remove.
|
|
29087
|
+
*/
|
|
29088
|
+
scopeComponent: string().optional()
|
|
29089
|
+
});
|
|
28758
29090
|
var SetLoggingSettingsInputSchema = object({
|
|
28759
29091
|
scopeNodeId: string().optional(),
|
|
29092
|
+
scopeComponent: string().optional(),
|
|
28760
29093
|
patch: LoggingSettingsPatchSchema
|
|
28761
29094
|
});
|
|
28762
29095
|
/**
|
|
@@ -28771,9 +29104,20 @@ var SetLoggingSettingsInputSchema = object({
|
|
|
28771
29104
|
var LoggingSettingsStateSchema = object({
|
|
28772
29105
|
/** The layer this document was read at. `null` = the cluster layer. */
|
|
28773
29106
|
scopeNodeId: string().nullable(),
|
|
29107
|
+
/** The channel this document was read at. `null` = no component layer. */
|
|
29108
|
+
scopeComponent: string().nullable(),
|
|
28774
29109
|
effective: LoggingEffectiveSchema,
|
|
28775
29110
|
explicit: LoggingExplicitSchema,
|
|
28776
29111
|
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
29112
|
+
/**
|
|
29113
|
+
* Every channel the cluster's addons DECLARE, gathered from the
|
|
29114
|
+
* `log-channels` providers. Not stored anywhere: assembled per read, so a
|
|
29115
|
+
* channel added by a redeployed addon appears without anybody editing a
|
|
29116
|
+
* list, and a channel whose addon is gone stops being offered.
|
|
29117
|
+
*/
|
|
29118
|
+
channels: array(LogChannelDescriptorSchema).readonly(),
|
|
29119
|
+
/** The channels ARMED right now, each with its deadline. */
|
|
29120
|
+
activeChannels: array(LogChannelWindowStateSchema).readonly(),
|
|
28777
29121
|
persisted: boolean()
|
|
28778
29122
|
});
|
|
28779
29123
|
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(), {
|
|
@@ -31756,6 +32100,12 @@ Object.freeze({
|
|
|
31756
32100
|
addonId: null,
|
|
31757
32101
|
access: "view"
|
|
31758
32102
|
},
|
|
32103
|
+
"dataStoreProvider.aggregate": {
|
|
32104
|
+
capName: "data-store-provider",
|
|
32105
|
+
capScope: "system",
|
|
32106
|
+
addonId: null,
|
|
32107
|
+
access: "view"
|
|
32108
|
+
},
|
|
31759
32109
|
"dataStoreProvider.count": {
|
|
31760
32110
|
capName: "data-store-provider",
|
|
31761
32111
|
capScope: "system",
|
|
@@ -32170,6 +32520,12 @@ Object.freeze({
|
|
|
32170
32520
|
addonId: null,
|
|
32171
32521
|
access: "view"
|
|
32172
32522
|
},
|
|
32523
|
+
"deviceManager.getChildrenBatch": {
|
|
32524
|
+
capName: "device-manager",
|
|
32525
|
+
capScope: "system",
|
|
32526
|
+
addonId: null,
|
|
32527
|
+
access: "view"
|
|
32528
|
+
},
|
|
32173
32529
|
"deviceManager.getConfigSchema": {
|
|
32174
32530
|
capName: "device-manager",
|
|
32175
32531
|
capScope: "system",
|
|
@@ -33220,6 +33576,18 @@ Object.freeze({
|
|
|
33220
33576
|
addonId: null,
|
|
33221
33577
|
access: "create"
|
|
33222
33578
|
},
|
|
33579
|
+
"logChannels.apply": {
|
|
33580
|
+
capName: "log-channels",
|
|
33581
|
+
capScope: "system",
|
|
33582
|
+
addonId: null,
|
|
33583
|
+
access: "create"
|
|
33584
|
+
},
|
|
33585
|
+
"logChannels.list": {
|
|
33586
|
+
capName: "log-channels",
|
|
33587
|
+
capScope: "system",
|
|
33588
|
+
addonId: null,
|
|
33589
|
+
access: "view"
|
|
33590
|
+
},
|
|
33223
33591
|
"logDestination.query": {
|
|
33224
33592
|
capName: "log-destination",
|
|
33225
33593
|
capScope: "system",
|
|
@@ -35374,6 +35742,12 @@ Object.freeze({
|
|
|
35374
35742
|
addonId: null,
|
|
35375
35743
|
access: "create"
|
|
35376
35744
|
},
|
|
35745
|
+
"settingsStore.aggregate": {
|
|
35746
|
+
capName: "settings-store",
|
|
35747
|
+
capScope: "system",
|
|
35748
|
+
addonId: null,
|
|
35749
|
+
access: "view"
|
|
35750
|
+
},
|
|
35377
35751
|
"settingsStore.count": {
|
|
35378
35752
|
capName: "settings-store",
|
|
35379
35753
|
capScope: "system",
|
|
@@ -36953,6 +37327,11 @@ Object.freeze({
|
|
|
36953
37327
|
form: "single",
|
|
36954
37328
|
optional: false
|
|
36955
37329
|
}],
|
|
37330
|
+
"deviceManager.getChildrenBatch": [{
|
|
37331
|
+
name: "parentDeviceIds",
|
|
37332
|
+
form: "array",
|
|
37333
|
+
optional: false
|
|
37334
|
+
}],
|
|
36956
37335
|
"deviceManager.getConfigSchema": [{
|
|
36957
37336
|
name: "deviceId",
|
|
36958
37337
|
form: "single",
|