@camstack/addon-import-alexa 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
|
@@ -7773,111 +7773,6 @@ var CameraSwitchGroupSchema = object({
|
|
|
7773
7773
|
fetchedAt: number()
|
|
7774
7774
|
});
|
|
7775
7775
|
/**
|
|
7776
|
-
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
7777
|
-
* an addon declares its channels in.
|
|
7778
|
-
*
|
|
7779
|
-
* ## Two axes, deliberately separated
|
|
7780
|
-
*
|
|
7781
|
-
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
7782
|
-
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
7783
|
-
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
7784
|
-
* and rots silently. So a channel is declared where it is consulted, and the
|
|
7785
|
-
* `log-channels` capability enumerates the declarations.
|
|
7786
|
-
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
7787
|
-
* thing: the logging settings document on the `system` cap. Two authorities
|
|
7788
|
-
* over the values is the exact defect
|
|
7789
|
-
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
7790
|
-
* remove; re-introducing it from the cure side would be grotesque.
|
|
7791
|
-
*
|
|
7792
|
-
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
7793
|
-
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
7794
|
-
* the hot path with a value somebody actually read, and by
|
|
7795
|
-
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
7796
|
-
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
7797
|
-
* disarmed one (D49).
|
|
7798
|
-
*
|
|
7799
|
-
* ## The canonical call shape
|
|
7800
|
-
*
|
|
7801
|
-
* ```ts
|
|
7802
|
-
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
7803
|
-
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
7804
|
-
* }
|
|
7805
|
-
* ```
|
|
7806
|
-
*
|
|
7807
|
-
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
7808
|
-
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
7809
|
-
* object literal is never constructed because it lives inside the branch. It
|
|
7810
|
-
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
7811
|
-
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
7812
|
-
* destination floor (measured at 1.93 ns/call when off).
|
|
7813
|
-
*
|
|
7814
|
-
* ## Why a channel emits at `info`
|
|
7815
|
-
*
|
|
7816
|
-
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
7817
|
-
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
7818
|
-
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
7819
|
-
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
7820
|
-
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
7821
|
-
* emits at the channel's declared level, whose schema floor is `info`.
|
|
7822
|
-
*/
|
|
7823
|
-
/**
|
|
7824
|
-
* The level a channel writes at once armed.
|
|
7825
|
-
*
|
|
7826
|
-
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
7827
|
-
* not leave the process for Loki, and the whole point of arming a channel is
|
|
7828
|
-
* to read it later.
|
|
7829
|
-
*/
|
|
7830
|
-
var LogChannelLevelSchema = _enum([
|
|
7831
|
-
"info",
|
|
7832
|
-
"warn",
|
|
7833
|
-
"error"
|
|
7834
|
-
]);
|
|
7835
|
-
/**
|
|
7836
|
-
* What an addon declares about one channel. No value, no state — a
|
|
7837
|
-
* declaration is inert.
|
|
7838
|
-
*/
|
|
7839
|
-
var LogChannelDescriptorSchema = object({
|
|
7840
|
-
/**
|
|
7841
|
-
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
7842
|
-
* the addon's short name so an operator reading a channel list can tell who
|
|
7843
|
-
* owns it without a second lookup.
|
|
7844
|
-
*/
|
|
7845
|
-
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
7846
|
-
/** One sentence: what the operator will SEE after arming it. */
|
|
7847
|
-
description: string().min(1),
|
|
7848
|
-
/** The level its lines are emitted at. Never below `info`. */
|
|
7849
|
-
defaultLevel: LogChannelLevelSchema,
|
|
7850
|
-
/**
|
|
7851
|
-
* Whether this channel can be narrowed to a camera.
|
|
7852
|
-
*
|
|
7853
|
-
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
7854
|
-
* consulted with the numeric device id, AND every line the channel admits
|
|
7855
|
-
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
7856
|
-
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
7857
|
-
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
7858
|
-
* the body is the only way to filter.
|
|
7859
|
-
*
|
|
7860
|
-
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
7861
|
-
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
7862
|
-
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
7863
|
-
* path was never taken.
|
|
7864
|
-
*/
|
|
7865
|
-
perDevice: boolean()
|
|
7866
|
-
});
|
|
7867
|
-
/**
|
|
7868
|
-
* An armed window over one channel, as the document hands it to a mirror.
|
|
7869
|
-
*
|
|
7870
|
-
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
7871
|
-
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
7872
|
-
*/
|
|
7873
|
-
var LogChannelWindowSchema = object({
|
|
7874
|
-
channel: string().min(1),
|
|
7875
|
-
/** Epoch ms the window closes at. */
|
|
7876
|
-
armedUntilMs: number(),
|
|
7877
|
-
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
7878
|
-
deviceIds: array(number().int()).readonly().nullable()
|
|
7879
|
-
});
|
|
7880
|
-
/**
|
|
7881
7776
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
7882
7777
|
* recordings and events management surfaces.
|
|
7883
7778
|
*
|
|
@@ -8823,8 +8718,11 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
|
|
|
8823
8718
|
* `STORAGE_LOCATION_CARDINALITY` map has been removed.
|
|
8824
8719
|
*
|
|
8825
8720
|
* `id` is a stable namespaced string of the form `<type>:<slug>`.
|
|
8826
|
-
* The
|
|
8827
|
-
*
|
|
8721
|
+
* The seed names its first instance `<type>:default` — a NAME, not a flag.
|
|
8722
|
+
* There is no default location any more (D383): `enabled` is the whole write
|
|
8723
|
+
* model, and a bare type ref resolves to the sole location of the type, or —
|
|
8724
|
+
* transitionally, only while legacy NULL-stamped rows exist — to the row whose
|
|
8725
|
+
* slug is `default`.
|
|
8828
8726
|
*
|
|
8829
8727
|
* `isSystem` is a legacy persisted flag. Seed still creates the initial
|
|
8830
8728
|
* `<type>:default` locations; the flag is no longer a lock, a badge, or a
|
|
@@ -8845,21 +8743,20 @@ var StorageLocationSchema = object({
|
|
|
8845
8743
|
* flag at upsert time, not here (the schema is provider-agnostic).
|
|
8846
8744
|
*/
|
|
8847
8745
|
nodeId: string().optional(),
|
|
8848
|
-
isDefault: boolean().default(false),
|
|
8849
8746
|
isSystem: boolean().default(false),
|
|
8850
8747
|
/**
|
|
8851
|
-
*
|
|
8852
|
-
*
|
|
8853
|
-
*
|
|
8854
|
-
*
|
|
8855
|
-
*
|
|
8748
|
+
* THE write switch, and the only one (D383). `enabled: true` means every
|
|
8749
|
+
* consumer that chooses a write target for this type may write here, and all
|
|
8750
|
+
* enabled locations of a type are used TOGETHER; `false` means read-only —
|
|
8751
|
+
* still read, still played back, still age-swept, still drained, never
|
|
8752
|
+
* written.
|
|
8856
8753
|
*
|
|
8857
|
-
* OPTIONAL
|
|
8858
|
-
*
|
|
8859
|
-
*
|
|
8860
|
-
*
|
|
8861
|
-
*
|
|
8862
|
-
*
|
|
8754
|
+
* OPTIONAL only for the wire: an upsert that omits it means "leave what is
|
|
8755
|
+
* stored" on an update and "born inert unless it is the first location of its
|
|
8756
|
+
* type" on a create. On a PERSISTED row absence is legacy and it means
|
|
8757
|
+
* enabled — {@link isLocationEnabled} is the one place that says so, and the
|
|
8758
|
+
* orchestrator stamps every flagless row `true` once at hydrate so absence
|
|
8759
|
+
* stops existing rather than being re-derived on every read.
|
|
8863
8760
|
*/
|
|
8864
8761
|
enabled: boolean().optional(),
|
|
8865
8762
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
@@ -8872,10 +8769,12 @@ var StorageLocationSchema = object({
|
|
|
8872
8769
|
createdAt: number(),
|
|
8873
8770
|
updatedAt: number()
|
|
8874
8771
|
});
|
|
8772
|
+
object({ isDefault: boolean().optional() });
|
|
8875
8773
|
/**
|
|
8876
8774
|
* Reference accepted by consumer-facing `api.storage.*` calls.
|
|
8877
8775
|
* Either:
|
|
8878
|
-
* - a `StorageLocationType` (e.g. `'backups'`) →
|
|
8776
|
+
* - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
|
|
8777
|
+
* (transitionally, the `<type>:default`-slugged row when several exist)
|
|
8879
8778
|
* - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
|
|
8880
8779
|
*
|
|
8881
8780
|
* The orchestrator's `resolveRef(ref)` handles both cases.
|
|
@@ -9051,6 +8950,111 @@ var DecoderSessionConfigSchema = object({
|
|
|
9051
8950
|
*/
|
|
9052
8951
|
debug: boolean().optional()
|
|
9053
8952
|
});
|
|
8953
|
+
/**
|
|
8954
|
+
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
8955
|
+
* an addon declares its channels in.
|
|
8956
|
+
*
|
|
8957
|
+
* ## Two axes, deliberately separated
|
|
8958
|
+
*
|
|
8959
|
+
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
8960
|
+
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
8961
|
+
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
8962
|
+
* and rots silently. So a channel is declared where it is consulted, and the
|
|
8963
|
+
* `log-channels` capability enumerates the declarations.
|
|
8964
|
+
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
8965
|
+
* thing: the logging settings document on the `system` cap. Two authorities
|
|
8966
|
+
* over the values is the exact defect
|
|
8967
|
+
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
8968
|
+
* remove; re-introducing it from the cure side would be grotesque.
|
|
8969
|
+
*
|
|
8970
|
+
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
8971
|
+
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
8972
|
+
* the hot path with a value somebody actually read, and by
|
|
8973
|
+
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
8974
|
+
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
8975
|
+
* disarmed one (D49).
|
|
8976
|
+
*
|
|
8977
|
+
* ## The canonical call shape
|
|
8978
|
+
*
|
|
8979
|
+
* ```ts
|
|
8980
|
+
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
8981
|
+
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
8982
|
+
* }
|
|
8983
|
+
* ```
|
|
8984
|
+
*
|
|
8985
|
+
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
8986
|
+
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
8987
|
+
* object literal is never constructed because it lives inside the branch. It
|
|
8988
|
+
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
8989
|
+
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
8990
|
+
* destination floor (measured at 1.93 ns/call when off).
|
|
8991
|
+
*
|
|
8992
|
+
* ## Why a channel emits at `info`
|
|
8993
|
+
*
|
|
8994
|
+
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
8995
|
+
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
8996
|
+
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
8997
|
+
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
8998
|
+
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
8999
|
+
* emits at the channel's declared level, whose schema floor is `info`.
|
|
9000
|
+
*/
|
|
9001
|
+
/**
|
|
9002
|
+
* The level a channel writes at once armed.
|
|
9003
|
+
*
|
|
9004
|
+
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
9005
|
+
* not leave the process for Loki, and the whole point of arming a channel is
|
|
9006
|
+
* to read it later.
|
|
9007
|
+
*/
|
|
9008
|
+
var LogChannelLevelSchema = _enum([
|
|
9009
|
+
"info",
|
|
9010
|
+
"warn",
|
|
9011
|
+
"error"
|
|
9012
|
+
]);
|
|
9013
|
+
/**
|
|
9014
|
+
* What an addon declares about one channel. No value, no state — a
|
|
9015
|
+
* declaration is inert.
|
|
9016
|
+
*/
|
|
9017
|
+
var LogChannelDescriptorSchema = object({
|
|
9018
|
+
/**
|
|
9019
|
+
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
9020
|
+
* the addon's short name so an operator reading a channel list can tell who
|
|
9021
|
+
* owns it without a second lookup.
|
|
9022
|
+
*/
|
|
9023
|
+
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
9024
|
+
/** One sentence: what the operator will SEE after arming it. */
|
|
9025
|
+
description: string().min(1),
|
|
9026
|
+
/** The level its lines are emitted at. Never below `info`. */
|
|
9027
|
+
defaultLevel: LogChannelLevelSchema,
|
|
9028
|
+
/**
|
|
9029
|
+
* Whether this channel can be narrowed to a camera.
|
|
9030
|
+
*
|
|
9031
|
+
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
9032
|
+
* consulted with the numeric device id, AND every line the channel admits
|
|
9033
|
+
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
9034
|
+
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
9035
|
+
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
9036
|
+
* the body is the only way to filter.
|
|
9037
|
+
*
|
|
9038
|
+
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
9039
|
+
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
9040
|
+
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
9041
|
+
* path was never taken.
|
|
9042
|
+
*/
|
|
9043
|
+
perDevice: boolean()
|
|
9044
|
+
});
|
|
9045
|
+
/**
|
|
9046
|
+
* An armed window over one channel, as the document hands it to a mirror.
|
|
9047
|
+
*
|
|
9048
|
+
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
9049
|
+
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
9050
|
+
*/
|
|
9051
|
+
var LogChannelWindowSchema = object({
|
|
9052
|
+
channel: string().min(1),
|
|
9053
|
+
/** Epoch ms the window closes at. */
|
|
9054
|
+
armedUntilMs: number(),
|
|
9055
|
+
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
9056
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
9057
|
+
});
|
|
9054
9058
|
var MODEL_FORMATS = [
|
|
9055
9059
|
"onnx",
|
|
9056
9060
|
"coreml",
|
|
@@ -22168,7 +22172,7 @@ method(object({
|
|
|
22168
22172
|
downloadId: string(),
|
|
22169
22173
|
offset: number(),
|
|
22170
22174
|
length: number()
|
|
22171
|
-
}), _instanceof(Uint8Array)), method(object({ downloadId: string() }), _void(), { kind: "mutation" }), method(object({ type: StorageLocationTypeSchema.optional() }), array(StorageLocationSchema).readonly()), method(
|
|
22175
|
+
}), _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({
|
|
22172
22176
|
createdAt: true,
|
|
22173
22177
|
updatedAt: true
|
|
22174
22178
|
}), StorageLocationSchema, {
|
|
@@ -39030,12 +39034,6 @@ Object.freeze({
|
|
|
39030
39034
|
addonId: null,
|
|
39031
39035
|
access: "view"
|
|
39032
39036
|
},
|
|
39033
|
-
"storage.getDefaultLocation": {
|
|
39034
|
-
capName: "storage",
|
|
39035
|
-
capScope: "system",
|
|
39036
|
-
addonId: null,
|
|
39037
|
-
access: "view"
|
|
39038
|
-
},
|
|
39039
39037
|
"storage.list": {
|
|
39040
39038
|
capName: "storage",
|
|
39041
39039
|
capScope: "system",
|
package/dist/addon.mjs
CHANGED
|
@@ -7773,111 +7773,6 @@ var CameraSwitchGroupSchema = object({
|
|
|
7773
7773
|
fetchedAt: number()
|
|
7774
7774
|
});
|
|
7775
7775
|
/**
|
|
7776
|
-
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
7777
|
-
* an addon declares its channels in.
|
|
7778
|
-
*
|
|
7779
|
-
* ## Two axes, deliberately separated
|
|
7780
|
-
*
|
|
7781
|
-
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
7782
|
-
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
7783
|
-
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
7784
|
-
* and rots silently. So a channel is declared where it is consulted, and the
|
|
7785
|
-
* `log-channels` capability enumerates the declarations.
|
|
7786
|
-
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
7787
|
-
* thing: the logging settings document on the `system` cap. Two authorities
|
|
7788
|
-
* over the values is the exact defect
|
|
7789
|
-
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
7790
|
-
* remove; re-introducing it from the cure side would be grotesque.
|
|
7791
|
-
*
|
|
7792
|
-
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
7793
|
-
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
7794
|
-
* the hot path with a value somebody actually read, and by
|
|
7795
|
-
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
7796
|
-
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
7797
|
-
* disarmed one (D49).
|
|
7798
|
-
*
|
|
7799
|
-
* ## The canonical call shape
|
|
7800
|
-
*
|
|
7801
|
-
* ```ts
|
|
7802
|
-
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
7803
|
-
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
7804
|
-
* }
|
|
7805
|
-
* ```
|
|
7806
|
-
*
|
|
7807
|
-
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
7808
|
-
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
7809
|
-
* object literal is never constructed because it lives inside the branch. It
|
|
7810
|
-
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
7811
|
-
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
7812
|
-
* destination floor (measured at 1.93 ns/call when off).
|
|
7813
|
-
*
|
|
7814
|
-
* ## Why a channel emits at `info`
|
|
7815
|
-
*
|
|
7816
|
-
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
7817
|
-
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
7818
|
-
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
7819
|
-
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
7820
|
-
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
7821
|
-
* emits at the channel's declared level, whose schema floor is `info`.
|
|
7822
|
-
*/
|
|
7823
|
-
/**
|
|
7824
|
-
* The level a channel writes at once armed.
|
|
7825
|
-
*
|
|
7826
|
-
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
7827
|
-
* not leave the process for Loki, and the whole point of arming a channel is
|
|
7828
|
-
* to read it later.
|
|
7829
|
-
*/
|
|
7830
|
-
var LogChannelLevelSchema = _enum([
|
|
7831
|
-
"info",
|
|
7832
|
-
"warn",
|
|
7833
|
-
"error"
|
|
7834
|
-
]);
|
|
7835
|
-
/**
|
|
7836
|
-
* What an addon declares about one channel. No value, no state — a
|
|
7837
|
-
* declaration is inert.
|
|
7838
|
-
*/
|
|
7839
|
-
var LogChannelDescriptorSchema = object({
|
|
7840
|
-
/**
|
|
7841
|
-
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
7842
|
-
* the addon's short name so an operator reading a channel list can tell who
|
|
7843
|
-
* owns it without a second lookup.
|
|
7844
|
-
*/
|
|
7845
|
-
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
7846
|
-
/** One sentence: what the operator will SEE after arming it. */
|
|
7847
|
-
description: string().min(1),
|
|
7848
|
-
/** The level its lines are emitted at. Never below `info`. */
|
|
7849
|
-
defaultLevel: LogChannelLevelSchema,
|
|
7850
|
-
/**
|
|
7851
|
-
* Whether this channel can be narrowed to a camera.
|
|
7852
|
-
*
|
|
7853
|
-
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
7854
|
-
* consulted with the numeric device id, AND every line the channel admits
|
|
7855
|
-
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
7856
|
-
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
7857
|
-
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
7858
|
-
* the body is the only way to filter.
|
|
7859
|
-
*
|
|
7860
|
-
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
7861
|
-
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
7862
|
-
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
7863
|
-
* path was never taken.
|
|
7864
|
-
*/
|
|
7865
|
-
perDevice: boolean()
|
|
7866
|
-
});
|
|
7867
|
-
/**
|
|
7868
|
-
* An armed window over one channel, as the document hands it to a mirror.
|
|
7869
|
-
*
|
|
7870
|
-
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
7871
|
-
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
7872
|
-
*/
|
|
7873
|
-
var LogChannelWindowSchema = object({
|
|
7874
|
-
channel: string().min(1),
|
|
7875
|
-
/** Epoch ms the window closes at. */
|
|
7876
|
-
armedUntilMs: number(),
|
|
7877
|
-
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
7878
|
-
deviceIds: array(number().int()).readonly().nullable()
|
|
7879
|
-
});
|
|
7880
|
-
/**
|
|
7881
7776
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
7882
7777
|
* recordings and events management surfaces.
|
|
7883
7778
|
*
|
|
@@ -8823,8 +8718,11 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
|
|
|
8823
8718
|
* `STORAGE_LOCATION_CARDINALITY` map has been removed.
|
|
8824
8719
|
*
|
|
8825
8720
|
* `id` is a stable namespaced string of the form `<type>:<slug>`.
|
|
8826
|
-
* The
|
|
8827
|
-
*
|
|
8721
|
+
* The seed names its first instance `<type>:default` — a NAME, not a flag.
|
|
8722
|
+
* There is no default location any more (D383): `enabled` is the whole write
|
|
8723
|
+
* model, and a bare type ref resolves to the sole location of the type, or —
|
|
8724
|
+
* transitionally, only while legacy NULL-stamped rows exist — to the row whose
|
|
8725
|
+
* slug is `default`.
|
|
8828
8726
|
*
|
|
8829
8727
|
* `isSystem` is a legacy persisted flag. Seed still creates the initial
|
|
8830
8728
|
* `<type>:default` locations; the flag is no longer a lock, a badge, or a
|
|
@@ -8845,21 +8743,20 @@ var StorageLocationSchema = object({
|
|
|
8845
8743
|
* flag at upsert time, not here (the schema is provider-agnostic).
|
|
8846
8744
|
*/
|
|
8847
8745
|
nodeId: string().optional(),
|
|
8848
|
-
isDefault: boolean().default(false),
|
|
8849
8746
|
isSystem: boolean().default(false),
|
|
8850
8747
|
/**
|
|
8851
|
-
*
|
|
8852
|
-
*
|
|
8853
|
-
*
|
|
8854
|
-
*
|
|
8855
|
-
*
|
|
8748
|
+
* THE write switch, and the only one (D383). `enabled: true` means every
|
|
8749
|
+
* consumer that chooses a write target for this type may write here, and all
|
|
8750
|
+
* enabled locations of a type are used TOGETHER; `false` means read-only —
|
|
8751
|
+
* still read, still played back, still age-swept, still drained, never
|
|
8752
|
+
* written.
|
|
8856
8753
|
*
|
|
8857
|
-
* OPTIONAL
|
|
8858
|
-
*
|
|
8859
|
-
*
|
|
8860
|
-
*
|
|
8861
|
-
*
|
|
8862
|
-
*
|
|
8754
|
+
* OPTIONAL only for the wire: an upsert that omits it means "leave what is
|
|
8755
|
+
* stored" on an update and "born inert unless it is the first location of its
|
|
8756
|
+
* type" on a create. On a PERSISTED row absence is legacy and it means
|
|
8757
|
+
* enabled — {@link isLocationEnabled} is the one place that says so, and the
|
|
8758
|
+
* orchestrator stamps every flagless row `true` once at hydrate so absence
|
|
8759
|
+
* stops existing rather than being re-derived on every read.
|
|
8863
8760
|
*/
|
|
8864
8761
|
enabled: boolean().optional(),
|
|
8865
8762
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
@@ -8872,10 +8769,12 @@ var StorageLocationSchema = object({
|
|
|
8872
8769
|
createdAt: number(),
|
|
8873
8770
|
updatedAt: number()
|
|
8874
8771
|
});
|
|
8772
|
+
object({ isDefault: boolean().optional() });
|
|
8875
8773
|
/**
|
|
8876
8774
|
* Reference accepted by consumer-facing `api.storage.*` calls.
|
|
8877
8775
|
* Either:
|
|
8878
|
-
* - a `StorageLocationType` (e.g. `'backups'`) →
|
|
8776
|
+
* - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
|
|
8777
|
+
* (transitionally, the `<type>:default`-slugged row when several exist)
|
|
8879
8778
|
* - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
|
|
8880
8779
|
*
|
|
8881
8780
|
* The orchestrator's `resolveRef(ref)` handles both cases.
|
|
@@ -9051,6 +8950,111 @@ var DecoderSessionConfigSchema = object({
|
|
|
9051
8950
|
*/
|
|
9052
8951
|
debug: boolean().optional()
|
|
9053
8952
|
});
|
|
8953
|
+
/**
|
|
8954
|
+
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
8955
|
+
* an addon declares its channels in.
|
|
8956
|
+
*
|
|
8957
|
+
* ## Two axes, deliberately separated
|
|
8958
|
+
*
|
|
8959
|
+
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
8960
|
+
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
8961
|
+
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
8962
|
+
* and rots silently. So a channel is declared where it is consulted, and the
|
|
8963
|
+
* `log-channels` capability enumerates the declarations.
|
|
8964
|
+
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
8965
|
+
* thing: the logging settings document on the `system` cap. Two authorities
|
|
8966
|
+
* over the values is the exact defect
|
|
8967
|
+
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
8968
|
+
* remove; re-introducing it from the cure side would be grotesque.
|
|
8969
|
+
*
|
|
8970
|
+
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
8971
|
+
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
8972
|
+
* the hot path with a value somebody actually read, and by
|
|
8973
|
+
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
8974
|
+
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
8975
|
+
* disarmed one (D49).
|
|
8976
|
+
*
|
|
8977
|
+
* ## The canonical call shape
|
|
8978
|
+
*
|
|
8979
|
+
* ```ts
|
|
8980
|
+
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
8981
|
+
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
8982
|
+
* }
|
|
8983
|
+
* ```
|
|
8984
|
+
*
|
|
8985
|
+
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
8986
|
+
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
8987
|
+
* object literal is never constructed because it lives inside the branch. It
|
|
8988
|
+
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
8989
|
+
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
8990
|
+
* destination floor (measured at 1.93 ns/call when off).
|
|
8991
|
+
*
|
|
8992
|
+
* ## Why a channel emits at `info`
|
|
8993
|
+
*
|
|
8994
|
+
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
8995
|
+
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
8996
|
+
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
8997
|
+
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
8998
|
+
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
8999
|
+
* emits at the channel's declared level, whose schema floor is `info`.
|
|
9000
|
+
*/
|
|
9001
|
+
/**
|
|
9002
|
+
* The level a channel writes at once armed.
|
|
9003
|
+
*
|
|
9004
|
+
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
9005
|
+
* not leave the process for Loki, and the whole point of arming a channel is
|
|
9006
|
+
* to read it later.
|
|
9007
|
+
*/
|
|
9008
|
+
var LogChannelLevelSchema = _enum([
|
|
9009
|
+
"info",
|
|
9010
|
+
"warn",
|
|
9011
|
+
"error"
|
|
9012
|
+
]);
|
|
9013
|
+
/**
|
|
9014
|
+
* What an addon declares about one channel. No value, no state — a
|
|
9015
|
+
* declaration is inert.
|
|
9016
|
+
*/
|
|
9017
|
+
var LogChannelDescriptorSchema = object({
|
|
9018
|
+
/**
|
|
9019
|
+
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
9020
|
+
* the addon's short name so an operator reading a channel list can tell who
|
|
9021
|
+
* owns it without a second lookup.
|
|
9022
|
+
*/
|
|
9023
|
+
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
9024
|
+
/** One sentence: what the operator will SEE after arming it. */
|
|
9025
|
+
description: string().min(1),
|
|
9026
|
+
/** The level its lines are emitted at. Never below `info`. */
|
|
9027
|
+
defaultLevel: LogChannelLevelSchema,
|
|
9028
|
+
/**
|
|
9029
|
+
* Whether this channel can be narrowed to a camera.
|
|
9030
|
+
*
|
|
9031
|
+
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
9032
|
+
* consulted with the numeric device id, AND every line the channel admits
|
|
9033
|
+
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
9034
|
+
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
9035
|
+
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
9036
|
+
* the body is the only way to filter.
|
|
9037
|
+
*
|
|
9038
|
+
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
9039
|
+
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
9040
|
+
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
9041
|
+
* path was never taken.
|
|
9042
|
+
*/
|
|
9043
|
+
perDevice: boolean()
|
|
9044
|
+
});
|
|
9045
|
+
/**
|
|
9046
|
+
* An armed window over one channel, as the document hands it to a mirror.
|
|
9047
|
+
*
|
|
9048
|
+
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
9049
|
+
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
9050
|
+
*/
|
|
9051
|
+
var LogChannelWindowSchema = object({
|
|
9052
|
+
channel: string().min(1),
|
|
9053
|
+
/** Epoch ms the window closes at. */
|
|
9054
|
+
armedUntilMs: number(),
|
|
9055
|
+
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
9056
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
9057
|
+
});
|
|
9054
9058
|
var MODEL_FORMATS = [
|
|
9055
9059
|
"onnx",
|
|
9056
9060
|
"coreml",
|
|
@@ -22168,7 +22172,7 @@ method(object({
|
|
|
22168
22172
|
downloadId: string(),
|
|
22169
22173
|
offset: number(),
|
|
22170
22174
|
length: number()
|
|
22171
|
-
}), _instanceof(Uint8Array)), method(object({ downloadId: string() }), _void(), { kind: "mutation" }), method(object({ type: StorageLocationTypeSchema.optional() }), array(StorageLocationSchema).readonly()), method(
|
|
22175
|
+
}), _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({
|
|
22172
22176
|
createdAt: true,
|
|
22173
22177
|
updatedAt: true
|
|
22174
22178
|
}), StorageLocationSchema, {
|
|
@@ -39030,12 +39034,6 @@ Object.freeze({
|
|
|
39030
39034
|
addonId: null,
|
|
39031
39035
|
access: "view"
|
|
39032
39036
|
},
|
|
39033
|
-
"storage.getDefaultLocation": {
|
|
39034
|
-
capName: "storage",
|
|
39035
|
-
capScope: "system",
|
|
39036
|
-
addonId: null,
|
|
39037
|
-
access: "view"
|
|
39038
|
-
},
|
|
39039
39037
|
"storage.list": {
|
|
39040
39038
|
capName: "storage",
|
|
39041
39039
|
capScope: "system",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-import-alexa",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.78",
|
|
4
4
|
"description": "Alexa device-import provider for CamStack — imports the smart-home devices in a user's Alexa account via the unofficial alexa-remote2 cookie/token client (the inverse of the Alexa exporter)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|