@camstack/addon-provider-dreo 0.2.78 → 0.2.79
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
|
@@ -7651,111 +7651,6 @@ var CameraSwitchGroupSchema = object({
|
|
|
7651
7651
|
fetchedAt: number()
|
|
7652
7652
|
});
|
|
7653
7653
|
/**
|
|
7654
|
-
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
7655
|
-
* an addon declares its channels in.
|
|
7656
|
-
*
|
|
7657
|
-
* ## Two axes, deliberately separated
|
|
7658
|
-
*
|
|
7659
|
-
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
7660
|
-
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
7661
|
-
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
7662
|
-
* and rots silently. So a channel is declared where it is consulted, and the
|
|
7663
|
-
* `log-channels` capability enumerates the declarations.
|
|
7664
|
-
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
7665
|
-
* thing: the logging settings document on the `system` cap. Two authorities
|
|
7666
|
-
* over the values is the exact defect
|
|
7667
|
-
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
7668
|
-
* remove; re-introducing it from the cure side would be grotesque.
|
|
7669
|
-
*
|
|
7670
|
-
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
7671
|
-
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
7672
|
-
* the hot path with a value somebody actually read, and by
|
|
7673
|
-
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
7674
|
-
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
7675
|
-
* disarmed one (D49).
|
|
7676
|
-
*
|
|
7677
|
-
* ## The canonical call shape
|
|
7678
|
-
*
|
|
7679
|
-
* ```ts
|
|
7680
|
-
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
7681
|
-
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
7682
|
-
* }
|
|
7683
|
-
* ```
|
|
7684
|
-
*
|
|
7685
|
-
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
7686
|
-
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
7687
|
-
* object literal is never constructed because it lives inside the branch. It
|
|
7688
|
-
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
7689
|
-
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
7690
|
-
* destination floor (measured at 1.93 ns/call when off).
|
|
7691
|
-
*
|
|
7692
|
-
* ## Why a channel emits at `info`
|
|
7693
|
-
*
|
|
7694
|
-
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
7695
|
-
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
7696
|
-
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
7697
|
-
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
7698
|
-
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
7699
|
-
* emits at the channel's declared level, whose schema floor is `info`.
|
|
7700
|
-
*/
|
|
7701
|
-
/**
|
|
7702
|
-
* The level a channel writes at once armed.
|
|
7703
|
-
*
|
|
7704
|
-
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
7705
|
-
* not leave the process for Loki, and the whole point of arming a channel is
|
|
7706
|
-
* to read it later.
|
|
7707
|
-
*/
|
|
7708
|
-
var LogChannelLevelSchema = _enum([
|
|
7709
|
-
"info",
|
|
7710
|
-
"warn",
|
|
7711
|
-
"error"
|
|
7712
|
-
]);
|
|
7713
|
-
/**
|
|
7714
|
-
* What an addon declares about one channel. No value, no state — a
|
|
7715
|
-
* declaration is inert.
|
|
7716
|
-
*/
|
|
7717
|
-
var LogChannelDescriptorSchema = object({
|
|
7718
|
-
/**
|
|
7719
|
-
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
7720
|
-
* the addon's short name so an operator reading a channel list can tell who
|
|
7721
|
-
* owns it without a second lookup.
|
|
7722
|
-
*/
|
|
7723
|
-
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
7724
|
-
/** One sentence: what the operator will SEE after arming it. */
|
|
7725
|
-
description: string().min(1),
|
|
7726
|
-
/** The level its lines are emitted at. Never below `info`. */
|
|
7727
|
-
defaultLevel: LogChannelLevelSchema,
|
|
7728
|
-
/**
|
|
7729
|
-
* Whether this channel can be narrowed to a camera.
|
|
7730
|
-
*
|
|
7731
|
-
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
7732
|
-
* consulted with the numeric device id, AND every line the channel admits
|
|
7733
|
-
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
7734
|
-
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
7735
|
-
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
7736
|
-
* the body is the only way to filter.
|
|
7737
|
-
*
|
|
7738
|
-
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
7739
|
-
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
7740
|
-
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
7741
|
-
* path was never taken.
|
|
7742
|
-
*/
|
|
7743
|
-
perDevice: boolean()
|
|
7744
|
-
});
|
|
7745
|
-
/**
|
|
7746
|
-
* An armed window over one channel, as the document hands it to a mirror.
|
|
7747
|
-
*
|
|
7748
|
-
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
7749
|
-
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
7750
|
-
*/
|
|
7751
|
-
var LogChannelWindowSchema = object({
|
|
7752
|
-
channel: string().min(1),
|
|
7753
|
-
/** Epoch ms the window closes at. */
|
|
7754
|
-
armedUntilMs: number(),
|
|
7755
|
-
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
7756
|
-
deviceIds: array(number().int()).readonly().nullable()
|
|
7757
|
-
});
|
|
7758
|
-
/**
|
|
7759
7654
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
7760
7655
|
* recordings and events management surfaces.
|
|
7761
7656
|
*
|
|
@@ -8701,8 +8596,11 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
|
|
|
8701
8596
|
* `STORAGE_LOCATION_CARDINALITY` map has been removed.
|
|
8702
8597
|
*
|
|
8703
8598
|
* `id` is a stable namespaced string of the form `<type>:<slug>`.
|
|
8704
|
-
* The
|
|
8705
|
-
*
|
|
8599
|
+
* The seed names its first instance `<type>:default` — a NAME, not a flag.
|
|
8600
|
+
* There is no default location any more (D383): `enabled` is the whole write
|
|
8601
|
+
* model, and a bare type ref resolves to the sole location of the type, or —
|
|
8602
|
+
* transitionally, only while legacy NULL-stamped rows exist — to the row whose
|
|
8603
|
+
* slug is `default`.
|
|
8706
8604
|
*
|
|
8707
8605
|
* `isSystem` is a legacy persisted flag. Seed still creates the initial
|
|
8708
8606
|
* `<type>:default` locations; the flag is no longer a lock, a badge, or a
|
|
@@ -8723,21 +8621,20 @@ var StorageLocationSchema = object({
|
|
|
8723
8621
|
* flag at upsert time, not here (the schema is provider-agnostic).
|
|
8724
8622
|
*/
|
|
8725
8623
|
nodeId: string().optional(),
|
|
8726
|
-
isDefault: boolean().default(false),
|
|
8727
8624
|
isSystem: boolean().default(false),
|
|
8728
8625
|
/**
|
|
8729
|
-
*
|
|
8730
|
-
*
|
|
8731
|
-
*
|
|
8732
|
-
*
|
|
8733
|
-
*
|
|
8626
|
+
* THE write switch, and the only one (D383). `enabled: true` means every
|
|
8627
|
+
* consumer that chooses a write target for this type may write here, and all
|
|
8628
|
+
* enabled locations of a type are used TOGETHER; `false` means read-only —
|
|
8629
|
+
* still read, still played back, still age-swept, still drained, never
|
|
8630
|
+
* written.
|
|
8734
8631
|
*
|
|
8735
|
-
* OPTIONAL
|
|
8736
|
-
*
|
|
8737
|
-
*
|
|
8738
|
-
*
|
|
8739
|
-
*
|
|
8740
|
-
*
|
|
8632
|
+
* OPTIONAL only for the wire: an upsert that omits it means "leave what is
|
|
8633
|
+
* stored" on an update and "born inert unless it is the first location of its
|
|
8634
|
+
* type" on a create. On a PERSISTED row absence is legacy and it means
|
|
8635
|
+
* enabled — {@link isLocationEnabled} is the one place that says so, and the
|
|
8636
|
+
* orchestrator stamps every flagless row `true` once at hydrate so absence
|
|
8637
|
+
* stops existing rather than being re-derived on every read.
|
|
8741
8638
|
*/
|
|
8742
8639
|
enabled: boolean().optional(),
|
|
8743
8640
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
@@ -8750,10 +8647,12 @@ var StorageLocationSchema = object({
|
|
|
8750
8647
|
createdAt: number(),
|
|
8751
8648
|
updatedAt: number()
|
|
8752
8649
|
});
|
|
8650
|
+
object({ isDefault: boolean().optional() });
|
|
8753
8651
|
/**
|
|
8754
8652
|
* Reference accepted by consumer-facing `api.storage.*` calls.
|
|
8755
8653
|
* Either:
|
|
8756
|
-
* - a `StorageLocationType` (e.g. `'backups'`) →
|
|
8654
|
+
* - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
|
|
8655
|
+
* (transitionally, the `<type>:default`-slugged row when several exist)
|
|
8757
8656
|
* - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
|
|
8758
8657
|
*
|
|
8759
8658
|
* The orchestrator's `resolveRef(ref)` handles both cases.
|
|
@@ -8929,6 +8828,111 @@ var DecoderSessionConfigSchema = object({
|
|
|
8929
8828
|
*/
|
|
8930
8829
|
debug: boolean().optional()
|
|
8931
8830
|
});
|
|
8831
|
+
/**
|
|
8832
|
+
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
8833
|
+
* an addon declares its channels in.
|
|
8834
|
+
*
|
|
8835
|
+
* ## Two axes, deliberately separated
|
|
8836
|
+
*
|
|
8837
|
+
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
8838
|
+
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
8839
|
+
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
8840
|
+
* and rots silently. So a channel is declared where it is consulted, and the
|
|
8841
|
+
* `log-channels` capability enumerates the declarations.
|
|
8842
|
+
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
8843
|
+
* thing: the logging settings document on the `system` cap. Two authorities
|
|
8844
|
+
* over the values is the exact defect
|
|
8845
|
+
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
8846
|
+
* remove; re-introducing it from the cure side would be grotesque.
|
|
8847
|
+
*
|
|
8848
|
+
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
8849
|
+
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
8850
|
+
* the hot path with a value somebody actually read, and by
|
|
8851
|
+
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
8852
|
+
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
8853
|
+
* disarmed one (D49).
|
|
8854
|
+
*
|
|
8855
|
+
* ## The canonical call shape
|
|
8856
|
+
*
|
|
8857
|
+
* ```ts
|
|
8858
|
+
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
8859
|
+
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
8860
|
+
* }
|
|
8861
|
+
* ```
|
|
8862
|
+
*
|
|
8863
|
+
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
8864
|
+
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
8865
|
+
* object literal is never constructed because it lives inside the branch. It
|
|
8866
|
+
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
8867
|
+
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
8868
|
+
* destination floor (measured at 1.93 ns/call when off).
|
|
8869
|
+
*
|
|
8870
|
+
* ## Why a channel emits at `info`
|
|
8871
|
+
*
|
|
8872
|
+
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
8873
|
+
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
8874
|
+
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
8875
|
+
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
8876
|
+
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
8877
|
+
* emits at the channel's declared level, whose schema floor is `info`.
|
|
8878
|
+
*/
|
|
8879
|
+
/**
|
|
8880
|
+
* The level a channel writes at once armed.
|
|
8881
|
+
*
|
|
8882
|
+
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
8883
|
+
* not leave the process for Loki, and the whole point of arming a channel is
|
|
8884
|
+
* to read it later.
|
|
8885
|
+
*/
|
|
8886
|
+
var LogChannelLevelSchema = _enum([
|
|
8887
|
+
"info",
|
|
8888
|
+
"warn",
|
|
8889
|
+
"error"
|
|
8890
|
+
]);
|
|
8891
|
+
/**
|
|
8892
|
+
* What an addon declares about one channel. No value, no state — a
|
|
8893
|
+
* declaration is inert.
|
|
8894
|
+
*/
|
|
8895
|
+
var LogChannelDescriptorSchema = object({
|
|
8896
|
+
/**
|
|
8897
|
+
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
8898
|
+
* the addon's short name so an operator reading a channel list can tell who
|
|
8899
|
+
* owns it without a second lookup.
|
|
8900
|
+
*/
|
|
8901
|
+
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
8902
|
+
/** One sentence: what the operator will SEE after arming it. */
|
|
8903
|
+
description: string().min(1),
|
|
8904
|
+
/** The level its lines are emitted at. Never below `info`. */
|
|
8905
|
+
defaultLevel: LogChannelLevelSchema,
|
|
8906
|
+
/**
|
|
8907
|
+
* Whether this channel can be narrowed to a camera.
|
|
8908
|
+
*
|
|
8909
|
+
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
8910
|
+
* consulted with the numeric device id, AND every line the channel admits
|
|
8911
|
+
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
8912
|
+
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
8913
|
+
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
8914
|
+
* the body is the only way to filter.
|
|
8915
|
+
*
|
|
8916
|
+
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
8917
|
+
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
8918
|
+
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
8919
|
+
* path was never taken.
|
|
8920
|
+
*/
|
|
8921
|
+
perDevice: boolean()
|
|
8922
|
+
});
|
|
8923
|
+
/**
|
|
8924
|
+
* An armed window over one channel, as the document hands it to a mirror.
|
|
8925
|
+
*
|
|
8926
|
+
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
8927
|
+
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
8928
|
+
*/
|
|
8929
|
+
var LogChannelWindowSchema = object({
|
|
8930
|
+
channel: string().min(1),
|
|
8931
|
+
/** Epoch ms the window closes at. */
|
|
8932
|
+
armedUntilMs: number(),
|
|
8933
|
+
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
8934
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
8935
|
+
});
|
|
8932
8936
|
var MODEL_FORMATS = [
|
|
8933
8937
|
"onnx",
|
|
8934
8938
|
"coreml",
|
|
@@ -21978,7 +21982,7 @@ method(object({
|
|
|
21978
21982
|
downloadId: string(),
|
|
21979
21983
|
offset: number(),
|
|
21980
21984
|
length: number()
|
|
21981
|
-
}), _instanceof(Uint8Array)), method(object({ downloadId: string() }), _void(), { kind: "mutation" }), method(object({ type: StorageLocationTypeSchema.optional() }), array(StorageLocationSchema).readonly()), method(
|
|
21985
|
+
}), _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({
|
|
21982
21986
|
createdAt: true,
|
|
21983
21987
|
updatedAt: true
|
|
21984
21988
|
}), StorageLocationSchema, {
|
|
@@ -38831,12 +38835,6 @@ Object.freeze({
|
|
|
38831
38835
|
addonId: null,
|
|
38832
38836
|
access: "view"
|
|
38833
38837
|
},
|
|
38834
|
-
"storage.getDefaultLocation": {
|
|
38835
|
-
capName: "storage",
|
|
38836
|
-
capScope: "system",
|
|
38837
|
-
addonId: null,
|
|
38838
|
-
access: "view"
|
|
38839
|
-
},
|
|
38840
38838
|
"storage.list": {
|
|
38841
38839
|
capName: "storage",
|
|
38842
38840
|
capScope: "system",
|
package/dist/addon.mjs
CHANGED
|
@@ -7652,111 +7652,6 @@ var CameraSwitchGroupSchema = object({
|
|
|
7652
7652
|
fetchedAt: number()
|
|
7653
7653
|
});
|
|
7654
7654
|
/**
|
|
7655
|
-
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
7656
|
-
* an addon declares its channels in.
|
|
7657
|
-
*
|
|
7658
|
-
* ## Two axes, deliberately separated
|
|
7659
|
-
*
|
|
7660
|
-
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
7661
|
-
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
7662
|
-
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
7663
|
-
* and rots silently. So a channel is declared where it is consulted, and the
|
|
7664
|
-
* `log-channels` capability enumerates the declarations.
|
|
7665
|
-
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
7666
|
-
* thing: the logging settings document on the `system` cap. Two authorities
|
|
7667
|
-
* over the values is the exact defect
|
|
7668
|
-
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
7669
|
-
* remove; re-introducing it from the cure side would be grotesque.
|
|
7670
|
-
*
|
|
7671
|
-
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
7672
|
-
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
7673
|
-
* the hot path with a value somebody actually read, and by
|
|
7674
|
-
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
7675
|
-
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
7676
|
-
* disarmed one (D49).
|
|
7677
|
-
*
|
|
7678
|
-
* ## The canonical call shape
|
|
7679
|
-
*
|
|
7680
|
-
* ```ts
|
|
7681
|
-
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
7682
|
-
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
7683
|
-
* }
|
|
7684
|
-
* ```
|
|
7685
|
-
*
|
|
7686
|
-
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
7687
|
-
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
7688
|
-
* object literal is never constructed because it lives inside the branch. It
|
|
7689
|
-
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
7690
|
-
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
7691
|
-
* destination floor (measured at 1.93 ns/call when off).
|
|
7692
|
-
*
|
|
7693
|
-
* ## Why a channel emits at `info`
|
|
7694
|
-
*
|
|
7695
|
-
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
7696
|
-
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
7697
|
-
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
7698
|
-
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
7699
|
-
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
7700
|
-
* emits at the channel's declared level, whose schema floor is `info`.
|
|
7701
|
-
*/
|
|
7702
|
-
/**
|
|
7703
|
-
* The level a channel writes at once armed.
|
|
7704
|
-
*
|
|
7705
|
-
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
7706
|
-
* not leave the process for Loki, and the whole point of arming a channel is
|
|
7707
|
-
* to read it later.
|
|
7708
|
-
*/
|
|
7709
|
-
var LogChannelLevelSchema = _enum([
|
|
7710
|
-
"info",
|
|
7711
|
-
"warn",
|
|
7712
|
-
"error"
|
|
7713
|
-
]);
|
|
7714
|
-
/**
|
|
7715
|
-
* What an addon declares about one channel. No value, no state — a
|
|
7716
|
-
* declaration is inert.
|
|
7717
|
-
*/
|
|
7718
|
-
var LogChannelDescriptorSchema = object({
|
|
7719
|
-
/**
|
|
7720
|
-
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
7721
|
-
* the addon's short name so an operator reading a channel list can tell who
|
|
7722
|
-
* owns it without a second lookup.
|
|
7723
|
-
*/
|
|
7724
|
-
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
7725
|
-
/** One sentence: what the operator will SEE after arming it. */
|
|
7726
|
-
description: string().min(1),
|
|
7727
|
-
/** The level its lines are emitted at. Never below `info`. */
|
|
7728
|
-
defaultLevel: LogChannelLevelSchema,
|
|
7729
|
-
/**
|
|
7730
|
-
* Whether this channel can be narrowed to a camera.
|
|
7731
|
-
*
|
|
7732
|
-
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
7733
|
-
* consulted with the numeric device id, AND every line the channel admits
|
|
7734
|
-
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
7735
|
-
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
7736
|
-
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
7737
|
-
* the body is the only way to filter.
|
|
7738
|
-
*
|
|
7739
|
-
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
7740
|
-
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
7741
|
-
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
7742
|
-
* path was never taken.
|
|
7743
|
-
*/
|
|
7744
|
-
perDevice: boolean()
|
|
7745
|
-
});
|
|
7746
|
-
/**
|
|
7747
|
-
* An armed window over one channel, as the document hands it to a mirror.
|
|
7748
|
-
*
|
|
7749
|
-
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
7750
|
-
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
7751
|
-
*/
|
|
7752
|
-
var LogChannelWindowSchema = object({
|
|
7753
|
-
channel: string().min(1),
|
|
7754
|
-
/** Epoch ms the window closes at. */
|
|
7755
|
-
armedUntilMs: number(),
|
|
7756
|
-
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
7757
|
-
deviceIds: array(number().int()).readonly().nullable()
|
|
7758
|
-
});
|
|
7759
|
-
/**
|
|
7760
7655
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
7761
7656
|
* recordings and events management surfaces.
|
|
7762
7657
|
*
|
|
@@ -8702,8 +8597,11 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
|
|
|
8702
8597
|
* `STORAGE_LOCATION_CARDINALITY` map has been removed.
|
|
8703
8598
|
*
|
|
8704
8599
|
* `id` is a stable namespaced string of the form `<type>:<slug>`.
|
|
8705
|
-
* The
|
|
8706
|
-
*
|
|
8600
|
+
* The seed names its first instance `<type>:default` — a NAME, not a flag.
|
|
8601
|
+
* There is no default location any more (D383): `enabled` is the whole write
|
|
8602
|
+
* model, and a bare type ref resolves to the sole location of the type, or —
|
|
8603
|
+
* transitionally, only while legacy NULL-stamped rows exist — to the row whose
|
|
8604
|
+
* slug is `default`.
|
|
8707
8605
|
*
|
|
8708
8606
|
* `isSystem` is a legacy persisted flag. Seed still creates the initial
|
|
8709
8607
|
* `<type>:default` locations; the flag is no longer a lock, a badge, or a
|
|
@@ -8724,21 +8622,20 @@ var StorageLocationSchema = object({
|
|
|
8724
8622
|
* flag at upsert time, not here (the schema is provider-agnostic).
|
|
8725
8623
|
*/
|
|
8726
8624
|
nodeId: string().optional(),
|
|
8727
|
-
isDefault: boolean().default(false),
|
|
8728
8625
|
isSystem: boolean().default(false),
|
|
8729
8626
|
/**
|
|
8730
|
-
*
|
|
8731
|
-
*
|
|
8732
|
-
*
|
|
8733
|
-
*
|
|
8734
|
-
*
|
|
8627
|
+
* THE write switch, and the only one (D383). `enabled: true` means every
|
|
8628
|
+
* consumer that chooses a write target for this type may write here, and all
|
|
8629
|
+
* enabled locations of a type are used TOGETHER; `false` means read-only —
|
|
8630
|
+
* still read, still played back, still age-swept, still drained, never
|
|
8631
|
+
* written.
|
|
8735
8632
|
*
|
|
8736
|
-
* OPTIONAL
|
|
8737
|
-
*
|
|
8738
|
-
*
|
|
8739
|
-
*
|
|
8740
|
-
*
|
|
8741
|
-
*
|
|
8633
|
+
* OPTIONAL only for the wire: an upsert that omits it means "leave what is
|
|
8634
|
+
* stored" on an update and "born inert unless it is the first location of its
|
|
8635
|
+
* type" on a create. On a PERSISTED row absence is legacy and it means
|
|
8636
|
+
* enabled — {@link isLocationEnabled} is the one place that says so, and the
|
|
8637
|
+
* orchestrator stamps every flagless row `true` once at hydrate so absence
|
|
8638
|
+
* stops existing rather than being re-derived on every read.
|
|
8742
8639
|
*/
|
|
8743
8640
|
enabled: boolean().optional(),
|
|
8744
8641
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
@@ -8751,10 +8648,12 @@ var StorageLocationSchema = object({
|
|
|
8751
8648
|
createdAt: number(),
|
|
8752
8649
|
updatedAt: number()
|
|
8753
8650
|
});
|
|
8651
|
+
object({ isDefault: boolean().optional() });
|
|
8754
8652
|
/**
|
|
8755
8653
|
* Reference accepted by consumer-facing `api.storage.*` calls.
|
|
8756
8654
|
* Either:
|
|
8757
|
-
* - a `StorageLocationType` (e.g. `'backups'`) →
|
|
8655
|
+
* - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
|
|
8656
|
+
* (transitionally, the `<type>:default`-slugged row when several exist)
|
|
8758
8657
|
* - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
|
|
8759
8658
|
*
|
|
8760
8659
|
* The orchestrator's `resolveRef(ref)` handles both cases.
|
|
@@ -8930,6 +8829,111 @@ var DecoderSessionConfigSchema = object({
|
|
|
8930
8829
|
*/
|
|
8931
8830
|
debug: boolean().optional()
|
|
8932
8831
|
});
|
|
8832
|
+
/**
|
|
8833
|
+
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
8834
|
+
* an addon declares its channels in.
|
|
8835
|
+
*
|
|
8836
|
+
* ## Two axes, deliberately separated
|
|
8837
|
+
*
|
|
8838
|
+
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
8839
|
+
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
8840
|
+
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
8841
|
+
* and rots silently. So a channel is declared where it is consulted, and the
|
|
8842
|
+
* `log-channels` capability enumerates the declarations.
|
|
8843
|
+
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
8844
|
+
* thing: the logging settings document on the `system` cap. Two authorities
|
|
8845
|
+
* over the values is the exact defect
|
|
8846
|
+
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
8847
|
+
* remove; re-introducing it from the cure side would be grotesque.
|
|
8848
|
+
*
|
|
8849
|
+
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
8850
|
+
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
8851
|
+
* the hot path with a value somebody actually read, and by
|
|
8852
|
+
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
8853
|
+
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
8854
|
+
* disarmed one (D49).
|
|
8855
|
+
*
|
|
8856
|
+
* ## The canonical call shape
|
|
8857
|
+
*
|
|
8858
|
+
* ```ts
|
|
8859
|
+
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
8860
|
+
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
8861
|
+
* }
|
|
8862
|
+
* ```
|
|
8863
|
+
*
|
|
8864
|
+
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
8865
|
+
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
8866
|
+
* object literal is never constructed because it lives inside the branch. It
|
|
8867
|
+
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
8868
|
+
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
8869
|
+
* destination floor (measured at 1.93 ns/call when off).
|
|
8870
|
+
*
|
|
8871
|
+
* ## Why a channel emits at `info`
|
|
8872
|
+
*
|
|
8873
|
+
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
8874
|
+
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
8875
|
+
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
8876
|
+
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
8877
|
+
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
8878
|
+
* emits at the channel's declared level, whose schema floor is `info`.
|
|
8879
|
+
*/
|
|
8880
|
+
/**
|
|
8881
|
+
* The level a channel writes at once armed.
|
|
8882
|
+
*
|
|
8883
|
+
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
8884
|
+
* not leave the process for Loki, and the whole point of arming a channel is
|
|
8885
|
+
* to read it later.
|
|
8886
|
+
*/
|
|
8887
|
+
var LogChannelLevelSchema = _enum([
|
|
8888
|
+
"info",
|
|
8889
|
+
"warn",
|
|
8890
|
+
"error"
|
|
8891
|
+
]);
|
|
8892
|
+
/**
|
|
8893
|
+
* What an addon declares about one channel. No value, no state — a
|
|
8894
|
+
* declaration is inert.
|
|
8895
|
+
*/
|
|
8896
|
+
var LogChannelDescriptorSchema = object({
|
|
8897
|
+
/**
|
|
8898
|
+
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
8899
|
+
* the addon's short name so an operator reading a channel list can tell who
|
|
8900
|
+
* owns it without a second lookup.
|
|
8901
|
+
*/
|
|
8902
|
+
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
8903
|
+
/** One sentence: what the operator will SEE after arming it. */
|
|
8904
|
+
description: string().min(1),
|
|
8905
|
+
/** The level its lines are emitted at. Never below `info`. */
|
|
8906
|
+
defaultLevel: LogChannelLevelSchema,
|
|
8907
|
+
/**
|
|
8908
|
+
* Whether this channel can be narrowed to a camera.
|
|
8909
|
+
*
|
|
8910
|
+
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
8911
|
+
* consulted with the numeric device id, AND every line the channel admits
|
|
8912
|
+
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
8913
|
+
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
8914
|
+
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
8915
|
+
* the body is the only way to filter.
|
|
8916
|
+
*
|
|
8917
|
+
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
8918
|
+
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
8919
|
+
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
8920
|
+
* path was never taken.
|
|
8921
|
+
*/
|
|
8922
|
+
perDevice: boolean()
|
|
8923
|
+
});
|
|
8924
|
+
/**
|
|
8925
|
+
* An armed window over one channel, as the document hands it to a mirror.
|
|
8926
|
+
*
|
|
8927
|
+
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
8928
|
+
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
8929
|
+
*/
|
|
8930
|
+
var LogChannelWindowSchema = object({
|
|
8931
|
+
channel: string().min(1),
|
|
8932
|
+
/** Epoch ms the window closes at. */
|
|
8933
|
+
armedUntilMs: number(),
|
|
8934
|
+
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
8935
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
8936
|
+
});
|
|
8933
8937
|
var MODEL_FORMATS = [
|
|
8934
8938
|
"onnx",
|
|
8935
8939
|
"coreml",
|
|
@@ -21979,7 +21983,7 @@ method(object({
|
|
|
21979
21983
|
downloadId: string(),
|
|
21980
21984
|
offset: number(),
|
|
21981
21985
|
length: number()
|
|
21982
|
-
}), _instanceof(Uint8Array)), method(object({ downloadId: string() }), _void(), { kind: "mutation" }), method(object({ type: StorageLocationTypeSchema.optional() }), array(StorageLocationSchema).readonly()), method(
|
|
21986
|
+
}), _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({
|
|
21983
21987
|
createdAt: true,
|
|
21984
21988
|
updatedAt: true
|
|
21985
21989
|
}), StorageLocationSchema, {
|
|
@@ -38832,12 +38836,6 @@ Object.freeze({
|
|
|
38832
38836
|
addonId: null,
|
|
38833
38837
|
access: "view"
|
|
38834
38838
|
},
|
|
38835
|
-
"storage.getDefaultLocation": {
|
|
38836
|
-
capName: "storage",
|
|
38837
|
-
capScope: "system",
|
|
38838
|
-
addonId: null,
|
|
38839
|
-
access: "view"
|
|
38840
|
-
},
|
|
38841
38839
|
"storage.list": {
|
|
38842
38840
|
capName: "storage",
|
|
38843
38841
|
capScope: "system",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-dreo",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.79",
|
|
4
4
|
"description": "Dreo smart-device (fan / air-circulator / purifier / heater / humidifier) device-provider addon for CamStack — wraps the @apocaliss92/nodedreo Dreo cloud client (REST + WebSocket)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|