@camstack/addon-pipeline 1.2.133 → 1.2.135
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{addon-utils-FV2O25id.js → addon-utils-CKf8kbwh.js} +1 -1
- package/dist/audio-analyzer/index.js +3 -3
- package/dist/audio-analyzer/index.mjs +2 -2
- package/dist/detection-pipeline/index.js +5 -5
- package/dist/detection-pipeline/index.mjs +3 -3
- package/dist/{dist-DsnZUYTs.js → dist-BzLiQ8Ue.js} +699 -30
- package/dist/{dist-7Uc6NdFm.mjs → dist-C1dXLLQq.mjs} +682 -31
- package/dist/{event-loop-stall-monitor-XzDMVU9d.mjs → event-loop-stall-monitor-CU-xxX5c.mjs} +1 -1
- package/dist/{event-loop-stall-monitor-D86J6d2c.js → event-loop-stall-monitor-DjV4Bow7.js} +1 -1
- package/dist/{lazy-sharp-UzEUL79V.js → lazy-sharp-DxWmhTqk.js} +1 -1
- package/dist/motion-wasm/index.js +2 -2
- package/dist/motion-wasm/index.mjs +1 -1
- package/dist/pipeline-runner/index.js +4 -4
- package/dist/pipeline-runner/index.mjs +3 -3
- package/dist/{process-memory-Co59RQIK.js → process-memory-CZK3D3kM.js} +1 -1
- package/dist/{process-memory-Ci90-zF_.mjs → process-memory-CaEwi5Cd.mjs} +1 -1
- package/dist/recorder/index.js +357 -327
- package/dist/recorder/index.mjs +356 -326
- package/dist/{segment-demux-js-DKcc0bxA.js → segment-demux-js-BbpqygHL.js} +1 -1
- package/dist/{segment-demux-js-0NZ9TXro.mjs → segment-demux-js-njRO85gd.mjs} +1 -1
- package/dist/session-decode/decode-worker-child.js +2 -2
- package/dist/session-decode/decode-worker-child.mjs +1 -1
- package/dist/stream-broker/_stub.js +2 -2
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-Dqj2f3H7.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-C14Qqrqn.mjs} +3 -3
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DqplWP1i.mjs +26 -0
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DKMXG57X.mjs +26 -0
- package/dist/stream-broker/demux-worker-child.js +1 -1
- package/dist/stream-broker/demux-worker-child.mjs +1 -1
- package/dist/stream-broker/{hostInit-DnwyBL4I.mjs → hostInit-kjsveCjG.mjs} +3 -3
- package/dist/stream-broker/index.js +105 -7
- package/dist/stream-broker/index.mjs +105 -7
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/dist/{worker-protocol-DzRUHIcM.js → worker-protocol-DvTZBvh2.js} +1 -1
- package/dist/{worker-protocol-CMDUAqvX.mjs → worker-protocol-DxsVx0G7.mjs} +1 -1
- package/package.json +4 -1
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CVBnNONy.mjs +0 -26
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-77rGxv1J.mjs +0 -26
|
@@ -8413,6 +8413,362 @@ var CameraSwitchGroupSchema = object({
|
|
|
8413
8413
|
fetchedAt: number()
|
|
8414
8414
|
});
|
|
8415
8415
|
/**
|
|
8416
|
+
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
8417
|
+
* an addon declares its channels in.
|
|
8418
|
+
*
|
|
8419
|
+
* ## Two axes, deliberately separated
|
|
8420
|
+
*
|
|
8421
|
+
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
8422
|
+
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
8423
|
+
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
8424
|
+
* and rots silently. So a channel is declared where it is consulted, and the
|
|
8425
|
+
* `log-channels` capability enumerates the declarations.
|
|
8426
|
+
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
8427
|
+
* thing: the logging settings document on the `system` cap. Two authorities
|
|
8428
|
+
* over the values is the exact defect
|
|
8429
|
+
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
8430
|
+
* remove; re-introducing it from the cure side would be grotesque.
|
|
8431
|
+
*
|
|
8432
|
+
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
8433
|
+
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
8434
|
+
* the hot path with a value somebody actually read, and by
|
|
8435
|
+
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
8436
|
+
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
8437
|
+
* disarmed one (D49).
|
|
8438
|
+
*
|
|
8439
|
+
* ## The canonical call shape
|
|
8440
|
+
*
|
|
8441
|
+
* ```ts
|
|
8442
|
+
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
8443
|
+
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
8444
|
+
* }
|
|
8445
|
+
* ```
|
|
8446
|
+
*
|
|
8447
|
+
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
8448
|
+
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
8449
|
+
* object literal is never constructed because it lives inside the branch. It
|
|
8450
|
+
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
8451
|
+
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
8452
|
+
* destination floor (measured at 1.93 ns/call when off).
|
|
8453
|
+
*
|
|
8454
|
+
* ## Why a channel emits at `info`
|
|
8455
|
+
*
|
|
8456
|
+
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
8457
|
+
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
8458
|
+
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
8459
|
+
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
8460
|
+
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
8461
|
+
* emits at the channel's declared level, whose schema floor is `info`.
|
|
8462
|
+
*/
|
|
8463
|
+
/**
|
|
8464
|
+
* The level a channel writes at once armed.
|
|
8465
|
+
*
|
|
8466
|
+
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
8467
|
+
* not leave the process for Loki, and the whole point of arming a channel is
|
|
8468
|
+
* to read it later.
|
|
8469
|
+
*/
|
|
8470
|
+
var LogChannelLevelSchema = _enum([
|
|
8471
|
+
"info",
|
|
8472
|
+
"warn",
|
|
8473
|
+
"error"
|
|
8474
|
+
]);
|
|
8475
|
+
/**
|
|
8476
|
+
* What an addon declares about one channel. No value, no state — a
|
|
8477
|
+
* declaration is inert.
|
|
8478
|
+
*/
|
|
8479
|
+
var LogChannelDescriptorSchema = object({
|
|
8480
|
+
/**
|
|
8481
|
+
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
8482
|
+
* the addon's short name so an operator reading a channel list can tell who
|
|
8483
|
+
* owns it without a second lookup.
|
|
8484
|
+
*/
|
|
8485
|
+
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
8486
|
+
/** One sentence: what the operator will SEE after arming it. */
|
|
8487
|
+
description: string().min(1),
|
|
8488
|
+
/** The level its lines are emitted at. Never below `info`. */
|
|
8489
|
+
defaultLevel: LogChannelLevelSchema,
|
|
8490
|
+
/**
|
|
8491
|
+
* Whether this channel can be narrowed to a camera.
|
|
8492
|
+
*
|
|
8493
|
+
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
8494
|
+
* consulted with the numeric device id, AND every line the channel admits
|
|
8495
|
+
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
8496
|
+
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
8497
|
+
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
8498
|
+
* the body is the only way to filter.
|
|
8499
|
+
*
|
|
8500
|
+
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
8501
|
+
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
8502
|
+
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
8503
|
+
* path was never taken.
|
|
8504
|
+
*/
|
|
8505
|
+
perDevice: boolean()
|
|
8506
|
+
});
|
|
8507
|
+
/**
|
|
8508
|
+
* An armed window over one channel, as the document hands it to a mirror.
|
|
8509
|
+
*
|
|
8510
|
+
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
8511
|
+
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
8512
|
+
*/
|
|
8513
|
+
var LogChannelWindowSchema = object({
|
|
8514
|
+
channel: string().min(1),
|
|
8515
|
+
/** Epoch ms the window closes at. */
|
|
8516
|
+
armedUntilMs: number(),
|
|
8517
|
+
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
8518
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
8519
|
+
});
|
|
8520
|
+
/**
|
|
8521
|
+
* The gate a hot path holds.
|
|
8522
|
+
*
|
|
8523
|
+
* Obtain it ONCE — at module scope or in a constructor — and keep the
|
|
8524
|
+
* reference. Looking a channel up by name per line would put a Map lookup on
|
|
8525
|
+
* the path this class exists to keep free.
|
|
8526
|
+
*/
|
|
8527
|
+
var LogChannelGate = class {
|
|
8528
|
+
descriptor;
|
|
8529
|
+
/**
|
|
8530
|
+
* HOT PATH GUARD. A plain data FIELD, and it must stay one.
|
|
8531
|
+
*
|
|
8532
|
+
* `log-channel.spec.ts` asserts the property descriptor has no getter and
|
|
8533
|
+
* booby-traps the device set, so turning this into an accessor — or reading
|
|
8534
|
+
* anything before it — fails the spec instead of taxing every line the
|
|
8535
|
+
* process emits.
|
|
8536
|
+
*/
|
|
8537
|
+
on = false;
|
|
8538
|
+
/** `null` while armed for every camera. Never read while `on` is false. */
|
|
8539
|
+
devices = null;
|
|
8540
|
+
level;
|
|
8541
|
+
closesAtMs = 0;
|
|
8542
|
+
constructor(descriptor) {
|
|
8543
|
+
this.descriptor = descriptor;
|
|
8544
|
+
this.level = descriptor.defaultLevel;
|
|
8545
|
+
}
|
|
8546
|
+
/** Epoch ms this channel disarms itself at. 0 when disarmed. */
|
|
8547
|
+
get armedUntilMs() {
|
|
8548
|
+
return this.on ? this.closesAtMs : 0;
|
|
8549
|
+
}
|
|
8550
|
+
/**
|
|
8551
|
+
* Does this channel want a line about `deviceId`?
|
|
8552
|
+
*
|
|
8553
|
+
* Call it only behind `gate.on &&`. On its own it is still correct — the
|
|
8554
|
+
* guard is repeated inside — but the point of the prefix is that a disarmed
|
|
8555
|
+
* channel must not pay the call at all.
|
|
8556
|
+
*/
|
|
8557
|
+
wants(deviceId) {
|
|
8558
|
+
if (!this.on) return false;
|
|
8559
|
+
return this.devices === null || this.devices.has(deviceId);
|
|
8560
|
+
}
|
|
8561
|
+
/**
|
|
8562
|
+
* Emit one line on this channel, at the channel's declared level.
|
|
8563
|
+
*
|
|
8564
|
+
* The channel name is added as `tags.logChannel` so LogQL can select the
|
|
8565
|
+
* channel without matching on the message text, and whatever `tags` the
|
|
8566
|
+
* caller passed — `deviceId` above all — is preserved.
|
|
8567
|
+
*/
|
|
8568
|
+
log(logger, message, extras) {
|
|
8569
|
+
if (!this.on) return;
|
|
8570
|
+
const tags = {
|
|
8571
|
+
...extras.tags,
|
|
8572
|
+
logChannel: this.descriptor.name
|
|
8573
|
+
};
|
|
8574
|
+
const line = {
|
|
8575
|
+
...extras,
|
|
8576
|
+
tags
|
|
8577
|
+
};
|
|
8578
|
+
if (this.level === "error") logger.error(message, line);
|
|
8579
|
+
else if (this.level === "warn") logger.warn(message, line);
|
|
8580
|
+
else logger.info(message, line);
|
|
8581
|
+
}
|
|
8582
|
+
/**
|
|
8583
|
+
* Arm (or RE-arm, restarting) this channel. Off the hot path only.
|
|
8584
|
+
*
|
|
8585
|
+
* An empty `deviceIds` list is treated as "every camera" rather than "no
|
|
8586
|
+
* camera": a window that matches nothing is indistinguishable from a
|
|
8587
|
+
* disarmed one, and the operator who asked for it would wait for lines that
|
|
8588
|
+
* can never come.
|
|
8589
|
+
*/
|
|
8590
|
+
arm(window) {
|
|
8591
|
+
const ids = window.deviceIds;
|
|
8592
|
+
this.devices = ids === null || ids.length === 0 ? null : new Set(ids);
|
|
8593
|
+
this.closesAtMs = window.armedUntilMs;
|
|
8594
|
+
this.on = true;
|
|
8595
|
+
}
|
|
8596
|
+
/** Disarm. Off the hot path only. */
|
|
8597
|
+
disarm() {
|
|
8598
|
+
this.on = false;
|
|
8599
|
+
this.devices = null;
|
|
8600
|
+
this.closesAtMs = 0;
|
|
8601
|
+
}
|
|
8602
|
+
};
|
|
8603
|
+
/**
|
|
8604
|
+
* Every channel this PROCESS declares, and the mirror of what is armed on it.
|
|
8605
|
+
*
|
|
8606
|
+
* One per process. A forked runner has its own, and it is refreshed through
|
|
8607
|
+
* the `log-channels` capability by the hub that owns the document — the
|
|
8608
|
+
* registry never reaches for a value itself.
|
|
8609
|
+
*/
|
|
8610
|
+
var LogChannelRegistry = class {
|
|
8611
|
+
gates = /* @__PURE__ */ new Map();
|
|
8612
|
+
/**
|
|
8613
|
+
* Declare a channel and get its gate.
|
|
8614
|
+
*
|
|
8615
|
+
* A duplicate name throws. Two declarations of one name is a programming
|
|
8616
|
+
* error, not a merge: the operator would arm one and the other would stay
|
|
8617
|
+
* dark, which is the dead-knob shape (D62) with an extra step.
|
|
8618
|
+
*/
|
|
8619
|
+
declare(descriptor) {
|
|
8620
|
+
const parsed = LogChannelDescriptorSchema.parse(descriptor);
|
|
8621
|
+
if (this.gates.get(parsed.name) !== void 0) throw new Error(`log channel "${parsed.name}" is already declared in this process — two declarations of one name is a programming error, not a merge`);
|
|
8622
|
+
const gate = new LogChannelGate(parsed);
|
|
8623
|
+
this.gates.set(parsed.name, gate);
|
|
8624
|
+
return gate;
|
|
8625
|
+
}
|
|
8626
|
+
/** The declarations, sorted by name so a list is stable to read and diff. */
|
|
8627
|
+
list() {
|
|
8628
|
+
return [...this.gates.values()].map((gate) => gate.descriptor).sort((a, b) => a.name.localeCompare(b.name));
|
|
8629
|
+
}
|
|
8630
|
+
/** The gate for a declared channel, or `undefined`. */
|
|
8631
|
+
gate(name) {
|
|
8632
|
+
return this.gates.get(name);
|
|
8633
|
+
}
|
|
8634
|
+
/**
|
|
8635
|
+
* Apply the FULL set of armed windows. Off the hot path.
|
|
8636
|
+
*
|
|
8637
|
+
* Full, not incremental, and that is the whole design: the document is the
|
|
8638
|
+
* authority, so a channel the document does not name is disarmed here. An
|
|
8639
|
+
* incremental apply would let a disarm get lost in transit and leave a
|
|
8640
|
+
* channel running that nobody can see is running.
|
|
8641
|
+
*
|
|
8642
|
+
* A window already past its deadline is ignored rather than armed — a
|
|
8643
|
+
* restore that re-armed an expired window would make a forgotten diagnostic
|
|
8644
|
+
* immortal across restarts.
|
|
8645
|
+
*
|
|
8646
|
+
* Returns the names it could not place, so the caller can log them: a
|
|
8647
|
+
* channel named in the document that this process does not declare is
|
|
8648
|
+
* either a typo or an addon that has not booted yet, and both deserve a
|
|
8649
|
+
* line rather than silence.
|
|
8650
|
+
*/
|
|
8651
|
+
apply(windows, nowMs) {
|
|
8652
|
+
const wanted = /* @__PURE__ */ new Map();
|
|
8653
|
+
const unknown = [];
|
|
8654
|
+
for (const window of windows) {
|
|
8655
|
+
if (window.armedUntilMs <= nowMs) continue;
|
|
8656
|
+
if (!this.gates.has(window.channel)) {
|
|
8657
|
+
unknown.push(window.channel);
|
|
8658
|
+
continue;
|
|
8659
|
+
}
|
|
8660
|
+
wanted.set(window.channel, window);
|
|
8661
|
+
}
|
|
8662
|
+
for (const [name, gate] of this.gates) {
|
|
8663
|
+
const window = wanted.get(name);
|
|
8664
|
+
if (window === void 0) gate.disarm();
|
|
8665
|
+
else gate.arm(window);
|
|
8666
|
+
}
|
|
8667
|
+
return unknown;
|
|
8668
|
+
}
|
|
8669
|
+
/**
|
|
8670
|
+
* Disarm whatever has run out. Called on a timer, NEVER from a log path — a
|
|
8671
|
+
* diagnostic that adds a `Date.now()` to the path it is measuring measures
|
|
8672
|
+
* itself.
|
|
8673
|
+
*
|
|
8674
|
+
* Returns the names it closed, so the caller can write the one line that
|
|
8675
|
+
* says a window ended and stops "it went quiet" from reading as "the branch
|
|
8676
|
+
* was not taken".
|
|
8677
|
+
*/
|
|
8678
|
+
tick(nowMs) {
|
|
8679
|
+
const closed = [];
|
|
8680
|
+
for (const [name, gate] of this.gates) if (gate.on && gate.armedUntilMs <= nowMs) {
|
|
8681
|
+
gate.disarm();
|
|
8682
|
+
closed.push(name);
|
|
8683
|
+
}
|
|
8684
|
+
return closed;
|
|
8685
|
+
}
|
|
8686
|
+
/** The channels armed right now, as the document would describe them. */
|
|
8687
|
+
armed() {
|
|
8688
|
+
const out = [];
|
|
8689
|
+
for (const [name, gate] of this.gates) if (gate.on) out.push({
|
|
8690
|
+
channel: name,
|
|
8691
|
+
armedUntilMs: gate.armedUntilMs,
|
|
8692
|
+
deviceIds: null
|
|
8693
|
+
});
|
|
8694
|
+
return out;
|
|
8695
|
+
}
|
|
8696
|
+
};
|
|
8697
|
+
/**
|
|
8698
|
+
* Process-wide holder for the {@link LogChannelRegistry}.
|
|
8699
|
+
*
|
|
8700
|
+
* Three call sites that never meet need the SAME instance: the hot paths that
|
|
8701
|
+
* declare a gate at module scope, the `log-channels` provider that enumerates
|
|
8702
|
+
* the declarations for the hub, and the same provider applying the windows the
|
|
8703
|
+
* document hands down. A registry built inside any one of them would be
|
|
8704
|
+
* refreshed and collected — the shape of a knob that never does anything.
|
|
8705
|
+
*
|
|
8706
|
+
* Same idiom as `logging-gate.singleton.ts` and
|
|
8707
|
+
* `http-request-census.singleton.ts`.
|
|
8708
|
+
*/
|
|
8709
|
+
var instance = null;
|
|
8710
|
+
/** The process-wide log channel registry. Created empty on first use. */
|
|
8711
|
+
function getLogChannelRegistry() {
|
|
8712
|
+
instance ??= new LogChannelRegistry();
|
|
8713
|
+
return instance;
|
|
8714
|
+
}
|
|
8715
|
+
/**
|
|
8716
|
+
* Declare a channel on the process-wide registry and get its gate.
|
|
8717
|
+
*
|
|
8718
|
+
* The one call an addon makes. Keep the returned gate in a module-scope
|
|
8719
|
+
* `const`: looking a channel up by name per line would put a Map lookup on
|
|
8720
|
+
* exactly the path this mechanism exists to keep free.
|
|
8721
|
+
*
|
|
8722
|
+
* `scripts/check-log-channel-gated.ts` reads these call sites. It pairs the
|
|
8723
|
+
* declared name with the binding it is assigned to and refuses to let a
|
|
8724
|
+
* channel ship that no `<binding>.on` anywhere consults — a declared channel
|
|
8725
|
+
* nobody reads is a knob the operator turns with nothing happening, forever,
|
|
8726
|
+
* and without a line. That is D62, and this repo has now shipped it three
|
|
8727
|
+
* times (`audioThresholdDbfs`, the HA entities with no source, the second
|
|
8728
|
+
* per-camera switch that wrote a store nobody read).
|
|
8729
|
+
*/
|
|
8730
|
+
function declareLogChannel(descriptor) {
|
|
8731
|
+
return getLogChannelRegistry().declare(descriptor);
|
|
8732
|
+
}
|
|
8733
|
+
/**
|
|
8734
|
+
* Build the `log-channels` provider for this process.
|
|
8735
|
+
*
|
|
8736
|
+
* `logger` is used ONLY off the hot path — for the arm/expiry lines — so a
|
|
8737
|
+
* channel that is never armed costs this module nothing but a timer.
|
|
8738
|
+
*/
|
|
8739
|
+
function createLogChannelsProvider(logger, options = {}) {
|
|
8740
|
+
const registry = getLogChannelRegistry();
|
|
8741
|
+
const now = options.now ?? Date.now;
|
|
8742
|
+
const tickMs = options.tickMs ?? 5e3;
|
|
8743
|
+
const timer = setInterval(() => {
|
|
8744
|
+
const closed = registry.tick(now());
|
|
8745
|
+
for (const name of closed) logger.info("log channel window closed", {
|
|
8746
|
+
tags: { logChannel: name },
|
|
8747
|
+
meta: { channel: name }
|
|
8748
|
+
});
|
|
8749
|
+
}, tickMs);
|
|
8750
|
+
timer.unref?.();
|
|
8751
|
+
return {
|
|
8752
|
+
list: () => registry.list(),
|
|
8753
|
+
apply: (input) => {
|
|
8754
|
+
const unknown = registry.apply(input.windows, now());
|
|
8755
|
+
const armed = registry.armed();
|
|
8756
|
+
logger.info("log channels applied", { meta: {
|
|
8757
|
+
armed: armed.map((window) => window.channel),
|
|
8758
|
+
unknown,
|
|
8759
|
+
declared: registry.list().length
|
|
8760
|
+
} });
|
|
8761
|
+
return {
|
|
8762
|
+
armed: armed.length,
|
|
8763
|
+
unknown
|
|
8764
|
+
};
|
|
8765
|
+
},
|
|
8766
|
+
stop: () => {
|
|
8767
|
+
clearInterval(timer);
|
|
8768
|
+
}
|
|
8769
|
+
};
|
|
8770
|
+
}
|
|
8771
|
+
/**
|
|
8416
8772
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
8417
8773
|
* recordings and events management surfaces.
|
|
8418
8774
|
*
|
|
@@ -12477,6 +12833,35 @@ var MutationFilterSchema = object({
|
|
|
12477
12833
|
whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
|
|
12478
12834
|
whereNot: record(string(), unknown()).optional()
|
|
12479
12835
|
});
|
|
12836
|
+
/**
|
|
12837
|
+
* One scalar an {@link settingsStoreCapability.methods.aggregate} call asks for.
|
|
12838
|
+
*
|
|
12839
|
+
* `as` names the slot in the result, so the SAME column may be asked twice with
|
|
12840
|
+
* two operations (`MIN(startMs)` and `MAX(startMs)` in one round trip) — which
|
|
12841
|
+
* a `Record<column, op>` shape could not express.
|
|
12842
|
+
*/
|
|
12843
|
+
var AggregateFieldSchema = object({
|
|
12844
|
+
/** Result key. */
|
|
12845
|
+
as: string().min(1),
|
|
12846
|
+
/** Column to aggregate. Must be a real column of a declared collection. */
|
|
12847
|
+
field: string().min(1),
|
|
12848
|
+
op: _enum([
|
|
12849
|
+
"sum",
|
|
12850
|
+
"min",
|
|
12851
|
+
"max"
|
|
12852
|
+
])
|
|
12853
|
+
});
|
|
12854
|
+
/**
|
|
12855
|
+
* `COUNT(*)` plus one number per requested field.
|
|
12856
|
+
*
|
|
12857
|
+
* `null` means NO ROW MATCHED, never zero: a `SUM` over an empty set and a sum
|
|
12858
|
+
* that really is 0 are different facts, and an accounting caller that renders
|
|
12859
|
+
* "0 bytes, oldest = 0" for "nothing here" reports a lie about a disk.
|
|
12860
|
+
*/
|
|
12861
|
+
var AggregateResultSchema = object({
|
|
12862
|
+
count: number().int(),
|
|
12863
|
+
values: record(string(), number().nullable())
|
|
12864
|
+
});
|
|
12480
12865
|
/** A single stored record: `{ id, data }`. */
|
|
12481
12866
|
var SettingsRecordSchema = object({
|
|
12482
12867
|
id: string(),
|
|
@@ -12561,6 +12946,11 @@ method(object({
|
|
|
12561
12946
|
collection: string(),
|
|
12562
12947
|
filter: QueryFilterSchema.optional()
|
|
12563
12948
|
}), number()), method(object({
|
|
12949
|
+
namespace: string().optional(),
|
|
12950
|
+
collection: string(),
|
|
12951
|
+
fields: array(AggregateFieldSchema).readonly(),
|
|
12952
|
+
filter: QueryFilterSchema.optional()
|
|
12953
|
+
}), AggregateResultSchema), method(object({
|
|
12564
12954
|
namespace: string().optional(),
|
|
12565
12955
|
collection: string(),
|
|
12566
12956
|
field: string(),
|
|
@@ -12677,6 +13067,11 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
|
|
|
12677
13067
|
collection: string(),
|
|
12678
13068
|
filter: QueryFilterSchema.optional()
|
|
12679
13069
|
}), number(), { auth: "admin" }), method(object({
|
|
13070
|
+
namespace: string().optional(),
|
|
13071
|
+
collection: string(),
|
|
13072
|
+
fields: array(AggregateFieldSchema).readonly(),
|
|
13073
|
+
filter: QueryFilterSchema.optional()
|
|
13074
|
+
}), AggregateResultSchema, { auth: "admin" }), method(object({
|
|
12680
13075
|
namespace: string().optional(),
|
|
12681
13076
|
collection: string(),
|
|
12682
13077
|
field: string(),
|
|
@@ -13269,24 +13664,6 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
|
|
|
13269
13664
|
kind: "mutation",
|
|
13270
13665
|
auth: "admin"
|
|
13271
13666
|
});
|
|
13272
|
-
/**
|
|
13273
|
-
* Device Manager capability — hub-side singleton that unifies device persistence,
|
|
13274
|
-
* live registry access, and all management operations into a single tRPC surface.
|
|
13275
|
-
*
|
|
13276
|
-
* Replaces:
|
|
13277
|
-
* - `device-persistence` capability (persistence methods absorbed here)
|
|
13278
|
-
* - `device-management.router.ts` (deleted in Phase 2)
|
|
13279
|
-
* - `device-ops.router.ts` (compat layer — deleted; device-provider ops absorbed here)
|
|
13280
|
-
*
|
|
13281
|
-
* All device provider addons (rtsp, onvif, frigate, …) are hub-local: they may
|
|
13282
|
-
* fork into separate processes but never run on remote cluster agents. Therefore:
|
|
13283
|
-
* - No nodeId routing needed — this is a pure hub singleton.
|
|
13284
|
-
* - The hub's DeviceRegistry is the single source of truth for all live devices.
|
|
13285
|
-
* - No shadow registry or cross-node aggregation required.
|
|
13286
|
-
*
|
|
13287
|
-
* Forked workers register devices back to the hub via `ctx.devices`
|
|
13288
|
-
* (DeviceManagerApi → ctx.api.deviceManager.registerDevice), same as today.
|
|
13289
|
-
*/
|
|
13290
13667
|
/** One child-placement directive on a container's `childLayout`. Structurally
|
|
13291
13668
|
* identical to `ChildLayoutEntry` in `device-management.ts` — the cap wire
|
|
13292
13669
|
* shape for the same field. The child is identified by its re-sync-stable
|
|
@@ -13655,7 +14032,7 @@ method(object({
|
|
|
13655
14032
|
* it answers today and the caller filters as it already does.
|
|
13656
14033
|
*/
|
|
13657
14034
|
deviceIds: array(number()).optional()
|
|
13658
|
-
}), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), object({
|
|
14035
|
+
}), 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({
|
|
13659
14036
|
mode: LinkedDevicesModeSchema,
|
|
13660
14037
|
devices: array(LinkedDeviceSchema)
|
|
13661
14038
|
})), 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({
|
|
@@ -14379,6 +14756,80 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
14379
14756
|
kind: "mutation",
|
|
14380
14757
|
auth: "admin"
|
|
14381
14758
|
});
|
|
14759
|
+
/**
|
|
14760
|
+
* `log-channels` — the capability an addon DECLARES its diagnostic channels
|
|
14761
|
+
* through. It stores nothing.
|
|
14762
|
+
*
|
|
14763
|
+
* ## Why a capability at all, and why this shape
|
|
14764
|
+
*
|
|
14765
|
+
* Which channels exist is knowledge only the addon has: `stream-broker` knows
|
|
14766
|
+
* webrtc/ICE/RTP, `provider-reolink` knows baichuan/handshake. A central list
|
|
14767
|
+
* maintained by hand rots at the first addition and rots INVISIBLY — nothing
|
|
14768
|
+
* fails, an operator just never sees the channel somebody added. So the list
|
|
14769
|
+
* is assembled from declarations at runtime.
|
|
14770
|
+
*
|
|
14771
|
+
* The shape is copied from `log-destination.cap.ts`, which already does
|
|
14772
|
+
* exactly this job: `mode: 'collection'`, `internal: true`,
|
|
14773
|
+
* `mount: { kind: 'skip' }` — no tRPC route, no generated hooks — while
|
|
14774
|
+
* `addons.listCapabilityProviders` still enumerates it, and the hub's
|
|
14775
|
+
* `CapabilityRegistry` still holds an RPC proxy per provider so a forked
|
|
14776
|
+
* runner's declarations reach hub-main over the transport that already exists.
|
|
14777
|
+
* No new UDS message, no second registry.
|
|
14778
|
+
*
|
|
14779
|
+
* ## What it deliberately does NOT own
|
|
14780
|
+
*
|
|
14781
|
+
* The VALUES — which channel is armed, for which cameras, until when — live in
|
|
14782
|
+
* ONE place: the logging settings document on the `system` cap
|
|
14783
|
+
* (`getLoggingSettings` / `setLoggingSettings`). Two authorities over the same
|
|
14784
|
+
* value is the defect the plan behind this work exists to remove, and
|
|
14785
|
+
* `setRequestCensus` was retired (D245) rather than allowed to be a second
|
|
14786
|
+
* one. {@link logChannelsCapability} therefore has no getter for a level, no
|
|
14787
|
+
* setter for a window and no persistence of any kind.
|
|
14788
|
+
*
|
|
14789
|
+
* ## Why `apply` is here even so
|
|
14790
|
+
*
|
|
14791
|
+
* The gate lives in the addon's PROCESS; the document lives in hub-main. Some
|
|
14792
|
+
* seam has to carry the value from the authority to the mirror, and a channel
|
|
14793
|
+
* that cannot be reached is precisely the dead knob this whole slice exists to
|
|
14794
|
+
* make impossible (D62 — `audioThresholdDbfs`, the HA entities with no source).
|
|
14795
|
+
* `apply` is that seam and nothing more: it writes an in-memory mirror, it
|
|
14796
|
+
* persists nothing, it is never the source of a value, and it is called only
|
|
14797
|
+
* with a set the hub actually read (D49 — a read that fails does not call it
|
|
14798
|
+
* at all, so no channel is silently disarmed by a bad read).
|
|
14799
|
+
*/
|
|
14800
|
+
/** What `apply` reports back — enough to log, not enough to be a second state. */
|
|
14801
|
+
var LogChannelApplyResultSchema = object({
|
|
14802
|
+
/** How many declared channels are armed in this process after the call. */
|
|
14803
|
+
armed: number().int().min(0),
|
|
14804
|
+
/**
|
|
14805
|
+
* Names the document armed that this process does not declare. Reported
|
|
14806
|
+
* rather than swallowed: a name here is either a typo or an addon that has
|
|
14807
|
+
* not booted, and both deserve a line instead of silence.
|
|
14808
|
+
*/
|
|
14809
|
+
unknown: array(string()).readonly()
|
|
14810
|
+
});
|
|
14811
|
+
var logChannelsCapability = {
|
|
14812
|
+
name: "log-channels",
|
|
14813
|
+
scope: "system",
|
|
14814
|
+
mode: "collection",
|
|
14815
|
+
internal: true,
|
|
14816
|
+
methods: {
|
|
14817
|
+
/** The channels this addon declares. Inert: no value, no state. */
|
|
14818
|
+
list: method(_void(), array(LogChannelDescriptorSchema).readonly()),
|
|
14819
|
+
/**
|
|
14820
|
+
* Refresh this process's mirror from the document's FULL set of armed
|
|
14821
|
+
* windows.
|
|
14822
|
+
*
|
|
14823
|
+
* Full and not incremental on purpose: the document is the authority, so a
|
|
14824
|
+
* channel it does not name is disarmed here. An incremental apply would
|
|
14825
|
+
* let a disarm get lost in transit and leave a channel running that
|
|
14826
|
+
* nobody can see is running.
|
|
14827
|
+
*/
|
|
14828
|
+
apply: method(object({ windows: array(LogChannelWindowSchema).readonly() }), LogChannelApplyResultSchema, { kind: "mutation" })
|
|
14829
|
+
},
|
|
14830
|
+
/** In-process only — enumerated through `addons.listCapabilityProviders`. */
|
|
14831
|
+
mount: { kind: "skip" }
|
|
14832
|
+
};
|
|
14382
14833
|
var LogLevelSchema = _enum([
|
|
14383
14834
|
"debug",
|
|
14384
14835
|
"info",
|
|
@@ -28631,17 +29082,60 @@ var SetSiteLocationInputSchema = object({
|
|
|
28631
29082
|
longitude: number().min(-180).max(180)
|
|
28632
29083
|
}).nullable();
|
|
28633
29084
|
/**
|
|
28634
|
-
*
|
|
29085
|
+
* The TRANSPORT a call arrived on.
|
|
29086
|
+
*
|
|
29087
|
+
* Every counted call carries exactly one of these, and `unknown` is a PLANE
|
|
29088
|
+
* rather than a gap: a plane that cannot attribute a call declares it here, so
|
|
29089
|
+
* the call lands in a named bucket instead of vanishing. `planes` summing to
|
|
29090
|
+
* `procedureCalls` is what makes "the sum of the planes explains the total"
|
|
29091
|
+
* checkable rather than asserted.
|
|
29092
|
+
*
|
|
29093
|
+
* - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
|
|
29094
|
+
* - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
|
|
29095
|
+
* connection; the viewer talks to the hub over `wsLink`
|
|
29096
|
+
* exclusively, so this is the plane the HTTP census could not see.
|
|
29097
|
+
* - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
|
|
29098
|
+
* never touches a socket and therefore never touched a census.
|
|
29099
|
+
* - `unknown` — counted, plane undecidable. No hook produces it today, and
|
|
29100
|
+
* that is exactly what its `0` asserts: every plane the hub has can name
|
|
29101
|
+
* itself. It is an output bucket, never a knob — a call that arrives on a
|
|
29102
|
+
* plane nobody instrumented lands here instead of vanishing from the total.
|
|
29103
|
+
*/
|
|
29104
|
+
var TransportPlaneSchema = _enum([
|
|
29105
|
+
"http",
|
|
29106
|
+
"ws",
|
|
29107
|
+
"mesh",
|
|
29108
|
+
"unknown"
|
|
29109
|
+
]);
|
|
29110
|
+
/**
|
|
29111
|
+
* Calls per plane. Every key is always present, `0` included — an absent plane
|
|
29112
|
+
* reads as "not instrumented", which is the one thing this census must never
|
|
29113
|
+
* make an operator wonder about.
|
|
29114
|
+
*/
|
|
29115
|
+
var TransportPlaneCountsSchema = object({
|
|
29116
|
+
http: number(),
|
|
29117
|
+
ws: number(),
|
|
29118
|
+
mesh: number(),
|
|
29119
|
+
unknown: number()
|
|
29120
|
+
});
|
|
29121
|
+
/**
|
|
29122
|
+
* One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
|
|
28635
29123
|
* census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
|
|
28636
29124
|
* `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
|
|
28637
29125
|
* already prints - never a token, never an `Authorization` header.
|
|
29126
|
+
*
|
|
29127
|
+
* `subscriptions` is counted APART from `calls`: a subscription is opened once
|
|
29128
|
+
* and lives for hours, so folding it into a call count makes one long-lived
|
|
29129
|
+
* stream look like a storm.
|
|
28638
29130
|
*/
|
|
28639
29131
|
var RequestCensusGroupSchema = object({
|
|
29132
|
+
plane: TransportPlaneSchema,
|
|
28640
29133
|
procedure: string(),
|
|
28641
29134
|
userAgent: string(),
|
|
28642
29135
|
ip: string(),
|
|
28643
29136
|
principal: string(),
|
|
28644
29137
|
calls: number(),
|
|
29138
|
+
subscriptions: number(),
|
|
28645
29139
|
perMin: number()
|
|
28646
29140
|
});
|
|
28647
29141
|
/**
|
|
@@ -28654,6 +29148,14 @@ var RequestCensusGroupSchema = object({
|
|
|
28654
29148
|
var RequestCensusProcedureSchema = object({
|
|
28655
29149
|
procedure: string(),
|
|
28656
29150
|
calls: number(),
|
|
29151
|
+
/**
|
|
29152
|
+
* The same total, split by transport. THIS is the row that answers the
|
|
29153
|
+
* question the census exists for: one look at `deviceManager.listAll` says
|
|
29154
|
+
* which plane carried the 4 960, without joining two log lines by eye.
|
|
29155
|
+
*/
|
|
29156
|
+
planes: TransportPlaneCountsSchema,
|
|
29157
|
+
/** Subscription STARTS on this procedure. Never folded into `calls`. */
|
|
29158
|
+
subscriptions: number(),
|
|
28657
29159
|
perMin: number()
|
|
28658
29160
|
});
|
|
28659
29161
|
/**
|
|
@@ -28681,14 +29183,45 @@ var RequestCensusStatusSchema = object({
|
|
|
28681
29183
|
*/
|
|
28682
29184
|
procedureCalls: number(),
|
|
28683
29185
|
/**
|
|
29186
|
+
* `procedureCalls` split by transport. The four keys sum to
|
|
29187
|
+
* `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
|
|
29188
|
+
* `planesExplainTotal` is that identity, checked rather than assumed.
|
|
29189
|
+
*/
|
|
29190
|
+
planes: TransportPlaneCountsSchema,
|
|
29191
|
+
/**
|
|
29192
|
+
* True iff `planes` sums to `procedureCalls`. False means a call was counted
|
|
29193
|
+
* on no plane at all - which is a RESULT (a plane is missing from the
|
|
29194
|
+
* instrument), not a failure, and it has to be visible to be read as one.
|
|
29195
|
+
*/
|
|
29196
|
+
planesExplainTotal: boolean(),
|
|
29197
|
+
/**
|
|
28684
29198
|
* tRPC WebSocket connections opened during the window. NOT calls - the WS
|
|
28685
|
-
*
|
|
28686
|
-
*
|
|
29199
|
+
* adapter resolves one context per connection - kept because a plane's call
|
|
29200
|
+
* count of zero against 37 open connections says something different from a
|
|
29201
|
+
* plane with no connections at all.
|
|
28687
29202
|
*/
|
|
28688
29203
|
wsConnections: number(),
|
|
29204
|
+
/**
|
|
29205
|
+
* Client frames the WS plane looked at. `wsMessages` far above
|
|
29206
|
+
* `planes.ws + subscriptions` means most traffic is not operations
|
|
29207
|
+
* (keepalives, connection params) - which is itself an answer.
|
|
29208
|
+
*/
|
|
29209
|
+
wsMessages: number(),
|
|
29210
|
+
/**
|
|
29211
|
+
* Subscription STARTS across every plane, excluded from `procedureCalls` on
|
|
29212
|
+
* purpose: one live-events stream opened at boot and held for six hours is
|
|
29213
|
+
* one subscription, and counting it as a call would let a quiet plane
|
|
29214
|
+
* masquerade as the storm.
|
|
29215
|
+
*/
|
|
29216
|
+
subscriptions: number(),
|
|
29217
|
+
/** `subscription.stop` frames. Starts minus stops is what is still open. */
|
|
29218
|
+
subscriptionStops: number(),
|
|
28689
29219
|
distinctGroups: number(),
|
|
28690
|
-
/**
|
|
28691
|
-
*
|
|
29220
|
+
/**
|
|
29221
|
+
* Operations counted in the totals whose CALLER attribution was shed at the
|
|
29222
|
+
* cardinality bound. Unrelated to the `unknown` PLANE: these calls know
|
|
29223
|
+
* which transport they arrived on, they just lost their group row.
|
|
29224
|
+
*/
|
|
28692
29225
|
unattributedCalls: number(),
|
|
28693
29226
|
procedures: array(RequestCensusProcedureSchema).readonly(),
|
|
28694
29227
|
groups: array(RequestCensusGroupSchema).readonly()
|
|
@@ -28711,10 +29244,11 @@ var DiagnosticIdSchema = _enum(["request-census"]);
|
|
|
28711
29244
|
* The layers of the level hierarchy, general → specific. The most specific
|
|
28712
29245
|
* layer that carries an explicit value wins.
|
|
28713
29246
|
*
|
|
28714
|
-
* `component`
|
|
28715
|
-
*
|
|
28716
|
-
*
|
|
28717
|
-
*
|
|
29247
|
+
* `component` became RESOLVABLE on 2026-08-27: a component is a declared log
|
|
29248
|
+
* CHANNEL (`stream-broker.webrtc`, `provider-reolink.baichuan`), named by
|
|
29249
|
+
* `scopeComponent`. It was declared-but-dark in the first slice precisely so
|
|
29250
|
+
* that turning it on would not force every consumer of this document to widen
|
|
29251
|
+
* a `levelSource` enum — which is what has now not happened.
|
|
28718
29252
|
*/
|
|
28719
29253
|
var LoggingScopeKindSchema = _enum([
|
|
28720
29254
|
"cluster",
|
|
@@ -28741,6 +29275,14 @@ var LoggingLevelLayerSchema = object({
|
|
|
28741
29275
|
scope: LoggingScopeKindSchema,
|
|
28742
29276
|
/** The node this layer speaks for; `null` on the cluster layer. */
|
|
28743
29277
|
nodeId: string().nullable(),
|
|
29278
|
+
/**
|
|
29279
|
+
* The declared channel this layer speaks for; `null` on every layer but
|
|
29280
|
+
* `component`. Never folded into `nodeId`: a component level is CLUSTER-WIDE
|
|
29281
|
+
* by design — the convention this repo settled on is one orchestrator-wide
|
|
29282
|
+
* setting, never per node (D52) — so a component layer that carried a node
|
|
29283
|
+
* would invite a per-node copy of a value that has no per-node meaning.
|
|
29284
|
+
*/
|
|
29285
|
+
component: string().nullable(),
|
|
28744
29286
|
/** Explicitly set here, or `null` when this layer inherits. */
|
|
28745
29287
|
level: LogLevelSchema$1.nullable()
|
|
28746
29288
|
});
|
|
@@ -28782,6 +29324,49 @@ var DiagnosticWindowPatchSchema = object({
|
|
|
28782
29324
|
reportEveryMs: number().int().positive().optional()
|
|
28783
29325
|
});
|
|
28784
29326
|
/**
|
|
29327
|
+
* A channel ARMED, as the document reports it.
|
|
29328
|
+
*
|
|
29329
|
+
* `armMs` is not echoed back: what an operator needs to see is the deadline
|
|
29330
|
+
* and the time left, because a diagnostic left running is itself an incident
|
|
29331
|
+
* and "armed for 10 minutes" said an hour ago is not an answer.
|
|
29332
|
+
*/
|
|
29333
|
+
var LogChannelWindowStateSchema = object({
|
|
29334
|
+
channel: string(),
|
|
29335
|
+
armed: boolean(),
|
|
29336
|
+
/** Epoch ms the window closes at. 0 when disarmed. */
|
|
29337
|
+
armedUntilMs: number(),
|
|
29338
|
+
/** Ms left before it expires on its own. 0 when disarmed. */
|
|
29339
|
+
remainingMs: number(),
|
|
29340
|
+
/**
|
|
29341
|
+
* The cameras it is narrowed to, or `null` for every camera.
|
|
29342
|
+
*
|
|
29343
|
+
* A channel declared `perDevice: false` can only ever report `null` here:
|
|
29344
|
+
* its lines do not carry `tags: { deviceId }`, so narrowing them would
|
|
29345
|
+
* produce a filter that silently matches nothing. The server REFUSES such a
|
|
29346
|
+
* patch rather than quietly widening it — ignoring the request would teach
|
|
29347
|
+
* the operator that per-camera filtering works on that channel when it does
|
|
29348
|
+
* not.
|
|
29349
|
+
*/
|
|
29350
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
29351
|
+
});
|
|
29352
|
+
/**
|
|
29353
|
+
* `armMs: 0` DISARMS. Same grammar as {@link DiagnosticWindowPatchSchema}, and
|
|
29354
|
+
* for the same reason: a channel is a window with a deadline, never a switch.
|
|
29355
|
+
*/
|
|
29356
|
+
var LogChannelWindowPatchSchema = object({
|
|
29357
|
+
channel: string().min(1),
|
|
29358
|
+
armMs: number().int().min(0),
|
|
29359
|
+
/**
|
|
29360
|
+
* Narrow to these numeric device ids. Absent or `null` = every camera.
|
|
29361
|
+
*
|
|
29362
|
+
* Numeric because the repo's own rule makes it possible: every log line
|
|
29363
|
+
* about a device carries `tags: { deviceId }` with the numeric id. That rule
|
|
29364
|
+
* was paid for with a 22% thumbnail gap and a 3-hour media blackout both
|
|
29365
|
+
* diagnosed by hand, and this is the first thing that collects on it.
|
|
29366
|
+
*/
|
|
29367
|
+
deviceIds: array(number().int()).readonly().nullable().optional()
|
|
29368
|
+
});
|
|
29369
|
+
/**
|
|
28785
29370
|
* A PATCH, and patches MERGE.
|
|
28786
29371
|
*
|
|
28787
29372
|
* A field absent from the patch is left exactly as it was — arming a
|
|
@@ -28800,7 +29385,14 @@ var LoggingSettingsPatchSchema = object({
|
|
|
28800
29385
|
* Only the diagnostics NAMED here change. An armed window that is not listed
|
|
28801
29386
|
* keeps running — a patch is never a full replacement.
|
|
28802
29387
|
*/
|
|
28803
|
-
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional()
|
|
29388
|
+
diagnostics: array(DiagnosticWindowPatchSchema).readonly().optional(),
|
|
29389
|
+
/**
|
|
29390
|
+
* Only the channels NAMED here change. An armed channel that is not listed
|
|
29391
|
+
* keeps running — same rule as `diagnostics`, because a patch that silently
|
|
29392
|
+
* disarmed the channels it did not mention would make the Levels page and
|
|
29393
|
+
* the Diagnostics page fight over the same value.
|
|
29394
|
+
*/
|
|
29395
|
+
channels: array(LogChannelWindowPatchSchema).readonly().optional()
|
|
28804
29396
|
});
|
|
28805
29397
|
/**
|
|
28806
29398
|
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
@@ -28813,9 +29405,22 @@ var LoggingSettingsPatchSchema = object({
|
|
|
28813
29405
|
* authority over the whole hierarchy and answers for every layer, so the
|
|
28814
29406
|
* layer selector needs a name the transport does not already own.
|
|
28815
29407
|
*/
|
|
28816
|
-
var GetLoggingSettingsInputSchema = object({
|
|
29408
|
+
var GetLoggingSettingsInputSchema = object({
|
|
29409
|
+
scopeNodeId: string().optional(),
|
|
29410
|
+
/**
|
|
29411
|
+
* The declared CHANNEL this document is addressed at, when the caller wants
|
|
29412
|
+
* the `component` layer. Absent = the node/cluster hierarchy only.
|
|
29413
|
+
*
|
|
29414
|
+
* Naming it separately rather than overloading `scopeNodeId` keeps the two
|
|
29415
|
+
* axes from collapsing: a component level is cluster-wide, a node level is
|
|
29416
|
+
* not, and one selector for both would make "which of these two did I just
|
|
29417
|
+
* set" unanswerable — the exact ambiguity `explicit` exists to remove.
|
|
29418
|
+
*/
|
|
29419
|
+
scopeComponent: string().optional()
|
|
29420
|
+
});
|
|
28817
29421
|
var SetLoggingSettingsInputSchema = object({
|
|
28818
29422
|
scopeNodeId: string().optional(),
|
|
29423
|
+
scopeComponent: string().optional(),
|
|
28819
29424
|
patch: LoggingSettingsPatchSchema
|
|
28820
29425
|
});
|
|
28821
29426
|
/**
|
|
@@ -28830,9 +29435,20 @@ var SetLoggingSettingsInputSchema = object({
|
|
|
28830
29435
|
var LoggingSettingsStateSchema = object({
|
|
28831
29436
|
/** The layer this document was read at. `null` = the cluster layer. */
|
|
28832
29437
|
scopeNodeId: string().nullable(),
|
|
29438
|
+
/** The channel this document was read at. `null` = no component layer. */
|
|
29439
|
+
scopeComponent: string().nullable(),
|
|
28833
29440
|
effective: LoggingEffectiveSchema,
|
|
28834
29441
|
explicit: LoggingExplicitSchema,
|
|
28835
29442
|
activeWindows: array(DiagnosticWindowSchema).readonly(),
|
|
29443
|
+
/**
|
|
29444
|
+
* Every channel the cluster's addons DECLARE, gathered from the
|
|
29445
|
+
* `log-channels` providers. Not stored anywhere: assembled per read, so a
|
|
29446
|
+
* channel added by a redeployed addon appears without anybody editing a
|
|
29447
|
+
* list, and a channel whose addon is gone stops being offered.
|
|
29448
|
+
*/
|
|
29449
|
+
channels: array(LogChannelDescriptorSchema).readonly(),
|
|
29450
|
+
/** The channels ARMED right now, each with its deadline. */
|
|
29451
|
+
activeChannels: array(LogChannelWindowStateSchema).readonly(),
|
|
28836
29452
|
persisted: boolean()
|
|
28837
29453
|
});
|
|
28838
29454
|
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(), {
|
|
@@ -30568,6 +31184,12 @@ Object.freeze({
|
|
|
30568
31184
|
addonId: null,
|
|
30569
31185
|
access: "view"
|
|
30570
31186
|
},
|
|
31187
|
+
"dataStoreProvider.aggregate": {
|
|
31188
|
+
capName: "data-store-provider",
|
|
31189
|
+
capScope: "system",
|
|
31190
|
+
addonId: null,
|
|
31191
|
+
access: "view"
|
|
31192
|
+
},
|
|
30571
31193
|
"dataStoreProvider.count": {
|
|
30572
31194
|
capName: "data-store-provider",
|
|
30573
31195
|
capScope: "system",
|
|
@@ -30982,6 +31604,12 @@ Object.freeze({
|
|
|
30982
31604
|
addonId: null,
|
|
30983
31605
|
access: "view"
|
|
30984
31606
|
},
|
|
31607
|
+
"deviceManager.getChildrenBatch": {
|
|
31608
|
+
capName: "device-manager",
|
|
31609
|
+
capScope: "system",
|
|
31610
|
+
addonId: null,
|
|
31611
|
+
access: "view"
|
|
31612
|
+
},
|
|
30985
31613
|
"deviceManager.getConfigSchema": {
|
|
30986
31614
|
capName: "device-manager",
|
|
30987
31615
|
capScope: "system",
|
|
@@ -32032,6 +32660,18 @@ Object.freeze({
|
|
|
32032
32660
|
addonId: null,
|
|
32033
32661
|
access: "create"
|
|
32034
32662
|
},
|
|
32663
|
+
"logChannels.apply": {
|
|
32664
|
+
capName: "log-channels",
|
|
32665
|
+
capScope: "system",
|
|
32666
|
+
addonId: null,
|
|
32667
|
+
access: "create"
|
|
32668
|
+
},
|
|
32669
|
+
"logChannels.list": {
|
|
32670
|
+
capName: "log-channels",
|
|
32671
|
+
capScope: "system",
|
|
32672
|
+
addonId: null,
|
|
32673
|
+
access: "view"
|
|
32674
|
+
},
|
|
32035
32675
|
"logDestination.query": {
|
|
32036
32676
|
capName: "log-destination",
|
|
32037
32677
|
capScope: "system",
|
|
@@ -34186,6 +34826,12 @@ Object.freeze({
|
|
|
34186
34826
|
addonId: null,
|
|
34187
34827
|
access: "create"
|
|
34188
34828
|
},
|
|
34829
|
+
"settingsStore.aggregate": {
|
|
34830
|
+
capName: "settings-store",
|
|
34831
|
+
capScope: "system",
|
|
34832
|
+
addonId: null,
|
|
34833
|
+
access: "view"
|
|
34834
|
+
},
|
|
34189
34835
|
"settingsStore.count": {
|
|
34190
34836
|
capName: "settings-store",
|
|
34191
34837
|
capScope: "system",
|
|
@@ -35765,6 +36411,11 @@ Object.freeze({
|
|
|
35765
36411
|
form: "single",
|
|
35766
36412
|
optional: false
|
|
35767
36413
|
}],
|
|
36414
|
+
"deviceManager.getChildrenBatch": [{
|
|
36415
|
+
name: "parentDeviceIds",
|
|
36416
|
+
form: "array",
|
|
36417
|
+
optional: false
|
|
36418
|
+
}],
|
|
35768
36419
|
"deviceManager.getConfigSchema": [{
|
|
35769
36420
|
name: "deviceId",
|
|
35770
36421
|
form: "single",
|
|
@@ -38816,4 +39467,4 @@ function enumerateInferenceDevices(hw) {
|
|
|
38816
39467
|
return out;
|
|
38817
39468
|
}
|
|
38818
39469
|
//#endregion
|
|
38819
|
-
export {
|
|
39470
|
+
export { logChannelsCapability as $, EventCategory as $t, audioAnalysisCapability as A, DeviceFeature as At, defineCustomActions as B, selectAssignedProfileSlots as Bt, RATE_CONTROL_RELAXED as C, AUDIO_PRESETS as Ct, RingBuffer as D, isSoftwareDecode as Dt, RecordingConfigSchema as E, invocationFromEncodeProfile as Et, createHwAccelCache as F, makeProfileBrokerId as Ft, egressTranscodeSharingKey as G, discriminatedUnion as Gt, deriveDetailCropRect as H, _enum as Ht, createLogChannelsProvider as I, makeSourceBrokerId as It, evaluateSensorEdge as J, number as Jt, egressTransportFromRequest as K, lazy as Kt, customAction as L, nodePin as Lt, audioKindId as M, createEvent as Mt, batteryCapability as N, hydrateSchema as Nt, YAMNET_TO_MACRO as O, BaseAddon as Ot, cameraStreamsCapability as P, isEvent as Pt, isFirstLevelMacroClass as Q, union as Qt, declareLogChannel as R, parseJsonUnknown as Rt, PoolMemoryWatchdog as S, errMsg as St, RECORDING_EXPORT_MAX_READ_BYTES as T, buildFfmpegArgs as Tt, deriveRecordingMode as U, array as Ut, deriveBatteryPresence as V, sleep as Vt, detectionPipelineCapability as W, boolean as Wt, hfModelUrl as X, record as Xt, evaluateZoneRules as Y, object as Yt, inferModelProvider as Z, string as Zt, ExportRecordSchema as _, runtimeDevices as _t, COCO_80_LABELS as a, pickClusterStepModels as at, NativeLeaseSettingsSchema as b, supportedRuntimes as bt, DEFAULT_CLUSTER_STEP_MODELS as c, pickNativeLeaseOverride as ct, DEFAULT_EVENTS_BAND_BUFFER_SEC as d, recordingCapability as dt, mapAudioLabelToMacro as et, DEFAULT_FIRST_SIGHTING_FRESHNESS_MS as f, recordingExportCapability as ft, EncodeProfileSchema as g, resolveRecordingProfiles as gt, EVENT_PAD_MS as h, resolvePoolMemoryPolicy as ht, BatteryStatusSchema as i, parseProcStatus as it, audioAnalyzerCapability as j, DeviceType as jt, addonWidgetsSourceCapability as k, CAM_PROFILE_ORDER as kt, DEFAULT_CLUSTER_STEP_SETTINGS as l, pipelineExecutorCapability as lt, DEVICE_BACKEND_TO_FORMAT as m, resolveEgressDecodeHwAccel as mt, AUDIO_BACKEND_CHOICES as n, motionDetectionCapability as nt, COCO_TO_MACRO as o, pickClusterStepSettings as ot, DEFAULT_NATIVE_LEASE_SETTINGS as p, resolveClusterStepModelId as pt, enumerateInferenceDevices as q, literal as qt, AUDIO_MACRO_LABELS as r, overlayClusterStepSettings as rt, DEFAULT_AUDIO_ANALYZER_CONFIG as s, pickDetailCropConvention as st, APPLE_SA_TO_MACRO as t, maskUrlCredentials as tt, DEFAULT_DETAIL_CROP_CONVENTION as u, pipelineRunnerCapability as ut, HF_BASE_URL as v, storageEvictableCapability as vt, RATE_CONTROL_TIGHT as w, Fmp4BoxSplitter as wt, OpsLogEntrySchema as x, webrtcSessionCapability as xt, NativeLeaseAdmissionSchema as y, streamBrokerCapability as yt, defaultDeviceFor as z, parseProfileBrokerId as zt };
|