@camstack/addon-notifiers 1.2.82 → 1.2.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +125 -127
- package/dist/addon.mjs +125 -127
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -7748,111 +7748,6 @@ var CameraSwitchGroupSchema = object({
|
|
|
7748
7748
|
fetchedAt: number()
|
|
7749
7749
|
});
|
|
7750
7750
|
/**
|
|
7751
|
-
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
7752
|
-
* an addon declares its channels in.
|
|
7753
|
-
*
|
|
7754
|
-
* ## Two axes, deliberately separated
|
|
7755
|
-
*
|
|
7756
|
-
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
7757
|
-
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
7758
|
-
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
7759
|
-
* and rots silently. So a channel is declared where it is consulted, and the
|
|
7760
|
-
* `log-channels` capability enumerates the declarations.
|
|
7761
|
-
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
7762
|
-
* thing: the logging settings document on the `system` cap. Two authorities
|
|
7763
|
-
* over the values is the exact defect
|
|
7764
|
-
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
7765
|
-
* remove; re-introducing it from the cure side would be grotesque.
|
|
7766
|
-
*
|
|
7767
|
-
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
7768
|
-
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
7769
|
-
* the hot path with a value somebody actually read, and by
|
|
7770
|
-
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
7771
|
-
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
7772
|
-
* disarmed one (D49).
|
|
7773
|
-
*
|
|
7774
|
-
* ## The canonical call shape
|
|
7775
|
-
*
|
|
7776
|
-
* ```ts
|
|
7777
|
-
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
7778
|
-
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
7779
|
-
* }
|
|
7780
|
-
* ```
|
|
7781
|
-
*
|
|
7782
|
-
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
7783
|
-
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
7784
|
-
* object literal is never constructed because it lives inside the branch. It
|
|
7785
|
-
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
7786
|
-
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
7787
|
-
* destination floor (measured at 1.93 ns/call when off).
|
|
7788
|
-
*
|
|
7789
|
-
* ## Why a channel emits at `info`
|
|
7790
|
-
*
|
|
7791
|
-
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
7792
|
-
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
7793
|
-
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
7794
|
-
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
7795
|
-
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
7796
|
-
* emits at the channel's declared level, whose schema floor is `info`.
|
|
7797
|
-
*/
|
|
7798
|
-
/**
|
|
7799
|
-
* The level a channel writes at once armed.
|
|
7800
|
-
*
|
|
7801
|
-
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
7802
|
-
* not leave the process for Loki, and the whole point of arming a channel is
|
|
7803
|
-
* to read it later.
|
|
7804
|
-
*/
|
|
7805
|
-
var LogChannelLevelSchema = _enum([
|
|
7806
|
-
"info",
|
|
7807
|
-
"warn",
|
|
7808
|
-
"error"
|
|
7809
|
-
]);
|
|
7810
|
-
/**
|
|
7811
|
-
* What an addon declares about one channel. No value, no state — a
|
|
7812
|
-
* declaration is inert.
|
|
7813
|
-
*/
|
|
7814
|
-
var LogChannelDescriptorSchema = object({
|
|
7815
|
-
/**
|
|
7816
|
-
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
7817
|
-
* the addon's short name so an operator reading a channel list can tell who
|
|
7818
|
-
* owns it without a second lookup.
|
|
7819
|
-
*/
|
|
7820
|
-
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
7821
|
-
/** One sentence: what the operator will SEE after arming it. */
|
|
7822
|
-
description: string().min(1),
|
|
7823
|
-
/** The level its lines are emitted at. Never below `info`. */
|
|
7824
|
-
defaultLevel: LogChannelLevelSchema,
|
|
7825
|
-
/**
|
|
7826
|
-
* Whether this channel can be narrowed to a camera.
|
|
7827
|
-
*
|
|
7828
|
-
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
7829
|
-
* consulted with the numeric device id, AND every line the channel admits
|
|
7830
|
-
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
7831
|
-
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
7832
|
-
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
7833
|
-
* the body is the only way to filter.
|
|
7834
|
-
*
|
|
7835
|
-
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
7836
|
-
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
7837
|
-
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
7838
|
-
* path was never taken.
|
|
7839
|
-
*/
|
|
7840
|
-
perDevice: boolean()
|
|
7841
|
-
});
|
|
7842
|
-
/**
|
|
7843
|
-
* An armed window over one channel, as the document hands it to a mirror.
|
|
7844
|
-
*
|
|
7845
|
-
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
7846
|
-
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
7847
|
-
*/
|
|
7848
|
-
var LogChannelWindowSchema = object({
|
|
7849
|
-
channel: string().min(1),
|
|
7850
|
-
/** Epoch ms the window closes at. */
|
|
7851
|
-
armedUntilMs: number(),
|
|
7852
|
-
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
7853
|
-
deviceIds: array(number().int()).readonly().nullable()
|
|
7854
|
-
});
|
|
7855
|
-
/**
|
|
7856
7751
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
7857
7752
|
* recordings and events management surfaces.
|
|
7858
7753
|
*
|
|
@@ -8798,8 +8693,11 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
|
|
|
8798
8693
|
* `STORAGE_LOCATION_CARDINALITY` map has been removed.
|
|
8799
8694
|
*
|
|
8800
8695
|
* `id` is a stable namespaced string of the form `<type>:<slug>`.
|
|
8801
|
-
* The
|
|
8802
|
-
*
|
|
8696
|
+
* The seed names its first instance `<type>:default` — a NAME, not a flag.
|
|
8697
|
+
* There is no default location any more (D383): `enabled` is the whole write
|
|
8698
|
+
* model, and a bare type ref resolves to the sole location of the type, or —
|
|
8699
|
+
* transitionally, only while legacy NULL-stamped rows exist — to the row whose
|
|
8700
|
+
* slug is `default`.
|
|
8803
8701
|
*
|
|
8804
8702
|
* `isSystem` is a legacy persisted flag. Seed still creates the initial
|
|
8805
8703
|
* `<type>:default` locations; the flag is no longer a lock, a badge, or a
|
|
@@ -8820,21 +8718,20 @@ var StorageLocationSchema = object({
|
|
|
8820
8718
|
* flag at upsert time, not here (the schema is provider-agnostic).
|
|
8821
8719
|
*/
|
|
8822
8720
|
nodeId: string().optional(),
|
|
8823
|
-
isDefault: boolean().default(false),
|
|
8824
8721
|
isSystem: boolean().default(false),
|
|
8825
8722
|
/**
|
|
8826
|
-
*
|
|
8827
|
-
*
|
|
8828
|
-
*
|
|
8829
|
-
*
|
|
8830
|
-
*
|
|
8723
|
+
* THE write switch, and the only one (D383). `enabled: true` means every
|
|
8724
|
+
* consumer that chooses a write target for this type may write here, and all
|
|
8725
|
+
* enabled locations of a type are used TOGETHER; `false` means read-only —
|
|
8726
|
+
* still read, still played back, still age-swept, still drained, never
|
|
8727
|
+
* written.
|
|
8831
8728
|
*
|
|
8832
|
-
* OPTIONAL
|
|
8833
|
-
*
|
|
8834
|
-
*
|
|
8835
|
-
*
|
|
8836
|
-
*
|
|
8837
|
-
*
|
|
8729
|
+
* OPTIONAL only for the wire: an upsert that omits it means "leave what is
|
|
8730
|
+
* stored" on an update and "born inert unless it is the first location of its
|
|
8731
|
+
* type" on a create. On a PERSISTED row absence is legacy and it means
|
|
8732
|
+
* enabled — {@link isLocationEnabled} is the one place that says so, and the
|
|
8733
|
+
* orchestrator stamps every flagless row `true` once at hydrate so absence
|
|
8734
|
+
* stops existing rather than being re-derived on every read.
|
|
8838
8735
|
*/
|
|
8839
8736
|
enabled: boolean().optional(),
|
|
8840
8737
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
@@ -8847,10 +8744,12 @@ var StorageLocationSchema = object({
|
|
|
8847
8744
|
createdAt: number(),
|
|
8848
8745
|
updatedAt: number()
|
|
8849
8746
|
});
|
|
8747
|
+
object({ isDefault: boolean().optional() });
|
|
8850
8748
|
/**
|
|
8851
8749
|
* Reference accepted by consumer-facing `api.storage.*` calls.
|
|
8852
8750
|
* Either:
|
|
8853
|
-
* - a `StorageLocationType` (e.g. `'backups'`) →
|
|
8751
|
+
* - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
|
|
8752
|
+
* (transitionally, the `<type>:default`-slugged row when several exist)
|
|
8854
8753
|
* - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
|
|
8855
8754
|
*
|
|
8856
8755
|
* The orchestrator's `resolveRef(ref)` handles both cases.
|
|
@@ -9026,6 +8925,111 @@ var DecoderSessionConfigSchema = object({
|
|
|
9026
8925
|
*/
|
|
9027
8926
|
debug: boolean().optional()
|
|
9028
8927
|
});
|
|
8928
|
+
/**
|
|
8929
|
+
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
8930
|
+
* an addon declares its channels in.
|
|
8931
|
+
*
|
|
8932
|
+
* ## Two axes, deliberately separated
|
|
8933
|
+
*
|
|
8934
|
+
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
8935
|
+
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
8936
|
+
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
8937
|
+
* and rots silently. So a channel is declared where it is consulted, and the
|
|
8938
|
+
* `log-channels` capability enumerates the declarations.
|
|
8939
|
+
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
8940
|
+
* thing: the logging settings document on the `system` cap. Two authorities
|
|
8941
|
+
* over the values is the exact defect
|
|
8942
|
+
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
8943
|
+
* remove; re-introducing it from the cure side would be grotesque.
|
|
8944
|
+
*
|
|
8945
|
+
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
8946
|
+
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
8947
|
+
* the hot path with a value somebody actually read, and by
|
|
8948
|
+
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
8949
|
+
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
8950
|
+
* disarmed one (D49).
|
|
8951
|
+
*
|
|
8952
|
+
* ## The canonical call shape
|
|
8953
|
+
*
|
|
8954
|
+
* ```ts
|
|
8955
|
+
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
8956
|
+
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
8957
|
+
* }
|
|
8958
|
+
* ```
|
|
8959
|
+
*
|
|
8960
|
+
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
8961
|
+
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
8962
|
+
* object literal is never constructed because it lives inside the branch. It
|
|
8963
|
+
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
8964
|
+
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
8965
|
+
* destination floor (measured at 1.93 ns/call when off).
|
|
8966
|
+
*
|
|
8967
|
+
* ## Why a channel emits at `info`
|
|
8968
|
+
*
|
|
8969
|
+
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
8970
|
+
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
8971
|
+
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
8972
|
+
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
8973
|
+
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
8974
|
+
* emits at the channel's declared level, whose schema floor is `info`.
|
|
8975
|
+
*/
|
|
8976
|
+
/**
|
|
8977
|
+
* The level a channel writes at once armed.
|
|
8978
|
+
*
|
|
8979
|
+
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
8980
|
+
* not leave the process for Loki, and the whole point of arming a channel is
|
|
8981
|
+
* to read it later.
|
|
8982
|
+
*/
|
|
8983
|
+
var LogChannelLevelSchema = _enum([
|
|
8984
|
+
"info",
|
|
8985
|
+
"warn",
|
|
8986
|
+
"error"
|
|
8987
|
+
]);
|
|
8988
|
+
/**
|
|
8989
|
+
* What an addon declares about one channel. No value, no state — a
|
|
8990
|
+
* declaration is inert.
|
|
8991
|
+
*/
|
|
8992
|
+
var LogChannelDescriptorSchema = object({
|
|
8993
|
+
/**
|
|
8994
|
+
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
8995
|
+
* the addon's short name so an operator reading a channel list can tell who
|
|
8996
|
+
* owns it without a second lookup.
|
|
8997
|
+
*/
|
|
8998
|
+
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
8999
|
+
/** One sentence: what the operator will SEE after arming it. */
|
|
9000
|
+
description: string().min(1),
|
|
9001
|
+
/** The level its lines are emitted at. Never below `info`. */
|
|
9002
|
+
defaultLevel: LogChannelLevelSchema,
|
|
9003
|
+
/**
|
|
9004
|
+
* Whether this channel can be narrowed to a camera.
|
|
9005
|
+
*
|
|
9006
|
+
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
9007
|
+
* consulted with the numeric device id, AND every line the channel admits
|
|
9008
|
+
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
9009
|
+
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
9010
|
+
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
9011
|
+
* the body is the only way to filter.
|
|
9012
|
+
*
|
|
9013
|
+
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
9014
|
+
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
9015
|
+
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
9016
|
+
* path was never taken.
|
|
9017
|
+
*/
|
|
9018
|
+
perDevice: boolean()
|
|
9019
|
+
});
|
|
9020
|
+
/**
|
|
9021
|
+
* An armed window over one channel, as the document hands it to a mirror.
|
|
9022
|
+
*
|
|
9023
|
+
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
9024
|
+
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
9025
|
+
*/
|
|
9026
|
+
var LogChannelWindowSchema = object({
|
|
9027
|
+
channel: string().min(1),
|
|
9028
|
+
/** Epoch ms the window closes at. */
|
|
9029
|
+
armedUntilMs: number(),
|
|
9030
|
+
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
9031
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
9032
|
+
});
|
|
9029
9033
|
var MODEL_FORMATS = [
|
|
9030
9034
|
"onnx",
|
|
9031
9035
|
"coreml",
|
|
@@ -21745,7 +21749,7 @@ method(object({
|
|
|
21745
21749
|
downloadId: string(),
|
|
21746
21750
|
offset: number(),
|
|
21747
21751
|
length: number()
|
|
21748
|
-
}), _instanceof(Uint8Array)), method(object({ downloadId: string() }), _void(), { kind: "mutation" }), method(object({ type: StorageLocationTypeSchema.optional() }), array(StorageLocationSchema).readonly()), method(
|
|
21752
|
+
}), _instanceof(Uint8Array)), method(object({ downloadId: string() }), _void(), { kind: "mutation" }), method(object({ type: StorageLocationTypeSchema.optional() }), array(StorageLocationSchema).readonly()), method(_void(), array(StorageLocationDeclarationSchema).readonly()), method(StorageLocationSchema.omit({
|
|
21749
21753
|
createdAt: true,
|
|
21750
21754
|
updatedAt: true
|
|
21751
21755
|
}), StorageLocationSchema, {
|
|
@@ -34594,12 +34598,6 @@ Object.freeze({
|
|
|
34594
34598
|
addonId: null,
|
|
34595
34599
|
access: "view"
|
|
34596
34600
|
},
|
|
34597
|
-
"storage.getDefaultLocation": {
|
|
34598
|
-
capName: "storage",
|
|
34599
|
-
capScope: "system",
|
|
34600
|
-
addonId: null,
|
|
34601
|
-
access: "view"
|
|
34602
|
-
},
|
|
34603
34601
|
"storage.list": {
|
|
34604
34602
|
capName: "storage",
|
|
34605
34603
|
capScope: "system",
|
package/dist/addon.mjs
CHANGED
|
@@ -7721,111 +7721,6 @@ var CameraSwitchGroupSchema = object({
|
|
|
7721
7721
|
fetchedAt: number()
|
|
7722
7722
|
});
|
|
7723
7723
|
/**
|
|
7724
|
-
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
7725
|
-
* an addon declares its channels in.
|
|
7726
|
-
*
|
|
7727
|
-
* ## Two axes, deliberately separated
|
|
7728
|
-
*
|
|
7729
|
-
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
7730
|
-
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
7731
|
-
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
7732
|
-
* and rots silently. So a channel is declared where it is consulted, and the
|
|
7733
|
-
* `log-channels` capability enumerates the declarations.
|
|
7734
|
-
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
7735
|
-
* thing: the logging settings document on the `system` cap. Two authorities
|
|
7736
|
-
* over the values is the exact defect
|
|
7737
|
-
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
7738
|
-
* remove; re-introducing it from the cure side would be grotesque.
|
|
7739
|
-
*
|
|
7740
|
-
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
7741
|
-
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
7742
|
-
* the hot path with a value somebody actually read, and by
|
|
7743
|
-
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
7744
|
-
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
7745
|
-
* disarmed one (D49).
|
|
7746
|
-
*
|
|
7747
|
-
* ## The canonical call shape
|
|
7748
|
-
*
|
|
7749
|
-
* ```ts
|
|
7750
|
-
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
7751
|
-
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
7752
|
-
* }
|
|
7753
|
-
* ```
|
|
7754
|
-
*
|
|
7755
|
-
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
7756
|
-
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
7757
|
-
* object literal is never constructed because it lives inside the branch. It
|
|
7758
|
-
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
7759
|
-
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
7760
|
-
* destination floor (measured at 1.93 ns/call when off).
|
|
7761
|
-
*
|
|
7762
|
-
* ## Why a channel emits at `info`
|
|
7763
|
-
*
|
|
7764
|
-
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
7765
|
-
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
7766
|
-
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
7767
|
-
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
7768
|
-
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
7769
|
-
* emits at the channel's declared level, whose schema floor is `info`.
|
|
7770
|
-
*/
|
|
7771
|
-
/**
|
|
7772
|
-
* The level a channel writes at once armed.
|
|
7773
|
-
*
|
|
7774
|
-
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
7775
|
-
* not leave the process for Loki, and the whole point of arming a channel is
|
|
7776
|
-
* to read it later.
|
|
7777
|
-
*/
|
|
7778
|
-
var LogChannelLevelSchema = _enum([
|
|
7779
|
-
"info",
|
|
7780
|
-
"warn",
|
|
7781
|
-
"error"
|
|
7782
|
-
]);
|
|
7783
|
-
/**
|
|
7784
|
-
* What an addon declares about one channel. No value, no state — a
|
|
7785
|
-
* declaration is inert.
|
|
7786
|
-
*/
|
|
7787
|
-
var LogChannelDescriptorSchema = object({
|
|
7788
|
-
/**
|
|
7789
|
-
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
7790
|
-
* the addon's short name so an operator reading a channel list can tell who
|
|
7791
|
-
* owns it without a second lookup.
|
|
7792
|
-
*/
|
|
7793
|
-
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
7794
|
-
/** One sentence: what the operator will SEE after arming it. */
|
|
7795
|
-
description: string().min(1),
|
|
7796
|
-
/** The level its lines are emitted at. Never below `info`. */
|
|
7797
|
-
defaultLevel: LogChannelLevelSchema,
|
|
7798
|
-
/**
|
|
7799
|
-
* Whether this channel can be narrowed to a camera.
|
|
7800
|
-
*
|
|
7801
|
-
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
7802
|
-
* consulted with the numeric device id, AND every line the channel admits
|
|
7803
|
-
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
7804
|
-
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
7805
|
-
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
7806
|
-
* the body is the only way to filter.
|
|
7807
|
-
*
|
|
7808
|
-
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
7809
|
-
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
7810
|
-
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
7811
|
-
* path was never taken.
|
|
7812
|
-
*/
|
|
7813
|
-
perDevice: boolean()
|
|
7814
|
-
});
|
|
7815
|
-
/**
|
|
7816
|
-
* An armed window over one channel, as the document hands it to a mirror.
|
|
7817
|
-
*
|
|
7818
|
-
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
7819
|
-
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
7820
|
-
*/
|
|
7821
|
-
var LogChannelWindowSchema = object({
|
|
7822
|
-
channel: string().min(1),
|
|
7823
|
-
/** Epoch ms the window closes at. */
|
|
7824
|
-
armedUntilMs: number(),
|
|
7825
|
-
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
7826
|
-
deviceIds: array(number().int()).readonly().nullable()
|
|
7827
|
-
});
|
|
7828
|
-
/**
|
|
7829
7724
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
7830
7725
|
* recordings and events management surfaces.
|
|
7831
7726
|
*
|
|
@@ -8771,8 +8666,11 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
|
|
|
8771
8666
|
* `STORAGE_LOCATION_CARDINALITY` map has been removed.
|
|
8772
8667
|
*
|
|
8773
8668
|
* `id` is a stable namespaced string of the form `<type>:<slug>`.
|
|
8774
|
-
* The
|
|
8775
|
-
*
|
|
8669
|
+
* The seed names its first instance `<type>:default` — a NAME, not a flag.
|
|
8670
|
+
* There is no default location any more (D383): `enabled` is the whole write
|
|
8671
|
+
* model, and a bare type ref resolves to the sole location of the type, or —
|
|
8672
|
+
* transitionally, only while legacy NULL-stamped rows exist — to the row whose
|
|
8673
|
+
* slug is `default`.
|
|
8776
8674
|
*
|
|
8777
8675
|
* `isSystem` is a legacy persisted flag. Seed still creates the initial
|
|
8778
8676
|
* `<type>:default` locations; the flag is no longer a lock, a badge, or a
|
|
@@ -8793,21 +8691,20 @@ var StorageLocationSchema = object({
|
|
|
8793
8691
|
* flag at upsert time, not here (the schema is provider-agnostic).
|
|
8794
8692
|
*/
|
|
8795
8693
|
nodeId: string().optional(),
|
|
8796
|
-
isDefault: boolean().default(false),
|
|
8797
8694
|
isSystem: boolean().default(false),
|
|
8798
8695
|
/**
|
|
8799
|
-
*
|
|
8800
|
-
*
|
|
8801
|
-
*
|
|
8802
|
-
*
|
|
8803
|
-
*
|
|
8696
|
+
* THE write switch, and the only one (D383). `enabled: true` means every
|
|
8697
|
+
* consumer that chooses a write target for this type may write here, and all
|
|
8698
|
+
* enabled locations of a type are used TOGETHER; `false` means read-only —
|
|
8699
|
+
* still read, still played back, still age-swept, still drained, never
|
|
8700
|
+
* written.
|
|
8804
8701
|
*
|
|
8805
|
-
* OPTIONAL
|
|
8806
|
-
*
|
|
8807
|
-
*
|
|
8808
|
-
*
|
|
8809
|
-
*
|
|
8810
|
-
*
|
|
8702
|
+
* OPTIONAL only for the wire: an upsert that omits it means "leave what is
|
|
8703
|
+
* stored" on an update and "born inert unless it is the first location of its
|
|
8704
|
+
* type" on a create. On a PERSISTED row absence is legacy and it means
|
|
8705
|
+
* enabled — {@link isLocationEnabled} is the one place that says so, and the
|
|
8706
|
+
* orchestrator stamps every flagless row `true` once at hydrate so absence
|
|
8707
|
+
* stops existing rather than being re-derived on every read.
|
|
8811
8708
|
*/
|
|
8812
8709
|
enabled: boolean().optional(),
|
|
8813
8710
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
@@ -8820,10 +8717,12 @@ var StorageLocationSchema = object({
|
|
|
8820
8717
|
createdAt: number(),
|
|
8821
8718
|
updatedAt: number()
|
|
8822
8719
|
});
|
|
8720
|
+
object({ isDefault: boolean().optional() });
|
|
8823
8721
|
/**
|
|
8824
8722
|
* Reference accepted by consumer-facing `api.storage.*` calls.
|
|
8825
8723
|
* Either:
|
|
8826
|
-
* - a `StorageLocationType` (e.g. `'backups'`) →
|
|
8724
|
+
* - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
|
|
8725
|
+
* (transitionally, the `<type>:default`-slugged row when several exist)
|
|
8827
8726
|
* - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
|
|
8828
8727
|
*
|
|
8829
8728
|
* The orchestrator's `resolveRef(ref)` handles both cases.
|
|
@@ -8999,6 +8898,111 @@ var DecoderSessionConfigSchema = object({
|
|
|
8999
8898
|
*/
|
|
9000
8899
|
debug: boolean().optional()
|
|
9001
8900
|
});
|
|
8901
|
+
/**
|
|
8902
|
+
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
8903
|
+
* an addon declares its channels in.
|
|
8904
|
+
*
|
|
8905
|
+
* ## Two axes, deliberately separated
|
|
8906
|
+
*
|
|
8907
|
+
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
8908
|
+
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
8909
|
+
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
8910
|
+
* and rots silently. So a channel is declared where it is consulted, and the
|
|
8911
|
+
* `log-channels` capability enumerates the declarations.
|
|
8912
|
+
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
8913
|
+
* thing: the logging settings document on the `system` cap. Two authorities
|
|
8914
|
+
* over the values is the exact defect
|
|
8915
|
+
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
8916
|
+
* remove; re-introducing it from the cure side would be grotesque.
|
|
8917
|
+
*
|
|
8918
|
+
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
8919
|
+
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
8920
|
+
* the hot path with a value somebody actually read, and by
|
|
8921
|
+
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
8922
|
+
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
8923
|
+
* disarmed one (D49).
|
|
8924
|
+
*
|
|
8925
|
+
* ## The canonical call shape
|
|
8926
|
+
*
|
|
8927
|
+
* ```ts
|
|
8928
|
+
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
8929
|
+
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
8930
|
+
* }
|
|
8931
|
+
* ```
|
|
8932
|
+
*
|
|
8933
|
+
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
8934
|
+
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
8935
|
+
* object literal is never constructed because it lives inside the branch. It
|
|
8936
|
+
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
8937
|
+
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
8938
|
+
* destination floor (measured at 1.93 ns/call when off).
|
|
8939
|
+
*
|
|
8940
|
+
* ## Why a channel emits at `info`
|
|
8941
|
+
*
|
|
8942
|
+
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
8943
|
+
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
8944
|
+
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
8945
|
+
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
8946
|
+
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
8947
|
+
* emits at the channel's declared level, whose schema floor is `info`.
|
|
8948
|
+
*/
|
|
8949
|
+
/**
|
|
8950
|
+
* The level a channel writes at once armed.
|
|
8951
|
+
*
|
|
8952
|
+
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
8953
|
+
* not leave the process for Loki, and the whole point of arming a channel is
|
|
8954
|
+
* to read it later.
|
|
8955
|
+
*/
|
|
8956
|
+
var LogChannelLevelSchema = _enum([
|
|
8957
|
+
"info",
|
|
8958
|
+
"warn",
|
|
8959
|
+
"error"
|
|
8960
|
+
]);
|
|
8961
|
+
/**
|
|
8962
|
+
* What an addon declares about one channel. No value, no state — a
|
|
8963
|
+
* declaration is inert.
|
|
8964
|
+
*/
|
|
8965
|
+
var LogChannelDescriptorSchema = object({
|
|
8966
|
+
/**
|
|
8967
|
+
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
8968
|
+
* the addon's short name so an operator reading a channel list can tell who
|
|
8969
|
+
* owns it without a second lookup.
|
|
8970
|
+
*/
|
|
8971
|
+
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
8972
|
+
/** One sentence: what the operator will SEE after arming it. */
|
|
8973
|
+
description: string().min(1),
|
|
8974
|
+
/** The level its lines are emitted at. Never below `info`. */
|
|
8975
|
+
defaultLevel: LogChannelLevelSchema,
|
|
8976
|
+
/**
|
|
8977
|
+
* Whether this channel can be narrowed to a camera.
|
|
8978
|
+
*
|
|
8979
|
+
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
8980
|
+
* consulted with the numeric device id, AND every line the channel admits
|
|
8981
|
+
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
8982
|
+
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
8983
|
+
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
8984
|
+
* the body is the only way to filter.
|
|
8985
|
+
*
|
|
8986
|
+
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
8987
|
+
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
8988
|
+
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
8989
|
+
* path was never taken.
|
|
8990
|
+
*/
|
|
8991
|
+
perDevice: boolean()
|
|
8992
|
+
});
|
|
8993
|
+
/**
|
|
8994
|
+
* An armed window over one channel, as the document hands it to a mirror.
|
|
8995
|
+
*
|
|
8996
|
+
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
8997
|
+
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
8998
|
+
*/
|
|
8999
|
+
var LogChannelWindowSchema = object({
|
|
9000
|
+
channel: string().min(1),
|
|
9001
|
+
/** Epoch ms the window closes at. */
|
|
9002
|
+
armedUntilMs: number(),
|
|
9003
|
+
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
9004
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
9005
|
+
});
|
|
9002
9006
|
var MODEL_FORMATS = [
|
|
9003
9007
|
"onnx",
|
|
9004
9008
|
"coreml",
|
|
@@ -21718,7 +21722,7 @@ method(object({
|
|
|
21718
21722
|
downloadId: string(),
|
|
21719
21723
|
offset: number(),
|
|
21720
21724
|
length: number()
|
|
21721
|
-
}), _instanceof(Uint8Array)), method(object({ downloadId: string() }), _void(), { kind: "mutation" }), method(object({ type: StorageLocationTypeSchema.optional() }), array(StorageLocationSchema).readonly()), method(
|
|
21725
|
+
}), _instanceof(Uint8Array)), method(object({ downloadId: string() }), _void(), { kind: "mutation" }), method(object({ type: StorageLocationTypeSchema.optional() }), array(StorageLocationSchema).readonly()), method(_void(), array(StorageLocationDeclarationSchema).readonly()), method(StorageLocationSchema.omit({
|
|
21722
21726
|
createdAt: true,
|
|
21723
21727
|
updatedAt: true
|
|
21724
21728
|
}), StorageLocationSchema, {
|
|
@@ -34567,12 +34571,6 @@ Object.freeze({
|
|
|
34567
34571
|
addonId: null,
|
|
34568
34572
|
access: "view"
|
|
34569
34573
|
},
|
|
34570
|
-
"storage.getDefaultLocation": {
|
|
34571
|
-
capName: "storage",
|
|
34572
|
-
capScope: "system",
|
|
34573
|
-
addonId: null,
|
|
34574
|
-
access: "view"
|
|
34575
|
-
},
|
|
34576
34574
|
"storage.list": {
|
|
34577
34575
|
capName: "storage",
|
|
34578
34576
|
capScope: "system",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-notifiers",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.83",
|
|
4
4
|
"description": "System notifiers addon for CamStack — a `notification-output` collection provider hosting per-kind notifier adapters (ntfy, pushover, gotify, telegram, discord, webhook, zentik).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|