@camstack/addon-provider-gree 0.2.77 → 0.2.78
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
|
@@ -7618,111 +7618,6 @@ var CameraSwitchGroupSchema = object({
|
|
|
7618
7618
|
fetchedAt: number()
|
|
7619
7619
|
});
|
|
7620
7620
|
/**
|
|
7621
|
-
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
7622
|
-
* an addon declares its channels in.
|
|
7623
|
-
*
|
|
7624
|
-
* ## Two axes, deliberately separated
|
|
7625
|
-
*
|
|
7626
|
-
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
7627
|
-
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
7628
|
-
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
7629
|
-
* and rots silently. So a channel is declared where it is consulted, and the
|
|
7630
|
-
* `log-channels` capability enumerates the declarations.
|
|
7631
|
-
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
7632
|
-
* thing: the logging settings document on the `system` cap. Two authorities
|
|
7633
|
-
* over the values is the exact defect
|
|
7634
|
-
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
7635
|
-
* remove; re-introducing it from the cure side would be grotesque.
|
|
7636
|
-
*
|
|
7637
|
-
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
7638
|
-
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
7639
|
-
* the hot path with a value somebody actually read, and by
|
|
7640
|
-
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
7641
|
-
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
7642
|
-
* disarmed one (D49).
|
|
7643
|
-
*
|
|
7644
|
-
* ## The canonical call shape
|
|
7645
|
-
*
|
|
7646
|
-
* ```ts
|
|
7647
|
-
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
7648
|
-
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
7649
|
-
* }
|
|
7650
|
-
* ```
|
|
7651
|
-
*
|
|
7652
|
-
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
7653
|
-
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
7654
|
-
* object literal is never constructed because it lives inside the branch. It
|
|
7655
|
-
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
7656
|
-
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
7657
|
-
* destination floor (measured at 1.93 ns/call when off).
|
|
7658
|
-
*
|
|
7659
|
-
* ## Why a channel emits at `info`
|
|
7660
|
-
*
|
|
7661
|
-
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
7662
|
-
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
7663
|
-
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
7664
|
-
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
7665
|
-
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
7666
|
-
* emits at the channel's declared level, whose schema floor is `info`.
|
|
7667
|
-
*/
|
|
7668
|
-
/**
|
|
7669
|
-
* The level a channel writes at once armed.
|
|
7670
|
-
*
|
|
7671
|
-
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
7672
|
-
* not leave the process for Loki, and the whole point of arming a channel is
|
|
7673
|
-
* to read it later.
|
|
7674
|
-
*/
|
|
7675
|
-
var LogChannelLevelSchema = _enum([
|
|
7676
|
-
"info",
|
|
7677
|
-
"warn",
|
|
7678
|
-
"error"
|
|
7679
|
-
]);
|
|
7680
|
-
/**
|
|
7681
|
-
* What an addon declares about one channel. No value, no state — a
|
|
7682
|
-
* declaration is inert.
|
|
7683
|
-
*/
|
|
7684
|
-
var LogChannelDescriptorSchema = object({
|
|
7685
|
-
/**
|
|
7686
|
-
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
7687
|
-
* the addon's short name so an operator reading a channel list can tell who
|
|
7688
|
-
* owns it without a second lookup.
|
|
7689
|
-
*/
|
|
7690
|
-
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
7691
|
-
/** One sentence: what the operator will SEE after arming it. */
|
|
7692
|
-
description: string().min(1),
|
|
7693
|
-
/** The level its lines are emitted at. Never below `info`. */
|
|
7694
|
-
defaultLevel: LogChannelLevelSchema,
|
|
7695
|
-
/**
|
|
7696
|
-
* Whether this channel can be narrowed to a camera.
|
|
7697
|
-
*
|
|
7698
|
-
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
7699
|
-
* consulted with the numeric device id, AND every line the channel admits
|
|
7700
|
-
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
7701
|
-
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
7702
|
-
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
7703
|
-
* the body is the only way to filter.
|
|
7704
|
-
*
|
|
7705
|
-
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
7706
|
-
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
7707
|
-
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
7708
|
-
* path was never taken.
|
|
7709
|
-
*/
|
|
7710
|
-
perDevice: boolean()
|
|
7711
|
-
});
|
|
7712
|
-
/**
|
|
7713
|
-
* An armed window over one channel, as the document hands it to a mirror.
|
|
7714
|
-
*
|
|
7715
|
-
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
7716
|
-
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
7717
|
-
*/
|
|
7718
|
-
var LogChannelWindowSchema = object({
|
|
7719
|
-
channel: string().min(1),
|
|
7720
|
-
/** Epoch ms the window closes at. */
|
|
7721
|
-
armedUntilMs: number(),
|
|
7722
|
-
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
7723
|
-
deviceIds: array(number().int()).readonly().nullable()
|
|
7724
|
-
});
|
|
7725
|
-
/**
|
|
7726
7621
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
7727
7622
|
* recordings and events management surfaces.
|
|
7728
7623
|
*
|
|
@@ -8668,8 +8563,11 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
|
|
|
8668
8563
|
* `STORAGE_LOCATION_CARDINALITY` map has been removed.
|
|
8669
8564
|
*
|
|
8670
8565
|
* `id` is a stable namespaced string of the form `<type>:<slug>`.
|
|
8671
|
-
* The
|
|
8672
|
-
*
|
|
8566
|
+
* The seed names its first instance `<type>:default` — a NAME, not a flag.
|
|
8567
|
+
* There is no default location any more (D383): `enabled` is the whole write
|
|
8568
|
+
* model, and a bare type ref resolves to the sole location of the type, or —
|
|
8569
|
+
* transitionally, only while legacy NULL-stamped rows exist — to the row whose
|
|
8570
|
+
* slug is `default`.
|
|
8673
8571
|
*
|
|
8674
8572
|
* `isSystem` is a legacy persisted flag. Seed still creates the initial
|
|
8675
8573
|
* `<type>:default` locations; the flag is no longer a lock, a badge, or a
|
|
@@ -8690,21 +8588,20 @@ var StorageLocationSchema = object({
|
|
|
8690
8588
|
* flag at upsert time, not here (the schema is provider-agnostic).
|
|
8691
8589
|
*/
|
|
8692
8590
|
nodeId: string().optional(),
|
|
8693
|
-
isDefault: boolean().default(false),
|
|
8694
8591
|
isSystem: boolean().default(false),
|
|
8695
8592
|
/**
|
|
8696
|
-
*
|
|
8697
|
-
*
|
|
8698
|
-
*
|
|
8699
|
-
*
|
|
8700
|
-
*
|
|
8593
|
+
* THE write switch, and the only one (D383). `enabled: true` means every
|
|
8594
|
+
* consumer that chooses a write target for this type may write here, and all
|
|
8595
|
+
* enabled locations of a type are used TOGETHER; `false` means read-only —
|
|
8596
|
+
* still read, still played back, still age-swept, still drained, never
|
|
8597
|
+
* written.
|
|
8701
8598
|
*
|
|
8702
|
-
* OPTIONAL
|
|
8703
|
-
*
|
|
8704
|
-
*
|
|
8705
|
-
*
|
|
8706
|
-
*
|
|
8707
|
-
*
|
|
8599
|
+
* OPTIONAL only for the wire: an upsert that omits it means "leave what is
|
|
8600
|
+
* stored" on an update and "born inert unless it is the first location of its
|
|
8601
|
+
* type" on a create. On a PERSISTED row absence is legacy and it means
|
|
8602
|
+
* enabled — {@link isLocationEnabled} is the one place that says so, and the
|
|
8603
|
+
* orchestrator stamps every flagless row `true` once at hydrate so absence
|
|
8604
|
+
* stops existing rather than being re-derived on every read.
|
|
8708
8605
|
*/
|
|
8709
8606
|
enabled: boolean().optional(),
|
|
8710
8607
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
@@ -8717,10 +8614,12 @@ var StorageLocationSchema = object({
|
|
|
8717
8614
|
createdAt: number(),
|
|
8718
8615
|
updatedAt: number()
|
|
8719
8616
|
});
|
|
8617
|
+
object({ isDefault: boolean().optional() });
|
|
8720
8618
|
/**
|
|
8721
8619
|
* Reference accepted by consumer-facing `api.storage.*` calls.
|
|
8722
8620
|
* Either:
|
|
8723
|
-
* - a `StorageLocationType` (e.g. `'backups'`) →
|
|
8621
|
+
* - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
|
|
8622
|
+
* (transitionally, the `<type>:default`-slugged row when several exist)
|
|
8724
8623
|
* - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
|
|
8725
8624
|
*
|
|
8726
8625
|
* The orchestrator's `resolveRef(ref)` handles both cases.
|
|
@@ -8896,6 +8795,111 @@ var DecoderSessionConfigSchema = object({
|
|
|
8896
8795
|
*/
|
|
8897
8796
|
debug: boolean().optional()
|
|
8898
8797
|
});
|
|
8798
|
+
/**
|
|
8799
|
+
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
8800
|
+
* an addon declares its channels in.
|
|
8801
|
+
*
|
|
8802
|
+
* ## Two axes, deliberately separated
|
|
8803
|
+
*
|
|
8804
|
+
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
8805
|
+
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
8806
|
+
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
8807
|
+
* and rots silently. So a channel is declared where it is consulted, and the
|
|
8808
|
+
* `log-channels` capability enumerates the declarations.
|
|
8809
|
+
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
8810
|
+
* thing: the logging settings document on the `system` cap. Two authorities
|
|
8811
|
+
* over the values is the exact defect
|
|
8812
|
+
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
8813
|
+
* remove; re-introducing it from the cure side would be grotesque.
|
|
8814
|
+
*
|
|
8815
|
+
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
8816
|
+
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
8817
|
+
* the hot path with a value somebody actually read, and by
|
|
8818
|
+
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
8819
|
+
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
8820
|
+
* disarmed one (D49).
|
|
8821
|
+
*
|
|
8822
|
+
* ## The canonical call shape
|
|
8823
|
+
*
|
|
8824
|
+
* ```ts
|
|
8825
|
+
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
8826
|
+
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
8827
|
+
* }
|
|
8828
|
+
* ```
|
|
8829
|
+
*
|
|
8830
|
+
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
8831
|
+
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
8832
|
+
* object literal is never constructed because it lives inside the branch. It
|
|
8833
|
+
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
8834
|
+
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
8835
|
+
* destination floor (measured at 1.93 ns/call when off).
|
|
8836
|
+
*
|
|
8837
|
+
* ## Why a channel emits at `info`
|
|
8838
|
+
*
|
|
8839
|
+
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
8840
|
+
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
8841
|
+
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
8842
|
+
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
8843
|
+
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
8844
|
+
* emits at the channel's declared level, whose schema floor is `info`.
|
|
8845
|
+
*/
|
|
8846
|
+
/**
|
|
8847
|
+
* The level a channel writes at once armed.
|
|
8848
|
+
*
|
|
8849
|
+
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
8850
|
+
* not leave the process for Loki, and the whole point of arming a channel is
|
|
8851
|
+
* to read it later.
|
|
8852
|
+
*/
|
|
8853
|
+
var LogChannelLevelSchema = _enum([
|
|
8854
|
+
"info",
|
|
8855
|
+
"warn",
|
|
8856
|
+
"error"
|
|
8857
|
+
]);
|
|
8858
|
+
/**
|
|
8859
|
+
* What an addon declares about one channel. No value, no state — a
|
|
8860
|
+
* declaration is inert.
|
|
8861
|
+
*/
|
|
8862
|
+
var LogChannelDescriptorSchema = object({
|
|
8863
|
+
/**
|
|
8864
|
+
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
8865
|
+
* the addon's short name so an operator reading a channel list can tell who
|
|
8866
|
+
* owns it without a second lookup.
|
|
8867
|
+
*/
|
|
8868
|
+
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
8869
|
+
/** One sentence: what the operator will SEE after arming it. */
|
|
8870
|
+
description: string().min(1),
|
|
8871
|
+
/** The level its lines are emitted at. Never below `info`. */
|
|
8872
|
+
defaultLevel: LogChannelLevelSchema,
|
|
8873
|
+
/**
|
|
8874
|
+
* Whether this channel can be narrowed to a camera.
|
|
8875
|
+
*
|
|
8876
|
+
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
8877
|
+
* consulted with the numeric device id, AND every line the channel admits
|
|
8878
|
+
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
8879
|
+
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
8880
|
+
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
8881
|
+
* the body is the only way to filter.
|
|
8882
|
+
*
|
|
8883
|
+
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
8884
|
+
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
8885
|
+
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
8886
|
+
* path was never taken.
|
|
8887
|
+
*/
|
|
8888
|
+
perDevice: boolean()
|
|
8889
|
+
});
|
|
8890
|
+
/**
|
|
8891
|
+
* An armed window over one channel, as the document hands it to a mirror.
|
|
8892
|
+
*
|
|
8893
|
+
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
8894
|
+
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
8895
|
+
*/
|
|
8896
|
+
var LogChannelWindowSchema = object({
|
|
8897
|
+
channel: string().min(1),
|
|
8898
|
+
/** Epoch ms the window closes at. */
|
|
8899
|
+
armedUntilMs: number(),
|
|
8900
|
+
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
8901
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
8902
|
+
});
|
|
8899
8903
|
var MODEL_FORMATS = [
|
|
8900
8904
|
"onnx",
|
|
8901
8905
|
"coreml",
|
|
@@ -21928,7 +21932,7 @@ method(object({
|
|
|
21928
21932
|
downloadId: string(),
|
|
21929
21933
|
offset: number(),
|
|
21930
21934
|
length: number()
|
|
21931
|
-
}), _instanceof(Uint8Array)), method(object({ downloadId: string() }), _void(), { kind: "mutation" }), method(object({ type: StorageLocationTypeSchema.optional() }), array(StorageLocationSchema).readonly()), method(
|
|
21935
|
+
}), _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({
|
|
21932
21936
|
createdAt: true,
|
|
21933
21937
|
updatedAt: true
|
|
21934
21938
|
}), StorageLocationSchema, {
|
|
@@ -38773,12 +38777,6 @@ Object.freeze({
|
|
|
38773
38777
|
addonId: null,
|
|
38774
38778
|
access: "view"
|
|
38775
38779
|
},
|
|
38776
|
-
"storage.getDefaultLocation": {
|
|
38777
|
-
capName: "storage",
|
|
38778
|
-
capScope: "system",
|
|
38779
|
-
addonId: null,
|
|
38780
|
-
access: "view"
|
|
38781
|
-
},
|
|
38782
38780
|
"storage.list": {
|
|
38783
38781
|
capName: "storage",
|
|
38784
38782
|
capScope: "system",
|
package/dist/addon.mjs
CHANGED
|
@@ -7617,111 +7617,6 @@ var CameraSwitchGroupSchema = object({
|
|
|
7617
7617
|
fetchedAt: number()
|
|
7618
7618
|
});
|
|
7619
7619
|
/**
|
|
7620
|
-
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
7621
|
-
* an addon declares its channels in.
|
|
7622
|
-
*
|
|
7623
|
-
* ## Two axes, deliberately separated
|
|
7624
|
-
*
|
|
7625
|
-
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
7626
|
-
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
7627
|
-
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
7628
|
-
* and rots silently. So a channel is declared where it is consulted, and the
|
|
7629
|
-
* `log-channels` capability enumerates the declarations.
|
|
7630
|
-
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
7631
|
-
* thing: the logging settings document on the `system` cap. Two authorities
|
|
7632
|
-
* over the values is the exact defect
|
|
7633
|
-
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
7634
|
-
* remove; re-introducing it from the cure side would be grotesque.
|
|
7635
|
-
*
|
|
7636
|
-
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
7637
|
-
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
7638
|
-
* the hot path with a value somebody actually read, and by
|
|
7639
|
-
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
7640
|
-
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
7641
|
-
* disarmed one (D49).
|
|
7642
|
-
*
|
|
7643
|
-
* ## The canonical call shape
|
|
7644
|
-
*
|
|
7645
|
-
* ```ts
|
|
7646
|
-
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
7647
|
-
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
7648
|
-
* }
|
|
7649
|
-
* ```
|
|
7650
|
-
*
|
|
7651
|
-
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
7652
|
-
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
7653
|
-
* object literal is never constructed because it lives inside the branch. It
|
|
7654
|
-
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
7655
|
-
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
7656
|
-
* destination floor (measured at 1.93 ns/call when off).
|
|
7657
|
-
*
|
|
7658
|
-
* ## Why a channel emits at `info`
|
|
7659
|
-
*
|
|
7660
|
-
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
7661
|
-
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
7662
|
-
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
7663
|
-
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
7664
|
-
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
7665
|
-
* emits at the channel's declared level, whose schema floor is `info`.
|
|
7666
|
-
*/
|
|
7667
|
-
/**
|
|
7668
|
-
* The level a channel writes at once armed.
|
|
7669
|
-
*
|
|
7670
|
-
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
7671
|
-
* not leave the process for Loki, and the whole point of arming a channel is
|
|
7672
|
-
* to read it later.
|
|
7673
|
-
*/
|
|
7674
|
-
var LogChannelLevelSchema = _enum([
|
|
7675
|
-
"info",
|
|
7676
|
-
"warn",
|
|
7677
|
-
"error"
|
|
7678
|
-
]);
|
|
7679
|
-
/**
|
|
7680
|
-
* What an addon declares about one channel. No value, no state — a
|
|
7681
|
-
* declaration is inert.
|
|
7682
|
-
*/
|
|
7683
|
-
var LogChannelDescriptorSchema = object({
|
|
7684
|
-
/**
|
|
7685
|
-
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
7686
|
-
* the addon's short name so an operator reading a channel list can tell who
|
|
7687
|
-
* owns it without a second lookup.
|
|
7688
|
-
*/
|
|
7689
|
-
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
7690
|
-
/** One sentence: what the operator will SEE after arming it. */
|
|
7691
|
-
description: string().min(1),
|
|
7692
|
-
/** The level its lines are emitted at. Never below `info`. */
|
|
7693
|
-
defaultLevel: LogChannelLevelSchema,
|
|
7694
|
-
/**
|
|
7695
|
-
* Whether this channel can be narrowed to a camera.
|
|
7696
|
-
*
|
|
7697
|
-
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
7698
|
-
* consulted with the numeric device id, AND every line the channel admits
|
|
7699
|
-
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
7700
|
-
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
7701
|
-
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
7702
|
-
* the body is the only way to filter.
|
|
7703
|
-
*
|
|
7704
|
-
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
7705
|
-
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
7706
|
-
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
7707
|
-
* path was never taken.
|
|
7708
|
-
*/
|
|
7709
|
-
perDevice: boolean()
|
|
7710
|
-
});
|
|
7711
|
-
/**
|
|
7712
|
-
* An armed window over one channel, as the document hands it to a mirror.
|
|
7713
|
-
*
|
|
7714
|
-
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
7715
|
-
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
7716
|
-
*/
|
|
7717
|
-
var LogChannelWindowSchema = object({
|
|
7718
|
-
channel: string().min(1),
|
|
7719
|
-
/** Epoch ms the window closes at. */
|
|
7720
|
-
armedUntilMs: number(),
|
|
7721
|
-
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
7722
|
-
deviceIds: array(number().int()).readonly().nullable()
|
|
7723
|
-
});
|
|
7724
|
-
/**
|
|
7725
7620
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
7726
7621
|
* recordings and events management surfaces.
|
|
7727
7622
|
*
|
|
@@ -8667,8 +8562,11 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
|
|
|
8667
8562
|
* `STORAGE_LOCATION_CARDINALITY` map has been removed.
|
|
8668
8563
|
*
|
|
8669
8564
|
* `id` is a stable namespaced string of the form `<type>:<slug>`.
|
|
8670
|
-
* The
|
|
8671
|
-
*
|
|
8565
|
+
* The seed names its first instance `<type>:default` — a NAME, not a flag.
|
|
8566
|
+
* There is no default location any more (D383): `enabled` is the whole write
|
|
8567
|
+
* model, and a bare type ref resolves to the sole location of the type, or —
|
|
8568
|
+
* transitionally, only while legacy NULL-stamped rows exist — to the row whose
|
|
8569
|
+
* slug is `default`.
|
|
8672
8570
|
*
|
|
8673
8571
|
* `isSystem` is a legacy persisted flag. Seed still creates the initial
|
|
8674
8572
|
* `<type>:default` locations; the flag is no longer a lock, a badge, or a
|
|
@@ -8689,21 +8587,20 @@ var StorageLocationSchema = object({
|
|
|
8689
8587
|
* flag at upsert time, not here (the schema is provider-agnostic).
|
|
8690
8588
|
*/
|
|
8691
8589
|
nodeId: string().optional(),
|
|
8692
|
-
isDefault: boolean().default(false),
|
|
8693
8590
|
isSystem: boolean().default(false),
|
|
8694
8591
|
/**
|
|
8695
|
-
*
|
|
8696
|
-
*
|
|
8697
|
-
*
|
|
8698
|
-
*
|
|
8699
|
-
*
|
|
8592
|
+
* THE write switch, and the only one (D383). `enabled: true` means every
|
|
8593
|
+
* consumer that chooses a write target for this type may write here, and all
|
|
8594
|
+
* enabled locations of a type are used TOGETHER; `false` means read-only —
|
|
8595
|
+
* still read, still played back, still age-swept, still drained, never
|
|
8596
|
+
* written.
|
|
8700
8597
|
*
|
|
8701
|
-
* OPTIONAL
|
|
8702
|
-
*
|
|
8703
|
-
*
|
|
8704
|
-
*
|
|
8705
|
-
*
|
|
8706
|
-
*
|
|
8598
|
+
* OPTIONAL only for the wire: an upsert that omits it means "leave what is
|
|
8599
|
+
* stored" on an update and "born inert unless it is the first location of its
|
|
8600
|
+
* type" on a create. On a PERSISTED row absence is legacy and it means
|
|
8601
|
+
* enabled — {@link isLocationEnabled} is the one place that says so, and the
|
|
8602
|
+
* orchestrator stamps every flagless row `true` once at hydrate so absence
|
|
8603
|
+
* stops existing rather than being re-derived on every read.
|
|
8707
8604
|
*/
|
|
8708
8605
|
enabled: boolean().optional(),
|
|
8709
8606
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
@@ -8716,10 +8613,12 @@ var StorageLocationSchema = object({
|
|
|
8716
8613
|
createdAt: number(),
|
|
8717
8614
|
updatedAt: number()
|
|
8718
8615
|
});
|
|
8616
|
+
object({ isDefault: boolean().optional() });
|
|
8719
8617
|
/**
|
|
8720
8618
|
* Reference accepted by consumer-facing `api.storage.*` calls.
|
|
8721
8619
|
* Either:
|
|
8722
|
-
* - a `StorageLocationType` (e.g. `'backups'`) →
|
|
8620
|
+
* - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
|
|
8621
|
+
* (transitionally, the `<type>:default`-slugged row when several exist)
|
|
8723
8622
|
* - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
|
|
8724
8623
|
*
|
|
8725
8624
|
* The orchestrator's `resolveRef(ref)` handles both cases.
|
|
@@ -8895,6 +8794,111 @@ var DecoderSessionConfigSchema = object({
|
|
|
8895
8794
|
*/
|
|
8896
8795
|
debug: boolean().optional()
|
|
8897
8796
|
});
|
|
8797
|
+
/**
|
|
8798
|
+
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
8799
|
+
* an addon declares its channels in.
|
|
8800
|
+
*
|
|
8801
|
+
* ## Two axes, deliberately separated
|
|
8802
|
+
*
|
|
8803
|
+
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
8804
|
+
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
8805
|
+
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
8806
|
+
* and rots silently. So a channel is declared where it is consulted, and the
|
|
8807
|
+
* `log-channels` capability enumerates the declarations.
|
|
8808
|
+
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
8809
|
+
* thing: the logging settings document on the `system` cap. Two authorities
|
|
8810
|
+
* over the values is the exact defect
|
|
8811
|
+
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
8812
|
+
* remove; re-introducing it from the cure side would be grotesque.
|
|
8813
|
+
*
|
|
8814
|
+
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
8815
|
+
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
8816
|
+
* the hot path with a value somebody actually read, and by
|
|
8817
|
+
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
8818
|
+
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
8819
|
+
* disarmed one (D49).
|
|
8820
|
+
*
|
|
8821
|
+
* ## The canonical call shape
|
|
8822
|
+
*
|
|
8823
|
+
* ```ts
|
|
8824
|
+
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
8825
|
+
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
8826
|
+
* }
|
|
8827
|
+
* ```
|
|
8828
|
+
*
|
|
8829
|
+
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
8830
|
+
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
8831
|
+
* object literal is never constructed because it lives inside the branch. It
|
|
8832
|
+
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
8833
|
+
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
8834
|
+
* destination floor (measured at 1.93 ns/call when off).
|
|
8835
|
+
*
|
|
8836
|
+
* ## Why a channel emits at `info`
|
|
8837
|
+
*
|
|
8838
|
+
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
8839
|
+
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
8840
|
+
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
8841
|
+
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
8842
|
+
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
8843
|
+
* emits at the channel's declared level, whose schema floor is `info`.
|
|
8844
|
+
*/
|
|
8845
|
+
/**
|
|
8846
|
+
* The level a channel writes at once armed.
|
|
8847
|
+
*
|
|
8848
|
+
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
8849
|
+
* not leave the process for Loki, and the whole point of arming a channel is
|
|
8850
|
+
* to read it later.
|
|
8851
|
+
*/
|
|
8852
|
+
var LogChannelLevelSchema = _enum([
|
|
8853
|
+
"info",
|
|
8854
|
+
"warn",
|
|
8855
|
+
"error"
|
|
8856
|
+
]);
|
|
8857
|
+
/**
|
|
8858
|
+
* What an addon declares about one channel. No value, no state — a
|
|
8859
|
+
* declaration is inert.
|
|
8860
|
+
*/
|
|
8861
|
+
var LogChannelDescriptorSchema = object({
|
|
8862
|
+
/**
|
|
8863
|
+
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
8864
|
+
* the addon's short name so an operator reading a channel list can tell who
|
|
8865
|
+
* owns it without a second lookup.
|
|
8866
|
+
*/
|
|
8867
|
+
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
8868
|
+
/** One sentence: what the operator will SEE after arming it. */
|
|
8869
|
+
description: string().min(1),
|
|
8870
|
+
/** The level its lines are emitted at. Never below `info`. */
|
|
8871
|
+
defaultLevel: LogChannelLevelSchema,
|
|
8872
|
+
/**
|
|
8873
|
+
* Whether this channel can be narrowed to a camera.
|
|
8874
|
+
*
|
|
8875
|
+
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
8876
|
+
* consulted with the numeric device id, AND every line the channel admits
|
|
8877
|
+
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
8878
|
+
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
8879
|
+
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
8880
|
+
* the body is the only way to filter.
|
|
8881
|
+
*
|
|
8882
|
+
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
8883
|
+
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
8884
|
+
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
8885
|
+
* path was never taken.
|
|
8886
|
+
*/
|
|
8887
|
+
perDevice: boolean()
|
|
8888
|
+
});
|
|
8889
|
+
/**
|
|
8890
|
+
* An armed window over one channel, as the document hands it to a mirror.
|
|
8891
|
+
*
|
|
8892
|
+
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
8893
|
+
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
8894
|
+
*/
|
|
8895
|
+
var LogChannelWindowSchema = object({
|
|
8896
|
+
channel: string().min(1),
|
|
8897
|
+
/** Epoch ms the window closes at. */
|
|
8898
|
+
armedUntilMs: number(),
|
|
8899
|
+
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
8900
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
8901
|
+
});
|
|
8898
8902
|
var MODEL_FORMATS = [
|
|
8899
8903
|
"onnx",
|
|
8900
8904
|
"coreml",
|
|
@@ -21927,7 +21931,7 @@ method(object({
|
|
|
21927
21931
|
downloadId: string(),
|
|
21928
21932
|
offset: number(),
|
|
21929
21933
|
length: number()
|
|
21930
|
-
}), _instanceof(Uint8Array)), method(object({ downloadId: string() }), _void(), { kind: "mutation" }), method(object({ type: StorageLocationTypeSchema.optional() }), array(StorageLocationSchema).readonly()), method(
|
|
21934
|
+
}), _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({
|
|
21931
21935
|
createdAt: true,
|
|
21932
21936
|
updatedAt: true
|
|
21933
21937
|
}), StorageLocationSchema, {
|
|
@@ -38772,12 +38776,6 @@ Object.freeze({
|
|
|
38772
38776
|
addonId: null,
|
|
38773
38777
|
access: "view"
|
|
38774
38778
|
},
|
|
38775
|
-
"storage.getDefaultLocation": {
|
|
38776
|
-
capName: "storage",
|
|
38777
|
-
capScope: "system",
|
|
38778
|
-
addonId: null,
|
|
38779
|
-
access: "view"
|
|
38780
|
-
},
|
|
38781
38779
|
"storage.list": {
|
|
38782
38780
|
capName: "storage",
|
|
38783
38781
|
capScope: "system",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-gree",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.78",
|
|
4
4
|
"description": "Gree air-conditioner device-provider addon for CamStack — wraps the @apocaliss92/nodegree local-UDP client (LAN discovery + AES control), exposing climate-control and fan-control",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|