@camstack/addon-remote-storage 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/s3.addon.js +1 -1
- package/dist/s3.addon.mjs +1 -1
- package/dist/sftp.addon.js +1 -1
- package/dist/sftp.addon.mjs +1 -1
- package/dist/{shared-DAXIRHbO.js → shared-BkgFJ2q-.js} +322 -25
- package/dist/{shared-DQd7nvIG.mjs → shared-JInb-Tpq.mjs} +322 -25
- package/dist/webdav.addon.js +1 -1
- package/dist/webdav.addon.mjs +1 -1
- package/package.json +1 -1
package/dist/s3.addon.js
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_shared = require("./shared-
|
|
5
|
+
const require_shared = require("./shared-BkgFJ2q-.js");
|
|
6
6
|
let node_stream = require("node:stream");
|
|
7
7
|
let _aws_sdk_client_s3 = require("@aws-sdk/client-s3");
|
|
8
8
|
let _aws_sdk_lib_storage = require("@aws-sdk/lib-storage");
|
package/dist/s3.addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as BaseAddon, i as rearmIdleAbort, n as getOptionalBasePath, o as scheduleIdleAbort, s as storageProviderCapability, t as createSessionId } from "./shared-
|
|
1
|
+
import { c as BaseAddon, i as rearmIdleAbort, n as getOptionalBasePath, o as scheduleIdleAbort, s as storageProviderCapability, t as createSessionId } from "./shared-JInb-Tpq.mjs";
|
|
2
2
|
import { PassThrough } from "node:stream";
|
|
3
3
|
import { DeleteObjectCommand, GetObjectCommand, HeadBucketCommand, HeadObjectCommand, ListObjectsV2Command, PutObjectCommand, S3Client } from "@aws-sdk/client-s3";
|
|
4
4
|
import { Upload } from "@aws-sdk/lib-storage";
|
package/dist/sftp.addon.js
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_shared = require("./shared-
|
|
5
|
+
const require_shared = require("./shared-BkgFJ2q-.js");
|
|
6
6
|
let ssh2 = require("ssh2");
|
|
7
7
|
let node_path = require("node:path");
|
|
8
8
|
node_path = require_shared.__toESM(node_path);
|
package/dist/sftp.addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-
|
|
1
|
+
import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-JInb-Tpq.mjs";
|
|
2
2
|
import { Client } from "ssh2";
|
|
3
3
|
import * as path from "node:path";
|
|
4
4
|
//#region src/providers/sftp/sftp-config-schema.ts
|
|
@@ -7476,6 +7476,111 @@ var CameraSwitchGroupSchema = object({
|
|
|
7476
7476
|
fetchedAt: number()
|
|
7477
7477
|
});
|
|
7478
7478
|
/**
|
|
7479
|
+
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
7480
|
+
* an addon declares its channels in.
|
|
7481
|
+
*
|
|
7482
|
+
* ## Two axes, deliberately separated
|
|
7483
|
+
*
|
|
7484
|
+
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
7485
|
+
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
7486
|
+
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
7487
|
+
* and rots silently. So a channel is declared where it is consulted, and the
|
|
7488
|
+
* `log-channels` capability enumerates the declarations.
|
|
7489
|
+
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
7490
|
+
* thing: the logging settings document on the `system` cap. Two authorities
|
|
7491
|
+
* over the values is the exact defect
|
|
7492
|
+
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
7493
|
+
* remove; re-introducing it from the cure side would be grotesque.
|
|
7494
|
+
*
|
|
7495
|
+
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
7496
|
+
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
7497
|
+
* the hot path with a value somebody actually read, and by
|
|
7498
|
+
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
7499
|
+
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
7500
|
+
* disarmed one (D49).
|
|
7501
|
+
*
|
|
7502
|
+
* ## The canonical call shape
|
|
7503
|
+
*
|
|
7504
|
+
* ```ts
|
|
7505
|
+
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
7506
|
+
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
7507
|
+
* }
|
|
7508
|
+
* ```
|
|
7509
|
+
*
|
|
7510
|
+
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
7511
|
+
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
7512
|
+
* object literal is never constructed because it lives inside the branch. It
|
|
7513
|
+
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
7514
|
+
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
7515
|
+
* destination floor (measured at 1.93 ns/call when off).
|
|
7516
|
+
*
|
|
7517
|
+
* ## Why a channel emits at `info`
|
|
7518
|
+
*
|
|
7519
|
+
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
7520
|
+
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
7521
|
+
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
7522
|
+
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
7523
|
+
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
7524
|
+
* emits at the channel's declared level, whose schema floor is `info`.
|
|
7525
|
+
*/
|
|
7526
|
+
/**
|
|
7527
|
+
* The level a channel writes at once armed.
|
|
7528
|
+
*
|
|
7529
|
+
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
7530
|
+
* not leave the process for Loki, and the whole point of arming a channel is
|
|
7531
|
+
* to read it later.
|
|
7532
|
+
*/
|
|
7533
|
+
var LogChannelLevelSchema = _enum([
|
|
7534
|
+
"info",
|
|
7535
|
+
"warn",
|
|
7536
|
+
"error"
|
|
7537
|
+
]);
|
|
7538
|
+
/**
|
|
7539
|
+
* What an addon declares about one channel. No value, no state — a
|
|
7540
|
+
* declaration is inert.
|
|
7541
|
+
*/
|
|
7542
|
+
var LogChannelDescriptorSchema = object({
|
|
7543
|
+
/**
|
|
7544
|
+
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
7545
|
+
* the addon's short name so an operator reading a channel list can tell who
|
|
7546
|
+
* owns it without a second lookup.
|
|
7547
|
+
*/
|
|
7548
|
+
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
7549
|
+
/** One sentence: what the operator will SEE after arming it. */
|
|
7550
|
+
description: string().min(1),
|
|
7551
|
+
/** The level its lines are emitted at. Never below `info`. */
|
|
7552
|
+
defaultLevel: LogChannelLevelSchema,
|
|
7553
|
+
/**
|
|
7554
|
+
* Whether this channel can be narrowed to a camera.
|
|
7555
|
+
*
|
|
7556
|
+
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
7557
|
+
* consulted with the numeric device id, AND every line the channel admits
|
|
7558
|
+
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
7559
|
+
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
7560
|
+
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
7561
|
+
* the body is the only way to filter.
|
|
7562
|
+
*
|
|
7563
|
+
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
7564
|
+
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
7565
|
+
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
7566
|
+
* path was never taken.
|
|
7567
|
+
*/
|
|
7568
|
+
perDevice: boolean()
|
|
7569
|
+
});
|
|
7570
|
+
/**
|
|
7571
|
+
* An armed window over one channel, as the document hands it to a mirror.
|
|
7572
|
+
*
|
|
7573
|
+
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
7574
|
+
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
7575
|
+
*/
|
|
7576
|
+
var LogChannelWindowSchema = object({
|
|
7577
|
+
channel: string().min(1),
|
|
7578
|
+
/** Epoch ms the window closes at. */
|
|
7579
|
+
armedUntilMs: number(),
|
|
7580
|
+
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
7581
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
7582
|
+
});
|
|
7583
|
+
/**
|
|
7479
7584
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
7480
7585
|
* recordings and events management surfaces.
|
|
7481
7586
|
*
|
|
@@ -10994,6 +11099,35 @@ var MutationFilterSchema = object({
|
|
|
10994
11099
|
whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
|
|
10995
11100
|
whereNot: record(string(), unknown()).optional()
|
|
10996
11101
|
});
|
|
11102
|
+
/**
|
|
11103
|
+
* One scalar an {@link settingsStoreCapability.methods.aggregate} call asks for.
|
|
11104
|
+
*
|
|
11105
|
+
* `as` names the slot in the result, so the SAME column may be asked twice with
|
|
11106
|
+
* two operations (`MIN(startMs)` and `MAX(startMs)` in one round trip) — which
|
|
11107
|
+
* a `Record<column, op>` shape could not express.
|
|
11108
|
+
*/
|
|
11109
|
+
var AggregateFieldSchema = object({
|
|
11110
|
+
/** Result key. */
|
|
11111
|
+
as: string().min(1),
|
|
11112
|
+
/** Column to aggregate. Must be a real column of a declared collection. */
|
|
11113
|
+
field: string().min(1),
|
|
11114
|
+
op: _enum([
|
|
11115
|
+
"sum",
|
|
11116
|
+
"min",
|
|
11117
|
+
"max"
|
|
11118
|
+
])
|
|
11119
|
+
});
|
|
11120
|
+
/**
|
|
11121
|
+
* `COUNT(*)` plus one number per requested field.
|
|
11122
|
+
*
|
|
11123
|
+
* `null` means NO ROW MATCHED, never zero: a `SUM` over an empty set and a sum
|
|
11124
|
+
* that really is 0 are different facts, and an accounting caller that renders
|
|
11125
|
+
* "0 bytes, oldest = 0" for "nothing here" reports a lie about a disk.
|
|
11126
|
+
*/
|
|
11127
|
+
var AggregateResultSchema = object({
|
|
11128
|
+
count: number().int(),
|
|
11129
|
+
values: record(string(), number().nullable())
|
|
11130
|
+
});
|
|
10997
11131
|
/** A single stored record: `{ id, data }`. */
|
|
10998
11132
|
var SettingsRecordSchema = object({
|
|
10999
11133
|
id: string(),
|
|
@@ -11078,6 +11212,11 @@ method(object({
|
|
|
11078
11212
|
collection: string(),
|
|
11079
11213
|
filter: QueryFilterSchema.optional()
|
|
11080
11214
|
}), number()), method(object({
|
|
11215
|
+
namespace: string().optional(),
|
|
11216
|
+
collection: string(),
|
|
11217
|
+
fields: array(AggregateFieldSchema).readonly(),
|
|
11218
|
+
filter: QueryFilterSchema.optional()
|
|
11219
|
+
}), AggregateResultSchema), method(object({
|
|
11081
11220
|
namespace: string().optional(),
|
|
11082
11221
|
collection: string(),
|
|
11083
11222
|
field: string(),
|
|
@@ -11194,6 +11333,11 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
|
|
|
11194
11333
|
collection: string(),
|
|
11195
11334
|
filter: QueryFilterSchema.optional()
|
|
11196
11335
|
}), number(), { auth: "admin" }), method(object({
|
|
11336
|
+
namespace: string().optional(),
|
|
11337
|
+
collection: string(),
|
|
11338
|
+
fields: array(AggregateFieldSchema).readonly(),
|
|
11339
|
+
filter: QueryFilterSchema.optional()
|
|
11340
|
+
}), AggregateResultSchema, { auth: "admin" }), method(object({
|
|
11197
11341
|
namespace: string().optional(),
|
|
11198
11342
|
collection: string(),
|
|
11199
11343
|
field: string(),
|
|
@@ -11755,24 +11899,6 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
|
|
|
11755
11899
|
kind: "mutation",
|
|
11756
11900
|
auth: "admin"
|
|
11757
11901
|
});
|
|
11758
|
-
/**
|
|
11759
|
-
* Device Manager capability — hub-side singleton that unifies device persistence,
|
|
11760
|
-
* live registry access, and all management operations into a single tRPC surface.
|
|
11761
|
-
*
|
|
11762
|
-
* Replaces:
|
|
11763
|
-
* - `device-persistence` capability (persistence methods absorbed here)
|
|
11764
|
-
* - `device-management.router.ts` (deleted in Phase 2)
|
|
11765
|
-
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
11766
|
-
*
|
|
11767
|
-
* All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
|
|
11768
|
-
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
11769
|
-
* - No nodeId routing needed — this is a pure hub singleton.
|
|
11770
|
-
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
11771
|
-
* - No shadow registry or cross-node aggregation required.
|
|
11772
|
-
*
|
|
11773
|
-
* Forked workers register devices back to the hub via `ctx.devices`
|
|
11774
|
-
* (DeviceManagerApi → ctx.api.deviceManager.registerDevice), same as today.
|
|
11775
|
-
*/
|
|
11776
11902
|
/** One child-placement directive on a container's `childLayout`. Structurally
|
|
11777
11903
|
* identical to `ChildLayoutEntry` in `device-management.ts` — the cap wire
|
|
11778
11904
|
* shape for the same field. The child is identified by its re-sync-stable
|
|
@@ -12141,7 +12267,7 @@ method(object({
|
|
|
12141
12267
|
* it answers today and the caller filters as it already does.
|
|
12142
12268
|
*/
|
|
12143
12269
|
deviceIds: array(number()).optional()
|
|
12144
|
-
}), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), object({
|
|
12270
|
+
}), 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({
|
|
12145
12271
|
mode: LinkedDevicesModeSchema,
|
|
12146
12272
|
devices: array(LinkedDeviceSchema)
|
|
12147
12273
|
})), 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({
|
|
@@ -12865,6 +12991,59 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
12865
12991
|
kind: "mutation",
|
|
12866
12992
|
auth: "admin"
|
|
12867
12993
|
});
|
|
12994
|
+
/**
|
|
12995
|
+
* `log-channels` — the capability an addon DECLARES its diagnostic channels
|
|
12996
|
+
* through. It stores nothing.
|
|
12997
|
+
*
|
|
12998
|
+
* ## Why a capability at all, and why this shape
|
|
12999
|
+
*
|
|
13000
|
+
* Which channels exist is knowledge only the addon has: `stream-broker` knows
|
|
13001
|
+
* webrtc/ICE/RTP, `provider-reolink` knows baichuan/handshake. A central list
|
|
13002
|
+
* maintained by hand rots at the first addition and rots INVISIBLY — nothing
|
|
13003
|
+
* fails, an operator just never sees the channel somebody added. So the list
|
|
13004
|
+
* is assembled from declarations at runtime.
|
|
13005
|
+
*
|
|
13006
|
+
* The shape is copied from `log-destination.cap.ts`, which already does
|
|
13007
|
+
* exactly this job: `mode: 'collection'`, `internal: true`,
|
|
13008
|
+
* `mount: { kind: 'skip' }` — no tRPC route, no generated hooks — while
|
|
13009
|
+
* `addons.listCapabilityProviders` still enumerates it, and the hub's
|
|
13010
|
+
* `CapabilityRegistry` still holds an RPC proxy per provider so a forked
|
|
13011
|
+
* runner's declarations reach hub-main over the transport that already exists.
|
|
13012
|
+
* No new UDS message, no second registry.
|
|
13013
|
+
*
|
|
13014
|
+
* ## What it deliberately does NOT own
|
|
13015
|
+
*
|
|
13016
|
+
* The VALUES — which channel is armed, for which cameras, until when — live in
|
|
13017
|
+
* ONE place: the logging settings document on the `system` cap
|
|
13018
|
+
* (`getLoggingSettings` / `setLoggingSettings`). Two authorities over the same
|
|
13019
|
+
* value is the defect the plan behind this work exists to remove, and
|
|
13020
|
+
* `setRequestCensus` was retired (D245) rather than allowed to be a second
|
|
13021
|
+
* one. {@link logChannelsCapability} therefore has no getter for a level, no
|
|
13022
|
+
* setter for a window and no persistence of any kind.
|
|
13023
|
+
*
|
|
13024
|
+
* ## Why `apply` is here even so
|
|
13025
|
+
*
|
|
13026
|
+
* The gate lives in the addon's PROCESS; the document lives in hub-main. Some
|
|
13027
|
+
* seam has to carry the value from the authority to the mirror, and a channel
|
|
13028
|
+
* that cannot be reached is precisely the dead knob this whole slice exists to
|
|
13029
|
+
* make impossible (D62 — `audioThresholdDbfs`, the HA entities with no source).
|
|
13030
|
+
* `apply` is that seam and nothing more: it writes an in-memory mirror, it
|
|
13031
|
+
* persists nothing, it is never the source of a value, and it is called only
|
|
13032
|
+
* with a set the hub actually read (D49 — a read that fails does not call it
|
|
13033
|
+
* at all, so no channel is silently disarmed by a bad read).
|
|
13034
|
+
*/
|
|
13035
|
+
/** What `apply` reports back — enough to log, not enough to be a second state. */
|
|
13036
|
+
var LogChannelApplyResultSchema = object({
|
|
13037
|
+
/** How many declared channels are armed in this process after the call. */
|
|
13038
|
+
armed: number().int().min(0),
|
|
13039
|
+
/**
|
|
13040
|
+
* Names the document armed that this process does not declare. Reported
|
|
13041
|
+
* rather than swallowed: a name here is either a typo or an addon that has
|
|
13042
|
+
* not booted, and both deserve a line instead of silence.
|
|
13043
|
+
*/
|
|
13044
|
+
unknown: array(string()).readonly()
|
|
13045
|
+
});
|
|
13046
|
+
method(_void(), array(LogChannelDescriptorSchema).readonly()), method(object({ windows: array(LogChannelWindowSchema).readonly() }), LogChannelApplyResultSchema, { kind: "mutation" });
|
|
12868
13047
|
var LogLevelSchema = _enum([
|
|
12869
13048
|
"debug",
|
|
12870
13049
|
"info",
|
|
@@ -26342,10 +26521,11 @@ var DiagnosticIdSchema = _enum(["request-census"]);
|
|
|
26342
26521
|
* The layers of the level hierarchy, general → specific. The most specific
|
|
26343
26522
|
* layer that carries an explicit value wins.
|
|
26344
26523
|
*
|
|
26345
|
-
* `component`
|
|
26346
|
-
*
|
|
26347
|
-
*
|
|
26348
|
-
*
|
|
26524
|
+
* `component` became RESOLVABLE on 2026-08-27: a component is a declared log
|
|
26525
|
+
* CHANNEL (`stream-broker.webrtc`, `provider-reolink.baichuan`), named by
|
|
26526
|
+
* `scopeComponent`. It was declared-but-dark in the first slice precisely so
|
|
26527
|
+
* that turning it on would not force every consumer of this document to widen
|
|
26528
|
+
* a `levelSource` enum — which is what has now not happened.
|
|
26349
26529
|
*/
|
|
26350
26530
|
var LoggingScopeKindSchema = _enum([
|
|
26351
26531
|
"cluster",
|
|
@@ -26372,6 +26552,14 @@ var LoggingLevelLayerSchema = object({
|
|
|
26372
26552
|
scope: LoggingScopeKindSchema,
|
|
26373
26553
|
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
26374
26554
|
nodeId: string().nullable(),
|
|
26555
|
+
/**
|
|
26556
|
+
* The declared channel this layer speaks for; `null` on every layer but
|
|
26557
|
+
* `component`. Never folded into `nodeId`: a component level is CLUSTER-WIDE
|
|
26558
|
+
* by design — the convention this repo settled on is one orchestrator-wide
|
|
26559
|
+
* setting, never per node (D52) — so a component layer that carried a node
|
|
26560
|
+
* would invite a per-node copy of a value that has no per-node meaning.
|
|
26561
|
+
*/
|
|
26562
|
+
component: string().nullable(),
|
|
26375
26563
|
/** Explicitly set here, or `null` when this layer inherits. */
|
|
26376
26564
|
level: LogLevelSchema$1.nullable()
|
|
26377
26565
|
});
|
|
@@ -26413,6 +26601,49 @@ var DiagnosticWindowPatchSchema = object({
|
|
|
26413
26601
|
reportEveryMs: number().int().positive().optional()
|
|
26414
26602
|
});
|
|
26415
26603
|
/**
|
|
26604
|
+
* A channel ARMED, as the document reports it.
|
|
26605
|
+
*
|
|
26606
|
+
* `armMs` is not echoed back: what an operator needs to see is the deadline
|
|
26607
|
+
* and the time left, because a diagnostic left running is itself an incident
|
|
26608
|
+
* and "armed for 10 minutes" said an hour ago is not an answer.
|
|
26609
|
+
*/
|
|
26610
|
+
var LogChannelWindowStateSchema = object({
|
|
26611
|
+
channel: string(),
|
|
26612
|
+
armed: boolean(),
|
|
26613
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
26614
|
+
armedUntilMs: number(),
|
|
26615
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
26616
|
+
remainingMs: number(),
|
|
26617
|
+
/**
|
|
26618
|
+
* The cameras it is narrowed to, or `null` for every camera.
|
|
26619
|
+
*
|
|
26620
|
+
* A channel declared `perDevice: false` can only ever report `null` here:
|
|
26621
|
+
* its lines do not carry `tags: { deviceId }`, so narrowing them would
|
|
26622
|
+
* produce a filter that silently matches nothing. The server REFUSES such a
|
|
26623
|
+
* patch rather than quietly widening it — ignoring the request would teach
|
|
26624
|
+
* the operator that per-camera filtering works on that channel when it does
|
|
26625
|
+
* not.
|
|
26626
|
+
*/
|
|
26627
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
26628
|
+
});
|
|
26629
|
+
/**
|
|
26630
|
+
* `armMs: 0` DISARMS. Same grammar as {@link DiagnosticWindowPatchSchema}, and
|
|
26631
|
+
* for the same reason: a channel is a window with a deadline, never a switch.
|
|
26632
|
+
*/
|
|
26633
|
+
var LogChannelWindowPatchSchema = object({
|
|
26634
|
+
channel: string().min(1),
|
|
26635
|
+
armMs: number().int().min(0),
|
|
26636
|
+
/**
|
|
26637
|
+
* Narrow to these numeric device ids. Absent or `null` = every camera.
|
|
26638
|
+
*
|
|
26639
|
+
* Numeric because the repo's own rule makes it possible: every log line
|
|
26640
|
+
* about a device carries `tags: { deviceId }` with the numeric id. That rule
|
|
26641
|
+
* was paid for with a 22% thumbnail gap and a 3-hour media blackout both
|
|
26642
|
+
* diagnosed by hand, and this is the first thing that collects on it.
|
|
26643
|
+
*/
|
|
26644
|
+
deviceIds: array(number().int()).readonly().nullable().optional()
|
|
26645
|
+
});
|
|
26646
|
+
/**
|
|
26416
26647
|
* A PATCH, and patches MERGE.
|
|
26417
26648
|
*
|
|
26418
26649
|
* A field absent from the patch is left exactly as it was — arming a
|
|
@@ -26431,7 +26662,14 @@ var LoggingSettingsPatchSchema = object({
|
|
|
26431
26662
|
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
26432
26663
|
* keeps running — a patch is never a full replacement.
|
|
26433
26664
|
*/
|
|
26434
|
-
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
26665
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional(),
|
|
26666
|
+
/**
|
|
26667
|
+
* Only the channels NAMED here change. An armed channel that is not listed
|
|
26668
|
+
* keeps running — same rule as `diagnostics`, because a patch that silently
|
|
26669
|
+
* disarmed the channels it did not mention would make the Levels page and
|
|
26670
|
+
* the Diagnostics page fight over the same value.
|
|
26671
|
+
*/
|
|
26672
|
+
channels: array(LogChannelWindowPatchSchema).readonly().optional()
|
|
26435
26673
|
});
|
|
26436
26674
|
/**
|
|
26437
26675
|
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
@@ -26444,9 +26682,22 @@ var LoggingSettingsPatchSchema = object({
|
|
|
26444
26682
|
* authority over the whole hierarchy and answers for every layer, so the
|
|
26445
26683
|
* layer selector needs a name the transport does not already own.
|
|
26446
26684
|
*/
|
|
26447
|
-
var GetLoggingSettingsInputSchema = object({
|
|
26685
|
+
var GetLoggingSettingsInputSchema = object({
|
|
26686
|
+
scopeNodeId: string().optional(),
|
|
26687
|
+
/**
|
|
26688
|
+
* The declared CHANNEL this document is addressed at, when the caller wants
|
|
26689
|
+
* the `component` layer. Absent = the node/cluster hierarchy only.
|
|
26690
|
+
*
|
|
26691
|
+
* Naming it separately rather than overloading `scopeNodeId` keeps the two
|
|
26692
|
+
* axes from collapsing: a component level is cluster-wide, a node level is
|
|
26693
|
+
* not, and one selector for both would make "which of these two did I just
|
|
26694
|
+
* set" unanswerable — the exact ambiguity `explicit` exists to remove.
|
|
26695
|
+
*/
|
|
26696
|
+
scopeComponent: string().optional()
|
|
26697
|
+
});
|
|
26448
26698
|
var SetLoggingSettingsInputSchema = object({
|
|
26449
26699
|
scopeNodeId: string().optional(),
|
|
26700
|
+
scopeComponent: string().optional(),
|
|
26450
26701
|
patch: LoggingSettingsPatchSchema
|
|
26451
26702
|
});
|
|
26452
26703
|
/**
|
|
@@ -26461,9 +26712,20 @@ var SetLoggingSettingsInputSchema = object({
|
|
|
26461
26712
|
var LoggingSettingsStateSchema = object({
|
|
26462
26713
|
/** The layer this document was read at. `null` = the cluster layer. */
|
|
26463
26714
|
scopeNodeId: string().nullable(),
|
|
26715
|
+
/** The channel this document was read at. `null` = no component layer. */
|
|
26716
|
+
scopeComponent: string().nullable(),
|
|
26464
26717
|
effective: LoggingEffectiveSchema,
|
|
26465
26718
|
explicit: LoggingExplicitSchema,
|
|
26466
26719
|
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
26720
|
+
/**
|
|
26721
|
+
* Every channel the cluster's addons DECLARE, gathered from the
|
|
26722
|
+
* `log-channels` providers. Not stored anywhere: assembled per read, so a
|
|
26723
|
+
* channel added by a redeployed addon appears without anybody editing a
|
|
26724
|
+
* list, and a channel whose addon is gone stops being offered.
|
|
26725
|
+
*/
|
|
26726
|
+
channels: array(LogChannelDescriptorSchema).readonly(),
|
|
26727
|
+
/** The channels ARMED right now, each with its deadline. */
|
|
26728
|
+
activeChannels: array(LogChannelWindowStateSchema).readonly(),
|
|
26467
26729
|
persisted: boolean()
|
|
26468
26730
|
});
|
|
26469
26731
|
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(), {
|
|
@@ -28040,6 +28302,12 @@ Object.freeze({
|
|
|
28040
28302
|
addonId: null,
|
|
28041
28303
|
access: "view"
|
|
28042
28304
|
},
|
|
28305
|
+
"dataStoreProvider.aggregate": {
|
|
28306
|
+
capName: "data-store-provider",
|
|
28307
|
+
capScope: "system",
|
|
28308
|
+
addonId: null,
|
|
28309
|
+
access: "view"
|
|
28310
|
+
},
|
|
28043
28311
|
"dataStoreProvider.count": {
|
|
28044
28312
|
capName: "data-store-provider",
|
|
28045
28313
|
capScope: "system",
|
|
@@ -28454,6 +28722,12 @@ Object.freeze({
|
|
|
28454
28722
|
addonId: null,
|
|
28455
28723
|
access: "view"
|
|
28456
28724
|
},
|
|
28725
|
+
"deviceManager.getChildrenBatch": {
|
|
28726
|
+
capName: "device-manager",
|
|
28727
|
+
capScope: "system",
|
|
28728
|
+
addonId: null,
|
|
28729
|
+
access: "view"
|
|
28730
|
+
},
|
|
28457
28731
|
"deviceManager.getConfigSchema": {
|
|
28458
28732
|
capName: "device-manager",
|
|
28459
28733
|
capScope: "system",
|
|
@@ -29504,6 +29778,18 @@ Object.freeze({
|
|
|
29504
29778
|
addonId: null,
|
|
29505
29779
|
access: "create"
|
|
29506
29780
|
},
|
|
29781
|
+
"logChannels.apply": {
|
|
29782
|
+
capName: "log-channels",
|
|
29783
|
+
capScope: "system",
|
|
29784
|
+
addonId: null,
|
|
29785
|
+
access: "create"
|
|
29786
|
+
},
|
|
29787
|
+
"logChannels.list": {
|
|
29788
|
+
capName: "log-channels",
|
|
29789
|
+
capScope: "system",
|
|
29790
|
+
addonId: null,
|
|
29791
|
+
access: "view"
|
|
29792
|
+
},
|
|
29507
29793
|
"logDestination.query": {
|
|
29508
29794
|
capName: "log-destination",
|
|
29509
29795
|
capScope: "system",
|
|
@@ -31658,6 +31944,12 @@ Object.freeze({
|
|
|
31658
31944
|
addonId: null,
|
|
31659
31945
|
access: "create"
|
|
31660
31946
|
},
|
|
31947
|
+
"settingsStore.aggregate": {
|
|
31948
|
+
capName: "settings-store",
|
|
31949
|
+
capScope: "system",
|
|
31950
|
+
addonId: null,
|
|
31951
|
+
access: "view"
|
|
31952
|
+
},
|
|
31661
31953
|
"settingsStore.count": {
|
|
31662
31954
|
capName: "settings-store",
|
|
31663
31955
|
capScope: "system",
|
|
@@ -33237,6 +33529,11 @@ Object.freeze({
|
|
|
33237
33529
|
form: "single",
|
|
33238
33530
|
optional: false
|
|
33239
33531
|
}],
|
|
33532
|
+
"deviceManager.getChildrenBatch": [{
|
|
33533
|
+
name: "parentDeviceIds",
|
|
33534
|
+
form: "array",
|
|
33535
|
+
optional: false
|
|
33536
|
+
}],
|
|
33240
33537
|
"deviceManager.getConfigSchema": [{
|
|
33241
33538
|
name: "deviceId",
|
|
33242
33539
|
form: "single",
|
|
@@ -7453,6 +7453,111 @@ var CameraSwitchGroupSchema = object({
|
|
|
7453
7453
|
fetchedAt: number()
|
|
7454
7454
|
});
|
|
7455
7455
|
/**
|
|
7456
|
+
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
7457
|
+
* an addon declares its channels in.
|
|
7458
|
+
*
|
|
7459
|
+
* ## Two axes, deliberately separated
|
|
7460
|
+
*
|
|
7461
|
+
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
7462
|
+
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
7463
|
+
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
7464
|
+
* and rots silently. So a channel is declared where it is consulted, and the
|
|
7465
|
+
* `log-channels` capability enumerates the declarations.
|
|
7466
|
+
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
7467
|
+
* thing: the logging settings document on the `system` cap. Two authorities
|
|
7468
|
+
* over the values is the exact defect
|
|
7469
|
+
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
7470
|
+
* remove; re-introducing it from the cure side would be grotesque.
|
|
7471
|
+
*
|
|
7472
|
+
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
7473
|
+
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
7474
|
+
* the hot path with a value somebody actually read, and by
|
|
7475
|
+
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
7476
|
+
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
7477
|
+
* disarmed one (D49).
|
|
7478
|
+
*
|
|
7479
|
+
* ## The canonical call shape
|
|
7480
|
+
*
|
|
7481
|
+
* ```ts
|
|
7482
|
+
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
7483
|
+
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
7484
|
+
* }
|
|
7485
|
+
* ```
|
|
7486
|
+
*
|
|
7487
|
+
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
7488
|
+
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
7489
|
+
* object literal is never constructed because it lives inside the branch. It
|
|
7490
|
+
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
7491
|
+
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
7492
|
+
* destination floor (measured at 1.93 ns/call when off).
|
|
7493
|
+
*
|
|
7494
|
+
* ## Why a channel emits at `info`
|
|
7495
|
+
*
|
|
7496
|
+
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
7497
|
+
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
7498
|
+
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
7499
|
+
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
7500
|
+
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
7501
|
+
* emits at the channel's declared level, whose schema floor is `info`.
|
|
7502
|
+
*/
|
|
7503
|
+
/**
|
|
7504
|
+
* The level a channel writes at once armed.
|
|
7505
|
+
*
|
|
7506
|
+
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
7507
|
+
* not leave the process for Loki, and the whole point of arming a channel is
|
|
7508
|
+
* to read it later.
|
|
7509
|
+
*/
|
|
7510
|
+
var LogChannelLevelSchema = _enum([
|
|
7511
|
+
"info",
|
|
7512
|
+
"warn",
|
|
7513
|
+
"error"
|
|
7514
|
+
]);
|
|
7515
|
+
/**
|
|
7516
|
+
* What an addon declares about one channel. No value, no state — a
|
|
7517
|
+
* declaration is inert.
|
|
7518
|
+
*/
|
|
7519
|
+
var LogChannelDescriptorSchema = object({
|
|
7520
|
+
/**
|
|
7521
|
+
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
7522
|
+
* the addon's short name so an operator reading a channel list can tell who
|
|
7523
|
+
* owns it without a second lookup.
|
|
7524
|
+
*/
|
|
7525
|
+
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
7526
|
+
/** One sentence: what the operator will SEE after arming it. */
|
|
7527
|
+
description: string().min(1),
|
|
7528
|
+
/** The level its lines are emitted at. Never below `info`. */
|
|
7529
|
+
defaultLevel: LogChannelLevelSchema,
|
|
7530
|
+
/**
|
|
7531
|
+
* Whether this channel can be narrowed to a camera.
|
|
7532
|
+
*
|
|
7533
|
+
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
7534
|
+
* consulted with the numeric device id, AND every line the channel admits
|
|
7535
|
+
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
7536
|
+
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
7537
|
+
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
7538
|
+
* the body is the only way to filter.
|
|
7539
|
+
*
|
|
7540
|
+
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
7541
|
+
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
7542
|
+
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
7543
|
+
* path was never taken.
|
|
7544
|
+
*/
|
|
7545
|
+
perDevice: boolean()
|
|
7546
|
+
});
|
|
7547
|
+
/**
|
|
7548
|
+
* An armed window over one channel, as the document hands it to a mirror.
|
|
7549
|
+
*
|
|
7550
|
+
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
7551
|
+
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
7552
|
+
*/
|
|
7553
|
+
var LogChannelWindowSchema = object({
|
|
7554
|
+
channel: string().min(1),
|
|
7555
|
+
/** Epoch ms the window closes at. */
|
|
7556
|
+
armedUntilMs: number(),
|
|
7557
|
+
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
7558
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
7559
|
+
});
|
|
7560
|
+
/**
|
|
7456
7561
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
7457
7562
|
* recordings and events management surfaces.
|
|
7458
7563
|
*
|
|
@@ -10971,6 +11076,35 @@ var MutationFilterSchema = object({
|
|
|
10971
11076
|
whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
|
|
10972
11077
|
whereNot: record(string(), unknown()).optional()
|
|
10973
11078
|
});
|
|
11079
|
+
/**
|
|
11080
|
+
* One scalar an {@link settingsStoreCapability.methods.aggregate} call asks for.
|
|
11081
|
+
*
|
|
11082
|
+
* `as` names the slot in the result, so the SAME column may be asked twice with
|
|
11083
|
+
* two operations (`MIN(startMs)` and `MAX(startMs)` in one round trip) — which
|
|
11084
|
+
* a `Record<column, op>` shape could not express.
|
|
11085
|
+
*/
|
|
11086
|
+
var AggregateFieldSchema = object({
|
|
11087
|
+
/** Result key. */
|
|
11088
|
+
as: string().min(1),
|
|
11089
|
+
/** Column to aggregate. Must be a real column of a declared collection. */
|
|
11090
|
+
field: string().min(1),
|
|
11091
|
+
op: _enum([
|
|
11092
|
+
"sum",
|
|
11093
|
+
"min",
|
|
11094
|
+
"max"
|
|
11095
|
+
])
|
|
11096
|
+
});
|
|
11097
|
+
/**
|
|
11098
|
+
* `COUNT(*)` plus one number per requested field.
|
|
11099
|
+
*
|
|
11100
|
+
* `null` means NO ROW MATCHED, never zero: a `SUM` over an empty set and a sum
|
|
11101
|
+
* that really is 0 are different facts, and an accounting caller that renders
|
|
11102
|
+
* "0 bytes, oldest = 0" for "nothing here" reports a lie about a disk.
|
|
11103
|
+
*/
|
|
11104
|
+
var AggregateResultSchema = object({
|
|
11105
|
+
count: number().int(),
|
|
11106
|
+
values: record(string(), number().nullable())
|
|
11107
|
+
});
|
|
10974
11108
|
/** A single stored record: `{ id, data }`. */
|
|
10975
11109
|
var SettingsRecordSchema = object({
|
|
10976
11110
|
id: string(),
|
|
@@ -11055,6 +11189,11 @@ method(object({
|
|
|
11055
11189
|
collection: string(),
|
|
11056
11190
|
filter: QueryFilterSchema.optional()
|
|
11057
11191
|
}), number()), method(object({
|
|
11192
|
+
namespace: string().optional(),
|
|
11193
|
+
collection: string(),
|
|
11194
|
+
fields: array(AggregateFieldSchema).readonly(),
|
|
11195
|
+
filter: QueryFilterSchema.optional()
|
|
11196
|
+
}), AggregateResultSchema), method(object({
|
|
11058
11197
|
namespace: string().optional(),
|
|
11059
11198
|
collection: string(),
|
|
11060
11199
|
field: string(),
|
|
@@ -11171,6 +11310,11 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
|
|
|
11171
11310
|
collection: string(),
|
|
11172
11311
|
filter: QueryFilterSchema.optional()
|
|
11173
11312
|
}), number(), { auth: "admin" }), method(object({
|
|
11313
|
+
namespace: string().optional(),
|
|
11314
|
+
collection: string(),
|
|
11315
|
+
fields: array(AggregateFieldSchema).readonly(),
|
|
11316
|
+
filter: QueryFilterSchema.optional()
|
|
11317
|
+
}), AggregateResultSchema, { auth: "admin" }), method(object({
|
|
11174
11318
|
namespace: string().optional(),
|
|
11175
11319
|
collection: string(),
|
|
11176
11320
|
field: string(),
|
|
@@ -11732,24 +11876,6 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
|
|
|
11732
11876
|
kind: "mutation",
|
|
11733
11877
|
auth: "admin"
|
|
11734
11878
|
});
|
|
11735
|
-
/**
|
|
11736
|
-
* Device Manager capability — hub-side singleton that unifies device persistence,
|
|
11737
|
-
* live registry access, and all management operations into a single tRPC surface.
|
|
11738
|
-
*
|
|
11739
|
-
* Replaces:
|
|
11740
|
-
* - `device-persistence` capability (persistence methods absorbed here)
|
|
11741
|
-
* - `device-management.router.ts` (deleted in Phase 2)
|
|
11742
|
-
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
11743
|
-
*
|
|
11744
|
-
* All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
|
|
11745
|
-
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
11746
|
-
* - No nodeId routing needed — this is a pure hub singleton.
|
|
11747
|
-
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
11748
|
-
* - No shadow registry or cross-node aggregation required.
|
|
11749
|
-
*
|
|
11750
|
-
* Forked workers register devices back to the hub via `ctx.devices`
|
|
11751
|
-
* (DeviceManagerApi → ctx.api.deviceManager.registerDevice), same as today.
|
|
11752
|
-
*/
|
|
11753
11879
|
/** One child-placement directive on a container's `childLayout`. Structurally
|
|
11754
11880
|
* identical to `ChildLayoutEntry` in `device-management.ts` — the cap wire
|
|
11755
11881
|
* shape for the same field. The child is identified by its re-sync-stable
|
|
@@ -12118,7 +12244,7 @@ method(object({
|
|
|
12118
12244
|
* it answers today and the caller filters as it already does.
|
|
12119
12245
|
*/
|
|
12120
12246
|
deviceIds: array(number()).optional()
|
|
12121
|
-
}), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), object({
|
|
12247
|
+
}), 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({
|
|
12122
12248
|
mode: LinkedDevicesModeSchema,
|
|
12123
12249
|
devices: array(LinkedDeviceSchema)
|
|
12124
12250
|
})), 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({
|
|
@@ -12842,6 +12968,59 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
12842
12968
|
kind: "mutation",
|
|
12843
12969
|
auth: "admin"
|
|
12844
12970
|
});
|
|
12971
|
+
/**
|
|
12972
|
+
* `log-channels` — the capability an addon DECLARES its diagnostic channels
|
|
12973
|
+
* through. It stores nothing.
|
|
12974
|
+
*
|
|
12975
|
+
* ## Why a capability at all, and why this shape
|
|
12976
|
+
*
|
|
12977
|
+
* Which channels exist is knowledge only the addon has: `stream-broker` knows
|
|
12978
|
+
* webrtc/ICE/RTP, `provider-reolink` knows baichuan/handshake. A central list
|
|
12979
|
+
* maintained by hand rots at the first addition and rots INVISIBLY — nothing
|
|
12980
|
+
* fails, an operator just never sees the channel somebody added. So the list
|
|
12981
|
+
* is assembled from declarations at runtime.
|
|
12982
|
+
*
|
|
12983
|
+
* The shape is copied from `log-destination.cap.ts`, which already does
|
|
12984
|
+
* exactly this job: `mode: 'collection'`, `internal: true`,
|
|
12985
|
+
* `mount: { kind: 'skip' }` — no tRPC route, no generated hooks — while
|
|
12986
|
+
* `addons.listCapabilityProviders` still enumerates it, and the hub's
|
|
12987
|
+
* `CapabilityRegistry` still holds an RPC proxy per provider so a forked
|
|
12988
|
+
* runner's declarations reach hub-main over the transport that already exists.
|
|
12989
|
+
* No new UDS message, no second registry.
|
|
12990
|
+
*
|
|
12991
|
+
* ## What it deliberately does NOT own
|
|
12992
|
+
*
|
|
12993
|
+
* The VALUES — which channel is armed, for which cameras, until when — live in
|
|
12994
|
+
* ONE place: the logging settings document on the `system` cap
|
|
12995
|
+
* (`getLoggingSettings` / `setLoggingSettings`). Two authorities over the same
|
|
12996
|
+
* value is the defect the plan behind this work exists to remove, and
|
|
12997
|
+
* `setRequestCensus` was retired (D245) rather than allowed to be a second
|
|
12998
|
+
* one. {@link logChannelsCapability} therefore has no getter for a level, no
|
|
12999
|
+
* setter for a window and no persistence of any kind.
|
|
13000
|
+
*
|
|
13001
|
+
* ## Why `apply` is here even so
|
|
13002
|
+
*
|
|
13003
|
+
* The gate lives in the addon's PROCESS; the document lives in hub-main. Some
|
|
13004
|
+
* seam has to carry the value from the authority to the mirror, and a channel
|
|
13005
|
+
* that cannot be reached is precisely the dead knob this whole slice exists to
|
|
13006
|
+
* make impossible (D62 — `audioThresholdDbfs`, the HA entities with no source).
|
|
13007
|
+
* `apply` is that seam and nothing more: it writes an in-memory mirror, it
|
|
13008
|
+
* persists nothing, it is never the source of a value, and it is called only
|
|
13009
|
+
* with a set the hub actually read (D49 — a read that fails does not call it
|
|
13010
|
+
* at all, so no channel is silently disarmed by a bad read).
|
|
13011
|
+
*/
|
|
13012
|
+
/** What `apply` reports back — enough to log, not enough to be a second state. */
|
|
13013
|
+
var LogChannelApplyResultSchema = object({
|
|
13014
|
+
/** How many declared channels are armed in this process after the call. */
|
|
13015
|
+
armed: number().int().min(0),
|
|
13016
|
+
/**
|
|
13017
|
+
* Names the document armed that this process does not declare. Reported
|
|
13018
|
+
* rather than swallowed: a name here is either a typo or an addon that has
|
|
13019
|
+
* not booted, and both deserve a line instead of silence.
|
|
13020
|
+
*/
|
|
13021
|
+
unknown: array(string()).readonly()
|
|
13022
|
+
});
|
|
13023
|
+
method(_void(), array(LogChannelDescriptorSchema).readonly()), method(object({ windows: array(LogChannelWindowSchema).readonly() }), LogChannelApplyResultSchema, { kind: "mutation" });
|
|
12845
13024
|
var LogLevelSchema = _enum([
|
|
12846
13025
|
"debug",
|
|
12847
13026
|
"info",
|
|
@@ -26319,10 +26498,11 @@ var DiagnosticIdSchema = _enum(["request-census"]);
|
|
|
26319
26498
|
* The layers of the level hierarchy, general → specific. The most specific
|
|
26320
26499
|
* layer that carries an explicit value wins.
|
|
26321
26500
|
*
|
|
26322
|
-
* `component`
|
|
26323
|
-
*
|
|
26324
|
-
*
|
|
26325
|
-
*
|
|
26501
|
+
* `component` became RESOLVABLE on 2026-08-27: a component is a declared log
|
|
26502
|
+
* CHANNEL (`stream-broker.webrtc`, `provider-reolink.baichuan`), named by
|
|
26503
|
+
* `scopeComponent`. It was declared-but-dark in the first slice precisely so
|
|
26504
|
+
* that turning it on would not force every consumer of this document to widen
|
|
26505
|
+
* a `levelSource` enum — which is what has now not happened.
|
|
26326
26506
|
*/
|
|
26327
26507
|
var LoggingScopeKindSchema = _enum([
|
|
26328
26508
|
"cluster",
|
|
@@ -26349,6 +26529,14 @@ var LoggingLevelLayerSchema = object({
|
|
|
26349
26529
|
scope: LoggingScopeKindSchema,
|
|
26350
26530
|
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
26351
26531
|
nodeId: string().nullable(),
|
|
26532
|
+
/**
|
|
26533
|
+
* The declared channel this layer speaks for; `null` on every layer but
|
|
26534
|
+
* `component`. Never folded into `nodeId`: a component level is CLUSTER-WIDE
|
|
26535
|
+
* by design — the convention this repo settled on is one orchestrator-wide
|
|
26536
|
+
* setting, never per node (D52) — so a component layer that carried a node
|
|
26537
|
+
* would invite a per-node copy of a value that has no per-node meaning.
|
|
26538
|
+
*/
|
|
26539
|
+
component: string().nullable(),
|
|
26352
26540
|
/** Explicitly set here, or `null` when this layer inherits. */
|
|
26353
26541
|
level: LogLevelSchema$1.nullable()
|
|
26354
26542
|
});
|
|
@@ -26390,6 +26578,49 @@ var DiagnosticWindowPatchSchema = object({
|
|
|
26390
26578
|
reportEveryMs: number().int().positive().optional()
|
|
26391
26579
|
});
|
|
26392
26580
|
/**
|
|
26581
|
+
* A channel ARMED, as the document reports it.
|
|
26582
|
+
*
|
|
26583
|
+
* `armMs` is not echoed back: what an operator needs to see is the deadline
|
|
26584
|
+
* and the time left, because a diagnostic left running is itself an incident
|
|
26585
|
+
* and "armed for 10 minutes" said an hour ago is not an answer.
|
|
26586
|
+
*/
|
|
26587
|
+
var LogChannelWindowStateSchema = object({
|
|
26588
|
+
channel: string(),
|
|
26589
|
+
armed: boolean(),
|
|
26590
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
26591
|
+
armedUntilMs: number(),
|
|
26592
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
26593
|
+
remainingMs: number(),
|
|
26594
|
+
/**
|
|
26595
|
+
* The cameras it is narrowed to, or `null` for every camera.
|
|
26596
|
+
*
|
|
26597
|
+
* A channel declared `perDevice: false` can only ever report `null` here:
|
|
26598
|
+
* its lines do not carry `tags: { deviceId }`, so narrowing them would
|
|
26599
|
+
* produce a filter that silently matches nothing. The server REFUSES such a
|
|
26600
|
+
* patch rather than quietly widening it — ignoring the request would teach
|
|
26601
|
+
* the operator that per-camera filtering works on that channel when it does
|
|
26602
|
+
* not.
|
|
26603
|
+
*/
|
|
26604
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
26605
|
+
});
|
|
26606
|
+
/**
|
|
26607
|
+
* `armMs: 0` DISARMS. Same grammar as {@link DiagnosticWindowPatchSchema}, and
|
|
26608
|
+
* for the same reason: a channel is a window with a deadline, never a switch.
|
|
26609
|
+
*/
|
|
26610
|
+
var LogChannelWindowPatchSchema = object({
|
|
26611
|
+
channel: string().min(1),
|
|
26612
|
+
armMs: number().int().min(0),
|
|
26613
|
+
/**
|
|
26614
|
+
* Narrow to these numeric device ids. Absent or `null` = every camera.
|
|
26615
|
+
*
|
|
26616
|
+
* Numeric because the repo's own rule makes it possible: every log line
|
|
26617
|
+
* about a device carries `tags: { deviceId }` with the numeric id. That rule
|
|
26618
|
+
* was paid for with a 22% thumbnail gap and a 3-hour media blackout both
|
|
26619
|
+
* diagnosed by hand, and this is the first thing that collects on it.
|
|
26620
|
+
*/
|
|
26621
|
+
deviceIds: array(number().int()).readonly().nullable().optional()
|
|
26622
|
+
});
|
|
26623
|
+
/**
|
|
26393
26624
|
* A PATCH, and patches MERGE.
|
|
26394
26625
|
*
|
|
26395
26626
|
* A field absent from the patch is left exactly as it was — arming a
|
|
@@ -26408,7 +26639,14 @@ var LoggingSettingsPatchSchema = object({
|
|
|
26408
26639
|
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
26409
26640
|
* keeps running — a patch is never a full replacement.
|
|
26410
26641
|
*/
|
|
26411
|
-
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
26642
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional(),
|
|
26643
|
+
/**
|
|
26644
|
+
* Only the channels NAMED here change. An armed channel that is not listed
|
|
26645
|
+
* keeps running — same rule as `diagnostics`, because a patch that silently
|
|
26646
|
+
* disarmed the channels it did not mention would make the Levels page and
|
|
26647
|
+
* the Diagnostics page fight over the same value.
|
|
26648
|
+
*/
|
|
26649
|
+
channels: array(LogChannelWindowPatchSchema).readonly().optional()
|
|
26412
26650
|
});
|
|
26413
26651
|
/**
|
|
26414
26652
|
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
@@ -26421,9 +26659,22 @@ var LoggingSettingsPatchSchema = object({
|
|
|
26421
26659
|
* authority over the whole hierarchy and answers for every layer, so the
|
|
26422
26660
|
* layer selector needs a name the transport does not already own.
|
|
26423
26661
|
*/
|
|
26424
|
-
var GetLoggingSettingsInputSchema = object({
|
|
26662
|
+
var GetLoggingSettingsInputSchema = object({
|
|
26663
|
+
scopeNodeId: string().optional(),
|
|
26664
|
+
/**
|
|
26665
|
+
* The declared CHANNEL this document is addressed at, when the caller wants
|
|
26666
|
+
* the `component` layer. Absent = the node/cluster hierarchy only.
|
|
26667
|
+
*
|
|
26668
|
+
* Naming it separately rather than overloading `scopeNodeId` keeps the two
|
|
26669
|
+
* axes from collapsing: a component level is cluster-wide, a node level is
|
|
26670
|
+
* not, and one selector for both would make "which of these two did I just
|
|
26671
|
+
* set" unanswerable — the exact ambiguity `explicit` exists to remove.
|
|
26672
|
+
*/
|
|
26673
|
+
scopeComponent: string().optional()
|
|
26674
|
+
});
|
|
26425
26675
|
var SetLoggingSettingsInputSchema = object({
|
|
26426
26676
|
scopeNodeId: string().optional(),
|
|
26677
|
+
scopeComponent: string().optional(),
|
|
26427
26678
|
patch: LoggingSettingsPatchSchema
|
|
26428
26679
|
});
|
|
26429
26680
|
/**
|
|
@@ -26438,9 +26689,20 @@ var SetLoggingSettingsInputSchema = object({
|
|
|
26438
26689
|
var LoggingSettingsStateSchema = object({
|
|
26439
26690
|
/** The layer this document was read at. `null` = the cluster layer. */
|
|
26440
26691
|
scopeNodeId: string().nullable(),
|
|
26692
|
+
/** The channel this document was read at. `null` = no component layer. */
|
|
26693
|
+
scopeComponent: string().nullable(),
|
|
26441
26694
|
effective: LoggingEffectiveSchema,
|
|
26442
26695
|
explicit: LoggingExplicitSchema,
|
|
26443
26696
|
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
26697
|
+
/**
|
|
26698
|
+
* Every channel the cluster's addons DECLARE, gathered from the
|
|
26699
|
+
* `log-channels` providers. Not stored anywhere: assembled per read, so a
|
|
26700
|
+
* channel added by a redeployed addon appears without anybody editing a
|
|
26701
|
+
* list, and a channel whose addon is gone stops being offered.
|
|
26702
|
+
*/
|
|
26703
|
+
channels: array(LogChannelDescriptorSchema).readonly(),
|
|
26704
|
+
/** The channels ARMED right now, each with its deadline. */
|
|
26705
|
+
activeChannels: array(LogChannelWindowStateSchema).readonly(),
|
|
26444
26706
|
persisted: boolean()
|
|
26445
26707
|
});
|
|
26446
26708
|
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(), {
|
|
@@ -28017,6 +28279,12 @@ Object.freeze({
|
|
|
28017
28279
|
addonId: null,
|
|
28018
28280
|
access: "view"
|
|
28019
28281
|
},
|
|
28282
|
+
"dataStoreProvider.aggregate": {
|
|
28283
|
+
capName: "data-store-provider",
|
|
28284
|
+
capScope: "system",
|
|
28285
|
+
addonId: null,
|
|
28286
|
+
access: "view"
|
|
28287
|
+
},
|
|
28020
28288
|
"dataStoreProvider.count": {
|
|
28021
28289
|
capName: "data-store-provider",
|
|
28022
28290
|
capScope: "system",
|
|
@@ -28431,6 +28699,12 @@ Object.freeze({
|
|
|
28431
28699
|
addonId: null,
|
|
28432
28700
|
access: "view"
|
|
28433
28701
|
},
|
|
28702
|
+
"deviceManager.getChildrenBatch": {
|
|
28703
|
+
capName: "device-manager",
|
|
28704
|
+
capScope: "system",
|
|
28705
|
+
addonId: null,
|
|
28706
|
+
access: "view"
|
|
28707
|
+
},
|
|
28434
28708
|
"deviceManager.getConfigSchema": {
|
|
28435
28709
|
capName: "device-manager",
|
|
28436
28710
|
capScope: "system",
|
|
@@ -29481,6 +29755,18 @@ Object.freeze({
|
|
|
29481
29755
|
addonId: null,
|
|
29482
29756
|
access: "create"
|
|
29483
29757
|
},
|
|
29758
|
+
"logChannels.apply": {
|
|
29759
|
+
capName: "log-channels",
|
|
29760
|
+
capScope: "system",
|
|
29761
|
+
addonId: null,
|
|
29762
|
+
access: "create"
|
|
29763
|
+
},
|
|
29764
|
+
"logChannels.list": {
|
|
29765
|
+
capName: "log-channels",
|
|
29766
|
+
capScope: "system",
|
|
29767
|
+
addonId: null,
|
|
29768
|
+
access: "view"
|
|
29769
|
+
},
|
|
29484
29770
|
"logDestination.query": {
|
|
29485
29771
|
capName: "log-destination",
|
|
29486
29772
|
capScope: "system",
|
|
@@ -31635,6 +31921,12 @@ Object.freeze({
|
|
|
31635
31921
|
addonId: null,
|
|
31636
31922
|
access: "create"
|
|
31637
31923
|
},
|
|
31924
|
+
"settingsStore.aggregate": {
|
|
31925
|
+
capName: "settings-store",
|
|
31926
|
+
capScope: "system",
|
|
31927
|
+
addonId: null,
|
|
31928
|
+
access: "view"
|
|
31929
|
+
},
|
|
31638
31930
|
"settingsStore.count": {
|
|
31639
31931
|
capName: "settings-store",
|
|
31640
31932
|
capScope: "system",
|
|
@@ -33214,6 +33506,11 @@ Object.freeze({
|
|
|
33214
33506
|
form: "single",
|
|
33215
33507
|
optional: false
|
|
33216
33508
|
}],
|
|
33509
|
+
"deviceManager.getChildrenBatch": [{
|
|
33510
|
+
name: "parentDeviceIds",
|
|
33511
|
+
form: "array",
|
|
33512
|
+
optional: false
|
|
33513
|
+
}],
|
|
33217
33514
|
"deviceManager.getConfigSchema": [{
|
|
33218
33515
|
name: "deviceId",
|
|
33219
33516
|
form: "single",
|
package/dist/webdav.addon.js
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_shared = require("./shared-
|
|
5
|
+
const require_shared = require("./shared-BkgFJ2q-.js");
|
|
6
6
|
let node_stream = require("node:stream");
|
|
7
7
|
let webdav = require("webdav");
|
|
8
8
|
//#region src/providers/webdav/webdav-config-schema.ts
|
package/dist/webdav.addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-
|
|
1
|
+
import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-JInb-Tpq.mjs";
|
|
2
2
|
import { PassThrough } from "node:stream";
|
|
3
3
|
import { AuthType, createClient } from "webdav";
|
|
4
4
|
//#region src/providers/webdav/webdav-config-schema.ts
|
package/package.json
CHANGED