@camstack/addon-tailscale 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/client/tailscale.addon.js +1 -1
- package/dist/client/tailscale.addon.mjs +1 -1
- package/dist/{dist-PPumLXbw.mjs → dist-CGnxfaPe.mjs} +409 -30
- package/dist/{dist-DweC0Ts3.js → dist-KZM_ozLM.js} +409 -30
- package/dist/ingress/tailscale-ingress.addon.js +1 -1
- package/dist/ingress/tailscale-ingress.addon.mjs +1 -1
- package/package.json +1 -1
|
@@ -24,7 +24,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
enumerable: true
|
|
25
25
|
}) : target, mod));
|
|
26
26
|
//#endregion
|
|
27
|
-
const require_dist = require("../dist-
|
|
27
|
+
const require_dist = require("../dist-KZM_ozLM.js");
|
|
28
28
|
let node_child_process = require("node:child_process");
|
|
29
29
|
let node_util = require("node:util");
|
|
30
30
|
let node_fs = require("node:fs");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as EventCategory, i as BaseAddon, n as networkAccessCapability, r as BOOT_RECOVERY_BACKOFF_MS, t as meshNetworkCapability } from "../dist-
|
|
1
|
+
import { a as EventCategory, i as BaseAddon, n as networkAccessCapability, r as BOOT_RECOVERY_BACKOFF_MS, t as meshNetworkCapability } from "../dist-CGnxfaPe.mjs";
|
|
2
2
|
import { execFile, spawn } from "node:child_process";
|
|
3
3
|
import { promisify } from "node:util";
|
|
4
4
|
import * as fs from "node:fs";
|
|
@@ -7485,6 +7485,111 @@ var CameraSwitchGroupSchema = object({
|
|
|
7485
7485
|
fetchedAt: number()
|
|
7486
7486
|
});
|
|
7487
7487
|
/**
|
|
7488
|
+
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
7489
|
+
* an addon declares its channels in.
|
|
7490
|
+
*
|
|
7491
|
+
* ## Two axes, deliberately separated
|
|
7492
|
+
*
|
|
7493
|
+
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
7494
|
+
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
7495
|
+
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
7496
|
+
* and rots silently. So a channel is declared where it is consulted, and the
|
|
7497
|
+
* `log-channels` capability enumerates the declarations.
|
|
7498
|
+
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
7499
|
+
* thing: the logging settings document on the `system` cap. Two authorities
|
|
7500
|
+
* over the values is the exact defect
|
|
7501
|
+
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
7502
|
+
* remove; re-introducing it from the cure side would be grotesque.
|
|
7503
|
+
*
|
|
7504
|
+
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
7505
|
+
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
7506
|
+
* the hot path with a value somebody actually read, and by
|
|
7507
|
+
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
7508
|
+
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
7509
|
+
* disarmed one (D49).
|
|
7510
|
+
*
|
|
7511
|
+
* ## The canonical call shape
|
|
7512
|
+
*
|
|
7513
|
+
* ```ts
|
|
7514
|
+
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
7515
|
+
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
7516
|
+
* }
|
|
7517
|
+
* ```
|
|
7518
|
+
*
|
|
7519
|
+
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
7520
|
+
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
7521
|
+
* object literal is never constructed because it lives inside the branch. It
|
|
7522
|
+
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
7523
|
+
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
7524
|
+
* destination floor (measured at 1.93 ns/call when off).
|
|
7525
|
+
*
|
|
7526
|
+
* ## Why a channel emits at `info`
|
|
7527
|
+
*
|
|
7528
|
+
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
7529
|
+
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
7530
|
+
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
7531
|
+
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
7532
|
+
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
7533
|
+
* emits at the channel's declared level, whose schema floor is `info`.
|
|
7534
|
+
*/
|
|
7535
|
+
/**
|
|
7536
|
+
* The level a channel writes at once armed.
|
|
7537
|
+
*
|
|
7538
|
+
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
7539
|
+
* not leave the process for Loki, and the whole point of arming a channel is
|
|
7540
|
+
* to read it later.
|
|
7541
|
+
*/
|
|
7542
|
+
var LogChannelLevelSchema = _enum([
|
|
7543
|
+
"info",
|
|
7544
|
+
"warn",
|
|
7545
|
+
"error"
|
|
7546
|
+
]);
|
|
7547
|
+
/**
|
|
7548
|
+
* What an addon declares about one channel. No value, no state — a
|
|
7549
|
+
* declaration is inert.
|
|
7550
|
+
*/
|
|
7551
|
+
var LogChannelDescriptorSchema = object({
|
|
7552
|
+
/**
|
|
7553
|
+
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
7554
|
+
* the addon's short name so an operator reading a channel list can tell who
|
|
7555
|
+
* owns it without a second lookup.
|
|
7556
|
+
*/
|
|
7557
|
+
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
7558
|
+
/** One sentence: what the operator will SEE after arming it. */
|
|
7559
|
+
description: string().min(1),
|
|
7560
|
+
/** The level its lines are emitted at. Never below `info`. */
|
|
7561
|
+
defaultLevel: LogChannelLevelSchema,
|
|
7562
|
+
/**
|
|
7563
|
+
* Whether this channel can be narrowed to a camera.
|
|
7564
|
+
*
|
|
7565
|
+
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
7566
|
+
* consulted with the numeric device id, AND every line the channel admits
|
|
7567
|
+
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
7568
|
+
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
7569
|
+
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
7570
|
+
* the body is the only way to filter.
|
|
7571
|
+
*
|
|
7572
|
+
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
7573
|
+
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
7574
|
+
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
7575
|
+
* path was never taken.
|
|
7576
|
+
*/
|
|
7577
|
+
perDevice: boolean()
|
|
7578
|
+
});
|
|
7579
|
+
/**
|
|
7580
|
+
* An armed window over one channel, as the document hands it to a mirror.
|
|
7581
|
+
*
|
|
7582
|
+
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
7583
|
+
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
7584
|
+
*/
|
|
7585
|
+
var LogChannelWindowSchema = object({
|
|
7586
|
+
channel: string().min(1),
|
|
7587
|
+
/** Epoch ms the window closes at. */
|
|
7588
|
+
armedUntilMs: number(),
|
|
7589
|
+
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
7590
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
7591
|
+
});
|
|
7592
|
+
/**
|
|
7488
7593
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
7489
7594
|
* recordings and events management surfaces.
|
|
7490
7595
|
*
|
|
@@ -11003,6 +11108,35 @@ var MutationFilterSchema = object({
|
|
|
11003
11108
|
whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
|
|
11004
11109
|
whereNot: record(string(), unknown()).optional()
|
|
11005
11110
|
});
|
|
11111
|
+
/**
|
|
11112
|
+
* One scalar an {@link settingsStoreCapability.methods.aggregate} call asks for.
|
|
11113
|
+
*
|
|
11114
|
+
* `as` names the slot in the result, so the SAME column may be asked twice with
|
|
11115
|
+
* two operations (`MIN(startMs)` and `MAX(startMs)` in one round trip) — which
|
|
11116
|
+
* a `Record<column, op>` shape could not express.
|
|
11117
|
+
*/
|
|
11118
|
+
var AggregateFieldSchema = object({
|
|
11119
|
+
/** Result key. */
|
|
11120
|
+
as: string().min(1),
|
|
11121
|
+
/** Column to aggregate. Must be a real column of a declared collection. */
|
|
11122
|
+
field: string().min(1),
|
|
11123
|
+
op: _enum([
|
|
11124
|
+
"sum",
|
|
11125
|
+
"min",
|
|
11126
|
+
"max"
|
|
11127
|
+
])
|
|
11128
|
+
});
|
|
11129
|
+
/**
|
|
11130
|
+
* `COUNT(*)` plus one number per requested field.
|
|
11131
|
+
*
|
|
11132
|
+
* `null` means NO ROW MATCHED, never zero: a `SUM` over an empty set and a sum
|
|
11133
|
+
* that really is 0 are different facts, and an accounting caller that renders
|
|
11134
|
+
* "0 bytes, oldest = 0" for "nothing here" reports a lie about a disk.
|
|
11135
|
+
*/
|
|
11136
|
+
var AggregateResultSchema = object({
|
|
11137
|
+
count: number().int(),
|
|
11138
|
+
values: record(string(), number().nullable())
|
|
11139
|
+
});
|
|
11006
11140
|
/** A single stored record: `{ id, data }`. */
|
|
11007
11141
|
var SettingsRecordSchema = object({
|
|
11008
11142
|
id: string(),
|
|
@@ -11087,6 +11221,11 @@ method(object({
|
|
|
11087
11221
|
collection: string(),
|
|
11088
11222
|
filter: QueryFilterSchema.optional()
|
|
11089
11223
|
}), number()), method(object({
|
|
11224
|
+
namespace: string().optional(),
|
|
11225
|
+
collection: string(),
|
|
11226
|
+
fields: array(AggregateFieldSchema).readonly(),
|
|
11227
|
+
filter: QueryFilterSchema.optional()
|
|
11228
|
+
}), AggregateResultSchema), method(object({
|
|
11090
11229
|
namespace: string().optional(),
|
|
11091
11230
|
collection: string(),
|
|
11092
11231
|
field: string(),
|
|
@@ -11203,6 +11342,11 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
|
|
|
11203
11342
|
collection: string(),
|
|
11204
11343
|
filter: QueryFilterSchema.optional()
|
|
11205
11344
|
}), number(), { auth: "admin" }), method(object({
|
|
11345
|
+
namespace: string().optional(),
|
|
11346
|
+
collection: string(),
|
|
11347
|
+
fields: array(AggregateFieldSchema).readonly(),
|
|
11348
|
+
filter: QueryFilterSchema.optional()
|
|
11349
|
+
}), AggregateResultSchema, { auth: "admin" }), method(object({
|
|
11206
11350
|
namespace: string().optional(),
|
|
11207
11351
|
collection: string(),
|
|
11208
11352
|
field: string(),
|
|
@@ -11764,24 +11908,6 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
|
|
|
11764
11908
|
kind: "mutation",
|
|
11765
11909
|
auth: "admin"
|
|
11766
11910
|
});
|
|
11767
|
-
/**
|
|
11768
|
-
* Device Manager capability — hub-side singleton that unifies device persistence,
|
|
11769
|
-
* live registry access, and all management operations into a single tRPC surface.
|
|
11770
|
-
*
|
|
11771
|
-
* Replaces:
|
|
11772
|
-
* - `device-persistence` capability (persistence methods absorbed here)
|
|
11773
|
-
* - `device-management.router.ts` (deleted in Phase 2)
|
|
11774
|
-
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
11775
|
-
*
|
|
11776
|
-
* All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
|
|
11777
|
-
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
11778
|
-
* - No nodeId routing needed — this is a pure hub singleton.
|
|
11779
|
-
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
11780
|
-
* - No shadow registry or cross-node aggregation required.
|
|
11781
|
-
*
|
|
11782
|
-
* Forked workers register devices back to the hub via `ctx.devices`
|
|
11783
|
-
* (DeviceManagerApi → ctx.api.deviceManager.registerDevice), same as today.
|
|
11784
|
-
*/
|
|
11785
11911
|
/** One child-placement directive on a container's `childLayout`. Structurally
|
|
11786
11912
|
* identical to `ChildLayoutEntry` in `device-management.ts` — the cap wire
|
|
11787
11913
|
* shape for the same field. The child is identified by its re-sync-stable
|
|
@@ -12150,7 +12276,7 @@ method(object({
|
|
|
12150
12276
|
* it answers today and the caller filters as it already does.
|
|
12151
12277
|
*/
|
|
12152
12278
|
deviceIds: array(number()).optional()
|
|
12153
|
-
}), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), object({
|
|
12279
|
+
}), 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({
|
|
12154
12280
|
mode: LinkedDevicesModeSchema,
|
|
12155
12281
|
devices: array(LinkedDeviceSchema)
|
|
12156
12282
|
})), 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({
|
|
@@ -12874,6 +13000,59 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
12874
13000
|
kind: "mutation",
|
|
12875
13001
|
auth: "admin"
|
|
12876
13002
|
});
|
|
13003
|
+
/**
|
|
13004
|
+
* `log-channels` — the capability an addon DECLARES its diagnostic channels
|
|
13005
|
+
* through. It stores nothing.
|
|
13006
|
+
*
|
|
13007
|
+
* ## Why a capability at all, and why this shape
|
|
13008
|
+
*
|
|
13009
|
+
* Which channels exist is knowledge only the addon has: `stream-broker` knows
|
|
13010
|
+
* webrtc/ICE/RTP, `provider-reolink` knows baichuan/handshake. A central list
|
|
13011
|
+
* maintained by hand rots at the first addition and rots INVISIBLY — nothing
|
|
13012
|
+
* fails, an operator just never sees the channel somebody added. So the list
|
|
13013
|
+
* is assembled from declarations at runtime.
|
|
13014
|
+
*
|
|
13015
|
+
* The shape is copied from `log-destination.cap.ts`, which already does
|
|
13016
|
+
* exactly this job: `mode: 'collection'`, `internal: true`,
|
|
13017
|
+
* `mount: { kind: 'skip' }` — no tRPC route, no generated hooks — while
|
|
13018
|
+
* `addons.listCapabilityProviders` still enumerates it, and the hub's
|
|
13019
|
+
* `CapabilityRegistry` still holds an RPC proxy per provider so a forked
|
|
13020
|
+
* runner's declarations reach hub-main over the transport that already exists.
|
|
13021
|
+
* No new UDS message, no second registry.
|
|
13022
|
+
*
|
|
13023
|
+
* ## What it deliberately does NOT own
|
|
13024
|
+
*
|
|
13025
|
+
* The VALUES — which channel is armed, for which cameras, until when — live in
|
|
13026
|
+
* ONE place: the logging settings document on the `system` cap
|
|
13027
|
+
* (`getLoggingSettings` / `setLoggingSettings`). Two authorities over the same
|
|
13028
|
+
* value is the defect the plan behind this work exists to remove, and
|
|
13029
|
+
* `setRequestCensus` was retired (D245) rather than allowed to be a second
|
|
13030
|
+
* one. {@link logChannelsCapability} therefore has no getter for a level, no
|
|
13031
|
+
* setter for a window and no persistence of any kind.
|
|
13032
|
+
*
|
|
13033
|
+
* ## Why `apply` is here even so
|
|
13034
|
+
*
|
|
13035
|
+
* The gate lives in the addon's PROCESS; the document lives in hub-main. Some
|
|
13036
|
+
* seam has to carry the value from the authority to the mirror, and a channel
|
|
13037
|
+
* that cannot be reached is precisely the dead knob this whole slice exists to
|
|
13038
|
+
* make impossible (D62 — `audioThresholdDbfs`, the HA entities with no source).
|
|
13039
|
+
* `apply` is that seam and nothing more: it writes an in-memory mirror, it
|
|
13040
|
+
* persists nothing, it is never the source of a value, and it is called only
|
|
13041
|
+
* with a set the hub actually read (D49 — a read that fails does not call it
|
|
13042
|
+
* at all, so no channel is silently disarmed by a bad read).
|
|
13043
|
+
*/
|
|
13044
|
+
/** What `apply` reports back — enough to log, not enough to be a second state. */
|
|
13045
|
+
var LogChannelApplyResultSchema = object({
|
|
13046
|
+
/** How many declared channels are armed in this process after the call. */
|
|
13047
|
+
armed: number().int().min(0),
|
|
13048
|
+
/**
|
|
13049
|
+
* Names the document armed that this process does not declare. Reported
|
|
13050
|
+
* rather than swallowed: a name here is either a typo or an addon that has
|
|
13051
|
+
* not booted, and both deserve a line instead of silence.
|
|
13052
|
+
*/
|
|
13053
|
+
unknown: array(string()).readonly()
|
|
13054
|
+
});
|
|
13055
|
+
method(_void(), array(LogChannelDescriptorSchema).readonly()), method(object({ windows: array(LogChannelWindowSchema).readonly() }), LogChannelApplyResultSchema, { kind: "mutation" });
|
|
12877
13056
|
var LogLevelSchema = _enum([
|
|
12878
13057
|
"debug",
|
|
12879
13058
|
"info",
|
|
@@ -26207,17 +26386,60 @@ var SetSiteLocationInputSchema = object({
|
|
|
26207
26386
|
longitude: number().min(-180).max(180)
|
|
26208
26387
|
}).nullable();
|
|
26209
26388
|
/**
|
|
26210
|
-
*
|
|
26389
|
+
* The TRANSPORT a call arrived on.
|
|
26390
|
+
*
|
|
26391
|
+
* Every counted call carries exactly one of these, and `unknown` is a PLANE
|
|
26392
|
+
* rather than a gap: a plane that cannot attribute a call declares it here, so
|
|
26393
|
+
* the call lands in a named bucket instead of vanishing. `planes` summing to
|
|
26394
|
+
* `procedureCalls` is what makes "the sum of the planes explains the total"
|
|
26395
|
+
* checkable rather than asserted.
|
|
26396
|
+
*
|
|
26397
|
+
* - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
|
|
26398
|
+
* - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
|
|
26399
|
+
* connection; the viewer talks to the hub over `wsLink`
|
|
26400
|
+
* exclusively, so this is the plane the HTTP census could not see.
|
|
26401
|
+
* - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
|
|
26402
|
+
* never touches a socket and therefore never touched a census.
|
|
26403
|
+
* - `unknown` — counted, plane undecidable. No hook produces it today, and
|
|
26404
|
+
* that is exactly what its `0` asserts: every plane the hub has can name
|
|
26405
|
+
* itself. It is an output bucket, never a knob — a call that arrives on a
|
|
26406
|
+
* plane nobody instrumented lands here instead of vanishing from the total.
|
|
26407
|
+
*/
|
|
26408
|
+
var TransportPlaneSchema = _enum([
|
|
26409
|
+
"http",
|
|
26410
|
+
"ws",
|
|
26411
|
+
"mesh",
|
|
26412
|
+
"unknown"
|
|
26413
|
+
]);
|
|
26414
|
+
/**
|
|
26415
|
+
* Calls per plane. Every key is always present, `0` included — an absent plane
|
|
26416
|
+
* reads as "not instrumented", which is the one thing this census must never
|
|
26417
|
+
* make an operator wonder about.
|
|
26418
|
+
*/
|
|
26419
|
+
var TransportPlaneCountsSchema = object({
|
|
26420
|
+
http: number(),
|
|
26421
|
+
ws: number(),
|
|
26422
|
+
mesh: number(),
|
|
26423
|
+
unknown: number()
|
|
26424
|
+
});
|
|
26425
|
+
/**
|
|
26426
|
+
* One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
|
|
26211
26427
|
* census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
|
|
26212
26428
|
* `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
|
|
26213
26429
|
* already prints - never a token, never an `Authorization` header.
|
|
26430
|
+
*
|
|
26431
|
+
* `subscriptions` is counted APART from `calls`: a subscription is opened once
|
|
26432
|
+
* and lives for hours, so folding it into a call count makes one long-lived
|
|
26433
|
+
* stream look like a storm.
|
|
26214
26434
|
*/
|
|
26215
26435
|
var RequestCensusGroupSchema = object({
|
|
26436
|
+
plane: TransportPlaneSchema,
|
|
26216
26437
|
procedure: string(),
|
|
26217
26438
|
userAgent: string(),
|
|
26218
26439
|
ip: string(),
|
|
26219
26440
|
principal: string(),
|
|
26220
26441
|
calls: number(),
|
|
26442
|
+
subscriptions: number(),
|
|
26221
26443
|
perMin: number()
|
|
26222
26444
|
});
|
|
26223
26445
|
/**
|
|
@@ -26230,6 +26452,14 @@ var RequestCensusGroupSchema = object({
|
|
|
26230
26452
|
var RequestCensusProcedureSchema = object({
|
|
26231
26453
|
procedure: string(),
|
|
26232
26454
|
calls: number(),
|
|
26455
|
+
/**
|
|
26456
|
+
* The same total, split by transport. THIS is the row that answers the
|
|
26457
|
+
* question the census exists for: one look at `deviceManager.listAll` says
|
|
26458
|
+
* which plane carried the 4 960, without joining two log lines by eye.
|
|
26459
|
+
*/
|
|
26460
|
+
planes: TransportPlaneCountsSchema,
|
|
26461
|
+
/** Subscription STARTS on this procedure. Never folded into `calls`. */
|
|
26462
|
+
subscriptions: number(),
|
|
26233
26463
|
perMin: number()
|
|
26234
26464
|
});
|
|
26235
26465
|
/**
|
|
@@ -26257,14 +26487,45 @@ var RequestCensusStatusSchema = object({
|
|
|
26257
26487
|
*/
|
|
26258
26488
|
procedureCalls: number(),
|
|
26259
26489
|
/**
|
|
26490
|
+
* `procedureCalls` split by transport. The four keys sum to
|
|
26491
|
+
* `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
|
|
26492
|
+
* `planesExplainTotal` is that identity, checked rather than assumed.
|
|
26493
|
+
*/
|
|
26494
|
+
planes: TransportPlaneCountsSchema,
|
|
26495
|
+
/**
|
|
26496
|
+
* True iff `planes` sums to `procedureCalls`. False means a call was counted
|
|
26497
|
+
* on no plane at all - which is a RESULT (a plane is missing from the
|
|
26498
|
+
* instrument), not a failure, and it has to be visible to be read as one.
|
|
26499
|
+
*/
|
|
26500
|
+
planesExplainTotal: boolean(),
|
|
26501
|
+
/**
|
|
26260
26502
|
* tRPC WebSocket connections opened during the window. NOT calls - the WS
|
|
26261
|
-
*
|
|
26262
|
-
*
|
|
26503
|
+
* adapter resolves one context per connection - kept because a plane's call
|
|
26504
|
+
* count of zero against 37 open connections says something different from a
|
|
26505
|
+
* plane with no connections at all.
|
|
26263
26506
|
*/
|
|
26264
26507
|
wsConnections: number(),
|
|
26508
|
+
/**
|
|
26509
|
+
* Client frames the WS plane looked at. `wsMessages` far above
|
|
26510
|
+
* `planes.ws + subscriptions` means most traffic is not operations
|
|
26511
|
+
* (keepalives, connection params) - which is itself an answer.
|
|
26512
|
+
*/
|
|
26513
|
+
wsMessages: number(),
|
|
26514
|
+
/**
|
|
26515
|
+
* Subscription STARTS across every plane, excluded from `procedureCalls` on
|
|
26516
|
+
* purpose: one live-events stream opened at boot and held for six hours is
|
|
26517
|
+
* one subscription, and counting it as a call would let a quiet plane
|
|
26518
|
+
* masquerade as the storm.
|
|
26519
|
+
*/
|
|
26520
|
+
subscriptions: number(),
|
|
26521
|
+
/** `subscription.stop` frames. Starts minus stops is what is still open. */
|
|
26522
|
+
subscriptionStops: number(),
|
|
26265
26523
|
distinctGroups: number(),
|
|
26266
|
-
/**
|
|
26267
|
-
*
|
|
26524
|
+
/**
|
|
26525
|
+
* Operations counted in the totals whose CALLER attribution was shed at the
|
|
26526
|
+
* cardinality bound. Unrelated to the `unknown` PLANE: these calls know
|
|
26527
|
+
* which transport they arrived on, they just lost their group row.
|
|
26528
|
+
*/
|
|
26268
26529
|
unattributedCalls: number(),
|
|
26269
26530
|
procedures: array(RequestCensusProcedureSchema).readonly(),
|
|
26270
26531
|
groups: array(RequestCensusGroupSchema).readonly()
|
|
@@ -26287,10 +26548,11 @@ var DiagnosticIdSchema = _enum(["request-census"]);
|
|
|
26287
26548
|
* The layers of the level hierarchy, general → specific. The most specific
|
|
26288
26549
|
* layer that carries an explicit value wins.
|
|
26289
26550
|
*
|
|
26290
|
-
* `component`
|
|
26291
|
-
*
|
|
26292
|
-
*
|
|
26293
|
-
*
|
|
26551
|
+
* `component` became RESOLVABLE on 2026-08-27: a component is a declared log
|
|
26552
|
+
* CHANNEL (`stream-broker.webrtc`, `provider-reolink.baichuan`), named by
|
|
26553
|
+
* `scopeComponent`. It was declared-but-dark in the first slice precisely so
|
|
26554
|
+
* that turning it on would not force every consumer of this document to widen
|
|
26555
|
+
* a `levelSource` enum — which is what has now not happened.
|
|
26294
26556
|
*/
|
|
26295
26557
|
var LoggingScopeKindSchema = _enum([
|
|
26296
26558
|
"cluster",
|
|
@@ -26317,6 +26579,14 @@ var LoggingLevelLayerSchema = object({
|
|
|
26317
26579
|
scope: LoggingScopeKindSchema,
|
|
26318
26580
|
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
26319
26581
|
nodeId: string().nullable(),
|
|
26582
|
+
/**
|
|
26583
|
+
* The declared channel this layer speaks for; `null` on every layer but
|
|
26584
|
+
* `component`. Never folded into `nodeId`: a component level is CLUSTER-WIDE
|
|
26585
|
+
* by design — the convention this repo settled on is one orchestrator-wide
|
|
26586
|
+
* setting, never per node (D52) — so a component layer that carried a node
|
|
26587
|
+
* would invite a per-node copy of a value that has no per-node meaning.
|
|
26588
|
+
*/
|
|
26589
|
+
component: string().nullable(),
|
|
26320
26590
|
/** Explicitly set here, or `null` when this layer inherits. */
|
|
26321
26591
|
level: LogLevelSchema$1.nullable()
|
|
26322
26592
|
});
|
|
@@ -26358,6 +26628,49 @@ var DiagnosticWindowPatchSchema = object({
|
|
|
26358
26628
|
reportEveryMs: number().int().positive().optional()
|
|
26359
26629
|
});
|
|
26360
26630
|
/**
|
|
26631
|
+
* A channel ARMED, as the document reports it.
|
|
26632
|
+
*
|
|
26633
|
+
* `armMs` is not echoed back: what an operator needs to see is the deadline
|
|
26634
|
+
* and the time left, because a diagnostic left running is itself an incident
|
|
26635
|
+
* and "armed for 10 minutes" said an hour ago is not an answer.
|
|
26636
|
+
*/
|
|
26637
|
+
var LogChannelWindowStateSchema = object({
|
|
26638
|
+
channel: string(),
|
|
26639
|
+
armed: boolean(),
|
|
26640
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
26641
|
+
armedUntilMs: number(),
|
|
26642
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
26643
|
+
remainingMs: number(),
|
|
26644
|
+
/**
|
|
26645
|
+
* The cameras it is narrowed to, or `null` for every camera.
|
|
26646
|
+
*
|
|
26647
|
+
* A channel declared `perDevice: false` can only ever report `null` here:
|
|
26648
|
+
* its lines do not carry `tags: { deviceId }`, so narrowing them would
|
|
26649
|
+
* produce a filter that silently matches nothing. The server REFUSES such a
|
|
26650
|
+
* patch rather than quietly widening it — ignoring the request would teach
|
|
26651
|
+
* the operator that per-camera filtering works on that channel when it does
|
|
26652
|
+
* not.
|
|
26653
|
+
*/
|
|
26654
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
26655
|
+
});
|
|
26656
|
+
/**
|
|
26657
|
+
* `armMs: 0` DISARMS. Same grammar as {@link DiagnosticWindowPatchSchema}, and
|
|
26658
|
+
* for the same reason: a channel is a window with a deadline, never a switch.
|
|
26659
|
+
*/
|
|
26660
|
+
var LogChannelWindowPatchSchema = object({
|
|
26661
|
+
channel: string().min(1),
|
|
26662
|
+
armMs: number().int().min(0),
|
|
26663
|
+
/**
|
|
26664
|
+
* Narrow to these numeric device ids. Absent or `null` = every camera.
|
|
26665
|
+
*
|
|
26666
|
+
* Numeric because the repo's own rule makes it possible: every log line
|
|
26667
|
+
* about a device carries `tags: { deviceId }` with the numeric id. That rule
|
|
26668
|
+
* was paid for with a 22% thumbnail gap and a 3-hour media blackout both
|
|
26669
|
+
* diagnosed by hand, and this is the first thing that collects on it.
|
|
26670
|
+
*/
|
|
26671
|
+
deviceIds: array(number().int()).readonly().nullable().optional()
|
|
26672
|
+
});
|
|
26673
|
+
/**
|
|
26361
26674
|
* A PATCH, and patches MERGE.
|
|
26362
26675
|
*
|
|
26363
26676
|
* A field absent from the patch is left exactly as it was — arming a
|
|
@@ -26376,7 +26689,14 @@ var LoggingSettingsPatchSchema = object({
|
|
|
26376
26689
|
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
26377
26690
|
* keeps running — a patch is never a full replacement.
|
|
26378
26691
|
*/
|
|
26379
|
-
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
26692
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional(),
|
|
26693
|
+
/**
|
|
26694
|
+
* Only the channels NAMED here change. An armed channel that is not listed
|
|
26695
|
+
* keeps running — same rule as `diagnostics`, because a patch that silently
|
|
26696
|
+
* disarmed the channels it did not mention would make the Levels page and
|
|
26697
|
+
* the Diagnostics page fight over the same value.
|
|
26698
|
+
*/
|
|
26699
|
+
channels: array(LogChannelWindowPatchSchema).readonly().optional()
|
|
26380
26700
|
});
|
|
26381
26701
|
/**
|
|
26382
26702
|
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
@@ -26389,9 +26709,22 @@ var LoggingSettingsPatchSchema = object({
|
|
|
26389
26709
|
* authority over the whole hierarchy and answers for every layer, so the
|
|
26390
26710
|
* layer selector needs a name the transport does not already own.
|
|
26391
26711
|
*/
|
|
26392
|
-
var GetLoggingSettingsInputSchema = object({
|
|
26712
|
+
var GetLoggingSettingsInputSchema = object({
|
|
26713
|
+
scopeNodeId: string().optional(),
|
|
26714
|
+
/**
|
|
26715
|
+
* The declared CHANNEL this document is addressed at, when the caller wants
|
|
26716
|
+
* the `component` layer. Absent = the node/cluster hierarchy only.
|
|
26717
|
+
*
|
|
26718
|
+
* Naming it separately rather than overloading `scopeNodeId` keeps the two
|
|
26719
|
+
* axes from collapsing: a component level is cluster-wide, a node level is
|
|
26720
|
+
* not, and one selector for both would make "which of these two did I just
|
|
26721
|
+
* set" unanswerable — the exact ambiguity `explicit` exists to remove.
|
|
26722
|
+
*/
|
|
26723
|
+
scopeComponent: string().optional()
|
|
26724
|
+
});
|
|
26393
26725
|
var SetLoggingSettingsInputSchema = object({
|
|
26394
26726
|
scopeNodeId: string().optional(),
|
|
26727
|
+
scopeComponent: string().optional(),
|
|
26395
26728
|
patch: LoggingSettingsPatchSchema
|
|
26396
26729
|
});
|
|
26397
26730
|
/**
|
|
@@ -26406,9 +26739,20 @@ var SetLoggingSettingsInputSchema = object({
|
|
|
26406
26739
|
var LoggingSettingsStateSchema = object({
|
|
26407
26740
|
/** The layer this document was read at. `null` = the cluster layer. */
|
|
26408
26741
|
scopeNodeId: string().nullable(),
|
|
26742
|
+
/** The channel this document was read at. `null` = no component layer. */
|
|
26743
|
+
scopeComponent: string().nullable(),
|
|
26409
26744
|
effective: LoggingEffectiveSchema,
|
|
26410
26745
|
explicit: LoggingExplicitSchema,
|
|
26411
26746
|
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
26747
|
+
/**
|
|
26748
|
+
* Every channel the cluster's addons DECLARE, gathered from the
|
|
26749
|
+
* `log-channels` providers. Not stored anywhere: assembled per read, so a
|
|
26750
|
+
* channel added by a redeployed addon appears without anybody editing a
|
|
26751
|
+
* list, and a channel whose addon is gone stops being offered.
|
|
26752
|
+
*/
|
|
26753
|
+
channels: array(LogChannelDescriptorSchema).readonly(),
|
|
26754
|
+
/** The channels ARMED right now, each with its deadline. */
|
|
26755
|
+
activeChannels: array(LogChannelWindowStateSchema).readonly(),
|
|
26412
26756
|
persisted: boolean()
|
|
26413
26757
|
});
|
|
26414
26758
|
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(), {
|
|
@@ -27985,6 +28329,12 @@ Object.freeze({
|
|
|
27985
28329
|
addonId: null,
|
|
27986
28330
|
access: "view"
|
|
27987
28331
|
},
|
|
28332
|
+
"dataStoreProvider.aggregate": {
|
|
28333
|
+
capName: "data-store-provider",
|
|
28334
|
+
capScope: "system",
|
|
28335
|
+
addonId: null,
|
|
28336
|
+
access: "view"
|
|
28337
|
+
},
|
|
27988
28338
|
"dataStoreProvider.count": {
|
|
27989
28339
|
capName: "data-store-provider",
|
|
27990
28340
|
capScope: "system",
|
|
@@ -28399,6 +28749,12 @@ Object.freeze({
|
|
|
28399
28749
|
addonId: null,
|
|
28400
28750
|
access: "view"
|
|
28401
28751
|
},
|
|
28752
|
+
"deviceManager.getChildrenBatch": {
|
|
28753
|
+
capName: "device-manager",
|
|
28754
|
+
capScope: "system",
|
|
28755
|
+
addonId: null,
|
|
28756
|
+
access: "view"
|
|
28757
|
+
},
|
|
28402
28758
|
"deviceManager.getConfigSchema": {
|
|
28403
28759
|
capName: "device-manager",
|
|
28404
28760
|
capScope: "system",
|
|
@@ -29449,6 +29805,18 @@ Object.freeze({
|
|
|
29449
29805
|
addonId: null,
|
|
29450
29806
|
access: "create"
|
|
29451
29807
|
},
|
|
29808
|
+
"logChannels.apply": {
|
|
29809
|
+
capName: "log-channels",
|
|
29810
|
+
capScope: "system",
|
|
29811
|
+
addonId: null,
|
|
29812
|
+
access: "create"
|
|
29813
|
+
},
|
|
29814
|
+
"logChannels.list": {
|
|
29815
|
+
capName: "log-channels",
|
|
29816
|
+
capScope: "system",
|
|
29817
|
+
addonId: null,
|
|
29818
|
+
access: "view"
|
|
29819
|
+
},
|
|
29452
29820
|
"logDestination.query": {
|
|
29453
29821
|
capName: "log-destination",
|
|
29454
29822
|
capScope: "system",
|
|
@@ -31603,6 +31971,12 @@ Object.freeze({
|
|
|
31603
31971
|
addonId: null,
|
|
31604
31972
|
access: "create"
|
|
31605
31973
|
},
|
|
31974
|
+
"settingsStore.aggregate": {
|
|
31975
|
+
capName: "settings-store",
|
|
31976
|
+
capScope: "system",
|
|
31977
|
+
addonId: null,
|
|
31978
|
+
access: "view"
|
|
31979
|
+
},
|
|
31606
31980
|
"settingsStore.count": {
|
|
31607
31981
|
capName: "settings-store",
|
|
31608
31982
|
capScope: "system",
|
|
@@ -33182,6 +33556,11 @@ Object.freeze({
|
|
|
33182
33556
|
form: "single",
|
|
33183
33557
|
optional: false
|
|
33184
33558
|
}],
|
|
33559
|
+
"deviceManager.getChildrenBatch": [{
|
|
33560
|
+
name: "parentDeviceIds",
|
|
33561
|
+
form: "array",
|
|
33562
|
+
optional: false
|
|
33563
|
+
}],
|
|
33185
33564
|
"deviceManager.getConfigSchema": [{
|
|
33186
33565
|
name: "deviceId",
|
|
33187
33566
|
form: "single",
|
|
@@ -7485,6 +7485,111 @@ var CameraSwitchGroupSchema = object({
|
|
|
7485
7485
|
fetchedAt: number()
|
|
7486
7486
|
});
|
|
7487
7487
|
/**
|
|
7488
|
+
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
7489
|
+
* an addon declares its channels in.
|
|
7490
|
+
*
|
|
7491
|
+
* ## Two axes, deliberately separated
|
|
7492
|
+
*
|
|
7493
|
+
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
7494
|
+
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
7495
|
+
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
7496
|
+
* and rots silently. So a channel is declared where it is consulted, and the
|
|
7497
|
+
* `log-channels` capability enumerates the declarations.
|
|
7498
|
+
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
7499
|
+
* thing: the logging settings document on the `system` cap. Two authorities
|
|
7500
|
+
* over the values is the exact defect
|
|
7501
|
+
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
7502
|
+
* remove; re-introducing it from the cure side would be grotesque.
|
|
7503
|
+
*
|
|
7504
|
+
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
7505
|
+
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
7506
|
+
* the hot path with a value somebody actually read, and by
|
|
7507
|
+
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
7508
|
+
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
7509
|
+
* disarmed one (D49).
|
|
7510
|
+
*
|
|
7511
|
+
* ## The canonical call shape
|
|
7512
|
+
*
|
|
7513
|
+
* ```ts
|
|
7514
|
+
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
7515
|
+
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
7516
|
+
* }
|
|
7517
|
+
* ```
|
|
7518
|
+
*
|
|
7519
|
+
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
7520
|
+
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
7521
|
+
* object literal is never constructed because it lives inside the branch. It
|
|
7522
|
+
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
7523
|
+
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
7524
|
+
* destination floor (measured at 1.93 ns/call when off).
|
|
7525
|
+
*
|
|
7526
|
+
* ## Why a channel emits at `info`
|
|
7527
|
+
*
|
|
7528
|
+
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
7529
|
+
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
7530
|
+
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
7531
|
+
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
7532
|
+
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
7533
|
+
* emits at the channel's declared level, whose schema floor is `info`.
|
|
7534
|
+
*/
|
|
7535
|
+
/**
|
|
7536
|
+
* The level a channel writes at once armed.
|
|
7537
|
+
*
|
|
7538
|
+
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
7539
|
+
* not leave the process for Loki, and the whole point of arming a channel is
|
|
7540
|
+
* to read it later.
|
|
7541
|
+
*/
|
|
7542
|
+
var LogChannelLevelSchema = _enum([
|
|
7543
|
+
"info",
|
|
7544
|
+
"warn",
|
|
7545
|
+
"error"
|
|
7546
|
+
]);
|
|
7547
|
+
/**
|
|
7548
|
+
* What an addon declares about one channel. No value, no state — a
|
|
7549
|
+
* declaration is inert.
|
|
7550
|
+
*/
|
|
7551
|
+
var LogChannelDescriptorSchema = object({
|
|
7552
|
+
/**
|
|
7553
|
+
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
7554
|
+
* the addon's short name so an operator reading a channel list can tell who
|
|
7555
|
+
* owns it without a second lookup.
|
|
7556
|
+
*/
|
|
7557
|
+
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
7558
|
+
/** One sentence: what the operator will SEE after arming it. */
|
|
7559
|
+
description: string().min(1),
|
|
7560
|
+
/** The level its lines are emitted at. Never below `info`. */
|
|
7561
|
+
defaultLevel: LogChannelLevelSchema,
|
|
7562
|
+
/**
|
|
7563
|
+
* Whether this channel can be narrowed to a camera.
|
|
7564
|
+
*
|
|
7565
|
+
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
7566
|
+
* consulted with the numeric device id, AND every line the channel admits
|
|
7567
|
+
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
7568
|
+
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
7569
|
+
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
7570
|
+
* the body is the only way to filter.
|
|
7571
|
+
*
|
|
7572
|
+
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
7573
|
+
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
7574
|
+
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
7575
|
+
* path was never taken.
|
|
7576
|
+
*/
|
|
7577
|
+
perDevice: boolean()
|
|
7578
|
+
});
|
|
7579
|
+
/**
|
|
7580
|
+
* An armed window over one channel, as the document hands it to a mirror.
|
|
7581
|
+
*
|
|
7582
|
+
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
7583
|
+
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
7584
|
+
*/
|
|
7585
|
+
var LogChannelWindowSchema = object({
|
|
7586
|
+
channel: string().min(1),
|
|
7587
|
+
/** Epoch ms the window closes at. */
|
|
7588
|
+
armedUntilMs: number(),
|
|
7589
|
+
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
7590
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
7591
|
+
});
|
|
7592
|
+
/**
|
|
7488
7593
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
7489
7594
|
* recordings and events management surfaces.
|
|
7490
7595
|
*
|
|
@@ -11003,6 +11108,35 @@ var MutationFilterSchema = object({
|
|
|
11003
11108
|
whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
|
|
11004
11109
|
whereNot: record(string(), unknown()).optional()
|
|
11005
11110
|
});
|
|
11111
|
+
/**
|
|
11112
|
+
* One scalar an {@link settingsStoreCapability.methods.aggregate} call asks for.
|
|
11113
|
+
*
|
|
11114
|
+
* `as` names the slot in the result, so the SAME column may be asked twice with
|
|
11115
|
+
* two operations (`MIN(startMs)` and `MAX(startMs)` in one round trip) — which
|
|
11116
|
+
* a `Record<column, op>` shape could not express.
|
|
11117
|
+
*/
|
|
11118
|
+
var AggregateFieldSchema = object({
|
|
11119
|
+
/** Result key. */
|
|
11120
|
+
as: string().min(1),
|
|
11121
|
+
/** Column to aggregate. Must be a real column of a declared collection. */
|
|
11122
|
+
field: string().min(1),
|
|
11123
|
+
op: _enum([
|
|
11124
|
+
"sum",
|
|
11125
|
+
"min",
|
|
11126
|
+
"max"
|
|
11127
|
+
])
|
|
11128
|
+
});
|
|
11129
|
+
/**
|
|
11130
|
+
* `COUNT(*)` plus one number per requested field.
|
|
11131
|
+
*
|
|
11132
|
+
* `null` means NO ROW MATCHED, never zero: a `SUM` over an empty set and a sum
|
|
11133
|
+
* that really is 0 are different facts, and an accounting caller that renders
|
|
11134
|
+
* "0 bytes, oldest = 0" for "nothing here" reports a lie about a disk.
|
|
11135
|
+
*/
|
|
11136
|
+
var AggregateResultSchema = object({
|
|
11137
|
+
count: number().int(),
|
|
11138
|
+
values: record(string(), number().nullable())
|
|
11139
|
+
});
|
|
11006
11140
|
/** A single stored record: `{ id, data }`. */
|
|
11007
11141
|
var SettingsRecordSchema = object({
|
|
11008
11142
|
id: string(),
|
|
@@ -11087,6 +11221,11 @@ method(object({
|
|
|
11087
11221
|
collection: string(),
|
|
11088
11222
|
filter: QueryFilterSchema.optional()
|
|
11089
11223
|
}), number()), method(object({
|
|
11224
|
+
namespace: string().optional(),
|
|
11225
|
+
collection: string(),
|
|
11226
|
+
fields: array(AggregateFieldSchema).readonly(),
|
|
11227
|
+
filter: QueryFilterSchema.optional()
|
|
11228
|
+
}), AggregateResultSchema), method(object({
|
|
11090
11229
|
namespace: string().optional(),
|
|
11091
11230
|
collection: string(),
|
|
11092
11231
|
field: string(),
|
|
@@ -11203,6 +11342,11 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
|
|
|
11203
11342
|
collection: string(),
|
|
11204
11343
|
filter: QueryFilterSchema.optional()
|
|
11205
11344
|
}), number(), { auth: "admin" }), method(object({
|
|
11345
|
+
namespace: string().optional(),
|
|
11346
|
+
collection: string(),
|
|
11347
|
+
fields: array(AggregateFieldSchema).readonly(),
|
|
11348
|
+
filter: QueryFilterSchema.optional()
|
|
11349
|
+
}), AggregateResultSchema, { auth: "admin" }), method(object({
|
|
11206
11350
|
namespace: string().optional(),
|
|
11207
11351
|
collection: string(),
|
|
11208
11352
|
field: string(),
|
|
@@ -11764,24 +11908,6 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
|
|
|
11764
11908
|
kind: "mutation",
|
|
11765
11909
|
auth: "admin"
|
|
11766
11910
|
});
|
|
11767
|
-
/**
|
|
11768
|
-
* Device Manager capability — hub-side singleton that unifies device persistence,
|
|
11769
|
-
* live registry access, and all management operations into a single tRPC surface.
|
|
11770
|
-
*
|
|
11771
|
-
* Replaces:
|
|
11772
|
-
* - `device-persistence` capability (persistence methods absorbed here)
|
|
11773
|
-
* - `device-management.router.ts` (deleted in Phase 2)
|
|
11774
|
-
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
11775
|
-
*
|
|
11776
|
-
* All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
|
|
11777
|
-
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
11778
|
-
* - No nodeId routing needed — this is a pure hub singleton.
|
|
11779
|
-
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
11780
|
-
* - No shadow registry or cross-node aggregation required.
|
|
11781
|
-
*
|
|
11782
|
-
* Forked workers register devices back to the hub via `ctx.devices`
|
|
11783
|
-
* (DeviceManagerApi → ctx.api.deviceManager.registerDevice), same as today.
|
|
11784
|
-
*/
|
|
11785
11911
|
/** One child-placement directive on a container's `childLayout`. Structurally
|
|
11786
11912
|
* identical to `ChildLayoutEntry` in `device-management.ts` — the cap wire
|
|
11787
11913
|
* shape for the same field. The child is identified by its re-sync-stable
|
|
@@ -12150,7 +12276,7 @@ method(object({
|
|
|
12150
12276
|
* it answers today and the caller filters as it already does.
|
|
12151
12277
|
*/
|
|
12152
12278
|
deviceIds: array(number()).optional()
|
|
12153
|
-
}), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), object({
|
|
12279
|
+
}), 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({
|
|
12154
12280
|
mode: LinkedDevicesModeSchema,
|
|
12155
12281
|
devices: array(LinkedDeviceSchema)
|
|
12156
12282
|
})), 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({
|
|
@@ -12874,6 +13000,59 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
12874
13000
|
kind: "mutation",
|
|
12875
13001
|
auth: "admin"
|
|
12876
13002
|
});
|
|
13003
|
+
/**
|
|
13004
|
+
* `log-channels` — the capability an addon DECLARES its diagnostic channels
|
|
13005
|
+
* through. It stores nothing.
|
|
13006
|
+
*
|
|
13007
|
+
* ## Why a capability at all, and why this shape
|
|
13008
|
+
*
|
|
13009
|
+
* Which channels exist is knowledge only the addon has: `stream-broker` knows
|
|
13010
|
+
* webrtc/ICE/RTP, `provider-reolink` knows baichuan/handshake. A central list
|
|
13011
|
+
* maintained by hand rots at the first addition and rots INVISIBLY — nothing
|
|
13012
|
+
* fails, an operator just never sees the channel somebody added. So the list
|
|
13013
|
+
* is assembled from declarations at runtime.
|
|
13014
|
+
*
|
|
13015
|
+
* The shape is copied from `log-destination.cap.ts`, which already does
|
|
13016
|
+
* exactly this job: `mode: 'collection'`, `internal: true`,
|
|
13017
|
+
* `mount: { kind: 'skip' }` — no tRPC route, no generated hooks — while
|
|
13018
|
+
* `addons.listCapabilityProviders` still enumerates it, and the hub's
|
|
13019
|
+
* `CapabilityRegistry` still holds an RPC proxy per provider so a forked
|
|
13020
|
+
* runner's declarations reach hub-main over the transport that already exists.
|
|
13021
|
+
* No new UDS message, no second registry.
|
|
13022
|
+
*
|
|
13023
|
+
* ## What it deliberately does NOT own
|
|
13024
|
+
*
|
|
13025
|
+
* The VALUES — which channel is armed, for which cameras, until when — live in
|
|
13026
|
+
* ONE place: the logging settings document on the `system` cap
|
|
13027
|
+
* (`getLoggingSettings` / `setLoggingSettings`). Two authorities over the same
|
|
13028
|
+
* value is the defect the plan behind this work exists to remove, and
|
|
13029
|
+
* `setRequestCensus` was retired (D245) rather than allowed to be a second
|
|
13030
|
+
* one. {@link logChannelsCapability} therefore has no getter for a level, no
|
|
13031
|
+
* setter for a window and no persistence of any kind.
|
|
13032
|
+
*
|
|
13033
|
+
* ## Why `apply` is here even so
|
|
13034
|
+
*
|
|
13035
|
+
* The gate lives in the addon's PROCESS; the document lives in hub-main. Some
|
|
13036
|
+
* seam has to carry the value from the authority to the mirror, and a channel
|
|
13037
|
+
* that cannot be reached is precisely the dead knob this whole slice exists to
|
|
13038
|
+
* make impossible (D62 — `audioThresholdDbfs`, the HA entities with no source).
|
|
13039
|
+
* `apply` is that seam and nothing more: it writes an in-memory mirror, it
|
|
13040
|
+
* persists nothing, it is never the source of a value, and it is called only
|
|
13041
|
+
* with a set the hub actually read (D49 — a read that fails does not call it
|
|
13042
|
+
* at all, so no channel is silently disarmed by a bad read).
|
|
13043
|
+
*/
|
|
13044
|
+
/** What `apply` reports back — enough to log, not enough to be a second state. */
|
|
13045
|
+
var LogChannelApplyResultSchema = object({
|
|
13046
|
+
/** How many declared channels are armed in this process after the call. */
|
|
13047
|
+
armed: number().int().min(0),
|
|
13048
|
+
/**
|
|
13049
|
+
* Names the document armed that this process does not declare. Reported
|
|
13050
|
+
* rather than swallowed: a name here is either a typo or an addon that has
|
|
13051
|
+
* not booted, and both deserve a line instead of silence.
|
|
13052
|
+
*/
|
|
13053
|
+
unknown: array(string()).readonly()
|
|
13054
|
+
});
|
|
13055
|
+
method(_void(), array(LogChannelDescriptorSchema).readonly()), method(object({ windows: array(LogChannelWindowSchema).readonly() }), LogChannelApplyResultSchema, { kind: "mutation" });
|
|
12877
13056
|
var LogLevelSchema = _enum([
|
|
12878
13057
|
"debug",
|
|
12879
13058
|
"info",
|
|
@@ -26207,17 +26386,60 @@ var SetSiteLocationInputSchema = object({
|
|
|
26207
26386
|
longitude: number().min(-180).max(180)
|
|
26208
26387
|
}).nullable();
|
|
26209
26388
|
/**
|
|
26210
|
-
*
|
|
26389
|
+
* The TRANSPORT a call arrived on.
|
|
26390
|
+
*
|
|
26391
|
+
* Every counted call carries exactly one of these, and `unknown` is a PLANE
|
|
26392
|
+
* rather than a gap: a plane that cannot attribute a call declares it here, so
|
|
26393
|
+
* the call lands in a named bucket instead of vanishing. `planes` summing to
|
|
26394
|
+
* `procedureCalls` is what makes "the sum of the planes explains the total"
|
|
26395
|
+
* checkable rather than asserted.
|
|
26396
|
+
*
|
|
26397
|
+
* - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
|
|
26398
|
+
* - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
|
|
26399
|
+
* connection; the viewer talks to the hub over `wsLink`
|
|
26400
|
+
* exclusively, so this is the plane the HTTP census could not see.
|
|
26401
|
+
* - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
|
|
26402
|
+
* never touches a socket and therefore never touched a census.
|
|
26403
|
+
* - `unknown` — counted, plane undecidable. No hook produces it today, and
|
|
26404
|
+
* that is exactly what its `0` asserts: every plane the hub has can name
|
|
26405
|
+
* itself. It is an output bucket, never a knob — a call that arrives on a
|
|
26406
|
+
* plane nobody instrumented lands here instead of vanishing from the total.
|
|
26407
|
+
*/
|
|
26408
|
+
var TransportPlaneSchema = _enum([
|
|
26409
|
+
"http",
|
|
26410
|
+
"ws",
|
|
26411
|
+
"mesh",
|
|
26412
|
+
"unknown"
|
|
26413
|
+
]);
|
|
26414
|
+
/**
|
|
26415
|
+
* Calls per plane. Every key is always present, `0` included — an absent plane
|
|
26416
|
+
* reads as "not instrumented", which is the one thing this census must never
|
|
26417
|
+
* make an operator wonder about.
|
|
26418
|
+
*/
|
|
26419
|
+
var TransportPlaneCountsSchema = object({
|
|
26420
|
+
http: number(),
|
|
26421
|
+
ws: number(),
|
|
26422
|
+
mesh: number(),
|
|
26423
|
+
unknown: number()
|
|
26424
|
+
});
|
|
26425
|
+
/**
|
|
26426
|
+
* One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
|
|
26211
26427
|
* census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
|
|
26212
26428
|
* `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
|
|
26213
26429
|
* already prints - never a token, never an `Authorization` header.
|
|
26430
|
+
*
|
|
26431
|
+
* `subscriptions` is counted APART from `calls`: a subscription is opened once
|
|
26432
|
+
* and lives for hours, so folding it into a call count makes one long-lived
|
|
26433
|
+
* stream look like a storm.
|
|
26214
26434
|
*/
|
|
26215
26435
|
var RequestCensusGroupSchema = object({
|
|
26436
|
+
plane: TransportPlaneSchema,
|
|
26216
26437
|
procedure: string(),
|
|
26217
26438
|
userAgent: string(),
|
|
26218
26439
|
ip: string(),
|
|
26219
26440
|
principal: string(),
|
|
26220
26441
|
calls: number(),
|
|
26442
|
+
subscriptions: number(),
|
|
26221
26443
|
perMin: number()
|
|
26222
26444
|
});
|
|
26223
26445
|
/**
|
|
@@ -26230,6 +26452,14 @@ var RequestCensusGroupSchema = object({
|
|
|
26230
26452
|
var RequestCensusProcedureSchema = object({
|
|
26231
26453
|
procedure: string(),
|
|
26232
26454
|
calls: number(),
|
|
26455
|
+
/**
|
|
26456
|
+
* The same total, split by transport. THIS is the row that answers the
|
|
26457
|
+
* question the census exists for: one look at `deviceManager.listAll` says
|
|
26458
|
+
* which plane carried the 4 960, without joining two log lines by eye.
|
|
26459
|
+
*/
|
|
26460
|
+
planes: TransportPlaneCountsSchema,
|
|
26461
|
+
/** Subscription STARTS on this procedure. Never folded into `calls`. */
|
|
26462
|
+
subscriptions: number(),
|
|
26233
26463
|
perMin: number()
|
|
26234
26464
|
});
|
|
26235
26465
|
/**
|
|
@@ -26257,14 +26487,45 @@ var RequestCensusStatusSchema = object({
|
|
|
26257
26487
|
*/
|
|
26258
26488
|
procedureCalls: number(),
|
|
26259
26489
|
/**
|
|
26490
|
+
* `procedureCalls` split by transport. The four keys sum to
|
|
26491
|
+
* `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
|
|
26492
|
+
* `planesExplainTotal` is that identity, checked rather than assumed.
|
|
26493
|
+
*/
|
|
26494
|
+
planes: TransportPlaneCountsSchema,
|
|
26495
|
+
/**
|
|
26496
|
+
* True iff `planes` sums to `procedureCalls`. False means a call was counted
|
|
26497
|
+
* on no plane at all - which is a RESULT (a plane is missing from the
|
|
26498
|
+
* instrument), not a failure, and it has to be visible to be read as one.
|
|
26499
|
+
*/
|
|
26500
|
+
planesExplainTotal: boolean(),
|
|
26501
|
+
/**
|
|
26260
26502
|
* tRPC WebSocket connections opened during the window. NOT calls - the WS
|
|
26261
|
-
*
|
|
26262
|
-
*
|
|
26503
|
+
* adapter resolves one context per connection - kept because a plane's call
|
|
26504
|
+
* count of zero against 37 open connections says something different from a
|
|
26505
|
+
* plane with no connections at all.
|
|
26263
26506
|
*/
|
|
26264
26507
|
wsConnections: number(),
|
|
26508
|
+
/**
|
|
26509
|
+
* Client frames the WS plane looked at. `wsMessages` far above
|
|
26510
|
+
* `planes.ws + subscriptions` means most traffic is not operations
|
|
26511
|
+
* (keepalives, connection params) - which is itself an answer.
|
|
26512
|
+
*/
|
|
26513
|
+
wsMessages: number(),
|
|
26514
|
+
/**
|
|
26515
|
+
* Subscription STARTS across every plane, excluded from `procedureCalls` on
|
|
26516
|
+
* purpose: one live-events stream opened at boot and held for six hours is
|
|
26517
|
+
* one subscription, and counting it as a call would let a quiet plane
|
|
26518
|
+
* masquerade as the storm.
|
|
26519
|
+
*/
|
|
26520
|
+
subscriptions: number(),
|
|
26521
|
+
/** `subscription.stop` frames. Starts minus stops is what is still open. */
|
|
26522
|
+
subscriptionStops: number(),
|
|
26265
26523
|
distinctGroups: number(),
|
|
26266
|
-
/**
|
|
26267
|
-
*
|
|
26524
|
+
/**
|
|
26525
|
+
* Operations counted in the totals whose CALLER attribution was shed at the
|
|
26526
|
+
* cardinality bound. Unrelated to the `unknown` PLANE: these calls know
|
|
26527
|
+
* which transport they arrived on, they just lost their group row.
|
|
26528
|
+
*/
|
|
26268
26529
|
unattributedCalls: number(),
|
|
26269
26530
|
procedures: array(RequestCensusProcedureSchema).readonly(),
|
|
26270
26531
|
groups: array(RequestCensusGroupSchema).readonly()
|
|
@@ -26287,10 +26548,11 @@ var DiagnosticIdSchema = _enum(["request-census"]);
|
|
|
26287
26548
|
* The layers of the level hierarchy, general → specific. The most specific
|
|
26288
26549
|
* layer that carries an explicit value wins.
|
|
26289
26550
|
*
|
|
26290
|
-
* `component`
|
|
26291
|
-
*
|
|
26292
|
-
*
|
|
26293
|
-
*
|
|
26551
|
+
* `component` became RESOLVABLE on 2026-08-27: a component is a declared log
|
|
26552
|
+
* CHANNEL (`stream-broker.webrtc`, `provider-reolink.baichuan`), named by
|
|
26553
|
+
* `scopeComponent`. It was declared-but-dark in the first slice precisely so
|
|
26554
|
+
* that turning it on would not force every consumer of this document to widen
|
|
26555
|
+
* a `levelSource` enum — which is what has now not happened.
|
|
26294
26556
|
*/
|
|
26295
26557
|
var LoggingScopeKindSchema = _enum([
|
|
26296
26558
|
"cluster",
|
|
@@ -26317,6 +26579,14 @@ var LoggingLevelLayerSchema = object({
|
|
|
26317
26579
|
scope: LoggingScopeKindSchema,
|
|
26318
26580
|
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
26319
26581
|
nodeId: string().nullable(),
|
|
26582
|
+
/**
|
|
26583
|
+
* The declared channel this layer speaks for; `null` on every layer but
|
|
26584
|
+
* `component`. Never folded into `nodeId`: a component level is CLUSTER-WIDE
|
|
26585
|
+
* by design — the convention this repo settled on is one orchestrator-wide
|
|
26586
|
+
* setting, never per node (D52) — so a component layer that carried a node
|
|
26587
|
+
* would invite a per-node copy of a value that has no per-node meaning.
|
|
26588
|
+
*/
|
|
26589
|
+
component: string().nullable(),
|
|
26320
26590
|
/** Explicitly set here, or `null` when this layer inherits. */
|
|
26321
26591
|
level: LogLevelSchema$1.nullable()
|
|
26322
26592
|
});
|
|
@@ -26358,6 +26628,49 @@ var DiagnosticWindowPatchSchema = object({
|
|
|
26358
26628
|
reportEveryMs: number().int().positive().optional()
|
|
26359
26629
|
});
|
|
26360
26630
|
/**
|
|
26631
|
+
* A channel ARMED, as the document reports it.
|
|
26632
|
+
*
|
|
26633
|
+
* `armMs` is not echoed back: what an operator needs to see is the deadline
|
|
26634
|
+
* and the time left, because a diagnostic left running is itself an incident
|
|
26635
|
+
* and "armed for 10 minutes" said an hour ago is not an answer.
|
|
26636
|
+
*/
|
|
26637
|
+
var LogChannelWindowStateSchema = object({
|
|
26638
|
+
channel: string(),
|
|
26639
|
+
armed: boolean(),
|
|
26640
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
26641
|
+
armedUntilMs: number(),
|
|
26642
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
26643
|
+
remainingMs: number(),
|
|
26644
|
+
/**
|
|
26645
|
+
* The cameras it is narrowed to, or `null` for every camera.
|
|
26646
|
+
*
|
|
26647
|
+
* A channel declared `perDevice: false` can only ever report `null` here:
|
|
26648
|
+
* its lines do not carry `tags: { deviceId }`, so narrowing them would
|
|
26649
|
+
* produce a filter that silently matches nothing. The server REFUSES such a
|
|
26650
|
+
* patch rather than quietly widening it — ignoring the request would teach
|
|
26651
|
+
* the operator that per-camera filtering works on that channel when it does
|
|
26652
|
+
* not.
|
|
26653
|
+
*/
|
|
26654
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
26655
|
+
});
|
|
26656
|
+
/**
|
|
26657
|
+
* `armMs: 0` DISARMS. Same grammar as {@link DiagnosticWindowPatchSchema}, and
|
|
26658
|
+
* for the same reason: a channel is a window with a deadline, never a switch.
|
|
26659
|
+
*/
|
|
26660
|
+
var LogChannelWindowPatchSchema = object({
|
|
26661
|
+
channel: string().min(1),
|
|
26662
|
+
armMs: number().int().min(0),
|
|
26663
|
+
/**
|
|
26664
|
+
* Narrow to these numeric device ids. Absent or `null` = every camera.
|
|
26665
|
+
*
|
|
26666
|
+
* Numeric because the repo's own rule makes it possible: every log line
|
|
26667
|
+
* about a device carries `tags: { deviceId }` with the numeric id. That rule
|
|
26668
|
+
* was paid for with a 22% thumbnail gap and a 3-hour media blackout both
|
|
26669
|
+
* diagnosed by hand, and this is the first thing that collects on it.
|
|
26670
|
+
*/
|
|
26671
|
+
deviceIds: array(number().int()).readonly().nullable().optional()
|
|
26672
|
+
});
|
|
26673
|
+
/**
|
|
26361
26674
|
* A PATCH, and patches MERGE.
|
|
26362
26675
|
*
|
|
26363
26676
|
* A field absent from the patch is left exactly as it was — arming a
|
|
@@ -26376,7 +26689,14 @@ var LoggingSettingsPatchSchema = object({
|
|
|
26376
26689
|
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
26377
26690
|
* keeps running — a patch is never a full replacement.
|
|
26378
26691
|
*/
|
|
26379
|
-
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
26692
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional(),
|
|
26693
|
+
/**
|
|
26694
|
+
* Only the channels NAMED here change. An armed channel that is not listed
|
|
26695
|
+
* keeps running — same rule as `diagnostics`, because a patch that silently
|
|
26696
|
+
* disarmed the channels it did not mention would make the Levels page and
|
|
26697
|
+
* the Diagnostics page fight over the same value.
|
|
26698
|
+
*/
|
|
26699
|
+
channels: array(LogChannelWindowPatchSchema).readonly().optional()
|
|
26380
26700
|
});
|
|
26381
26701
|
/**
|
|
26382
26702
|
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
@@ -26389,9 +26709,22 @@ var LoggingSettingsPatchSchema = object({
|
|
|
26389
26709
|
* authority over the whole hierarchy and answers for every layer, so the
|
|
26390
26710
|
* layer selector needs a name the transport does not already own.
|
|
26391
26711
|
*/
|
|
26392
|
-
var GetLoggingSettingsInputSchema = object({
|
|
26712
|
+
var GetLoggingSettingsInputSchema = object({
|
|
26713
|
+
scopeNodeId: string().optional(),
|
|
26714
|
+
/**
|
|
26715
|
+
* The declared CHANNEL this document is addressed at, when the caller wants
|
|
26716
|
+
* the `component` layer. Absent = the node/cluster hierarchy only.
|
|
26717
|
+
*
|
|
26718
|
+
* Naming it separately rather than overloading `scopeNodeId` keeps the two
|
|
26719
|
+
* axes from collapsing: a component level is cluster-wide, a node level is
|
|
26720
|
+
* not, and one selector for both would make "which of these two did I just
|
|
26721
|
+
* set" unanswerable — the exact ambiguity `explicit` exists to remove.
|
|
26722
|
+
*/
|
|
26723
|
+
scopeComponent: string().optional()
|
|
26724
|
+
});
|
|
26393
26725
|
var SetLoggingSettingsInputSchema = object({
|
|
26394
26726
|
scopeNodeId: string().optional(),
|
|
26727
|
+
scopeComponent: string().optional(),
|
|
26395
26728
|
patch: LoggingSettingsPatchSchema
|
|
26396
26729
|
});
|
|
26397
26730
|
/**
|
|
@@ -26406,9 +26739,20 @@ var SetLoggingSettingsInputSchema = object({
|
|
|
26406
26739
|
var LoggingSettingsStateSchema = object({
|
|
26407
26740
|
/** The layer this document was read at. `null` = the cluster layer. */
|
|
26408
26741
|
scopeNodeId: string().nullable(),
|
|
26742
|
+
/** The channel this document was read at. `null` = no component layer. */
|
|
26743
|
+
scopeComponent: string().nullable(),
|
|
26409
26744
|
effective: LoggingEffectiveSchema,
|
|
26410
26745
|
explicit: LoggingExplicitSchema,
|
|
26411
26746
|
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
26747
|
+
/**
|
|
26748
|
+
* Every channel the cluster's addons DECLARE, gathered from the
|
|
26749
|
+
* `log-channels` providers. Not stored anywhere: assembled per read, so a
|
|
26750
|
+
* channel added by a redeployed addon appears without anybody editing a
|
|
26751
|
+
* list, and a channel whose addon is gone stops being offered.
|
|
26752
|
+
*/
|
|
26753
|
+
channels: array(LogChannelDescriptorSchema).readonly(),
|
|
26754
|
+
/** The channels ARMED right now, each with its deadline. */
|
|
26755
|
+
activeChannels: array(LogChannelWindowStateSchema).readonly(),
|
|
26412
26756
|
persisted: boolean()
|
|
26413
26757
|
});
|
|
26414
26758
|
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(), {
|
|
@@ -27985,6 +28329,12 @@ Object.freeze({
|
|
|
27985
28329
|
addonId: null,
|
|
27986
28330
|
access: "view"
|
|
27987
28331
|
},
|
|
28332
|
+
"dataStoreProvider.aggregate": {
|
|
28333
|
+
capName: "data-store-provider",
|
|
28334
|
+
capScope: "system",
|
|
28335
|
+
addonId: null,
|
|
28336
|
+
access: "view"
|
|
28337
|
+
},
|
|
27988
28338
|
"dataStoreProvider.count": {
|
|
27989
28339
|
capName: "data-store-provider",
|
|
27990
28340
|
capScope: "system",
|
|
@@ -28399,6 +28749,12 @@ Object.freeze({
|
|
|
28399
28749
|
addonId: null,
|
|
28400
28750
|
access: "view"
|
|
28401
28751
|
},
|
|
28752
|
+
"deviceManager.getChildrenBatch": {
|
|
28753
|
+
capName: "device-manager",
|
|
28754
|
+
capScope: "system",
|
|
28755
|
+
addonId: null,
|
|
28756
|
+
access: "view"
|
|
28757
|
+
},
|
|
28402
28758
|
"deviceManager.getConfigSchema": {
|
|
28403
28759
|
capName: "device-manager",
|
|
28404
28760
|
capScope: "system",
|
|
@@ -29449,6 +29805,18 @@ Object.freeze({
|
|
|
29449
29805
|
addonId: null,
|
|
29450
29806
|
access: "create"
|
|
29451
29807
|
},
|
|
29808
|
+
"logChannels.apply": {
|
|
29809
|
+
capName: "log-channels",
|
|
29810
|
+
capScope: "system",
|
|
29811
|
+
addonId: null,
|
|
29812
|
+
access: "create"
|
|
29813
|
+
},
|
|
29814
|
+
"logChannels.list": {
|
|
29815
|
+
capName: "log-channels",
|
|
29816
|
+
capScope: "system",
|
|
29817
|
+
addonId: null,
|
|
29818
|
+
access: "view"
|
|
29819
|
+
},
|
|
29452
29820
|
"logDestination.query": {
|
|
29453
29821
|
capName: "log-destination",
|
|
29454
29822
|
capScope: "system",
|
|
@@ -31603,6 +31971,12 @@ Object.freeze({
|
|
|
31603
31971
|
addonId: null,
|
|
31604
31972
|
access: "create"
|
|
31605
31973
|
},
|
|
31974
|
+
"settingsStore.aggregate": {
|
|
31975
|
+
capName: "settings-store",
|
|
31976
|
+
capScope: "system",
|
|
31977
|
+
addonId: null,
|
|
31978
|
+
access: "view"
|
|
31979
|
+
},
|
|
31606
31980
|
"settingsStore.count": {
|
|
31607
31981
|
capName: "settings-store",
|
|
31608
31982
|
capScope: "system",
|
|
@@ -33182,6 +33556,11 @@ Object.freeze({
|
|
|
33182
33556
|
form: "single",
|
|
33183
33557
|
optional: false
|
|
33184
33558
|
}],
|
|
33559
|
+
"deviceManager.getChildrenBatch": [{
|
|
33560
|
+
name: "parentDeviceIds",
|
|
33561
|
+
form: "array",
|
|
33562
|
+
optional: false
|
|
33563
|
+
}],
|
|
33185
33564
|
"deviceManager.getConfigSchema": [{
|
|
33186
33565
|
name: "deviceId",
|
|
33187
33566
|
form: "single",
|
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_dist = require("../dist-
|
|
5
|
+
const require_dist = require("../dist-KZM_ozLM.js");
|
|
6
6
|
let node_crypto = require("node:crypto");
|
|
7
7
|
let node_child_process = require("node:child_process");
|
|
8
8
|
//#region src/ingress/tailscale-cli.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as EventCategory, i as BaseAddon, n as networkAccessCapability } from "../dist-
|
|
1
|
+
import { a as EventCategory, i as BaseAddon, n as networkAccessCapability } from "../dist-CGnxfaPe.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { execFile } from "node:child_process";
|
|
4
4
|
import { promisify } from "node:util";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-tailscale",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.34",
|
|
4
4
|
"description": "Tailscale bundle for CamStack — joins the host to a tailnet (client) and exposes the hub via Serve/Funnel (ingress). Multi-entry npm package shipping 2 addons under a single bundle.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|