@camstack/addon-agent-ui 1.2.83 → 1.2.84
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 +126 -128
- 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",
|
|
@@ -21560,7 +21564,7 @@ method(object({
|
|
|
21560
21564
|
downloadId: string(),
|
|
21561
21565
|
offset: number(),
|
|
21562
21566
|
length: number()
|
|
21563
|
-
}), _instanceof(Uint8Array)), method(object({ downloadId: string() }), _void(), { kind: "mutation" }), method(object({ type: StorageLocationTypeSchema.optional() }), array(StorageLocationSchema).readonly()), method(
|
|
21567
|
+
}), _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({
|
|
21564
21568
|
createdAt: true,
|
|
21565
21569
|
updatedAt: true
|
|
21566
21570
|
}), StorageLocationSchema, {
|
|
@@ -34409,12 +34413,6 @@ Object.freeze({
|
|
|
34409
34413
|
addonId: null,
|
|
34410
34414
|
access: "view"
|
|
34411
34415
|
},
|
|
34412
|
-
"storage.getDefaultLocation": {
|
|
34413
|
-
capName: "storage",
|
|
34414
|
-
capScope: "system",
|
|
34415
|
-
addonId: null,
|
|
34416
|
-
access: "view"
|
|
34417
|
-
},
|
|
34418
34416
|
"storage.list": {
|
|
34419
34417
|
capName: "storage",
|
|
34420
34418
|
capScope: "system",
|
|
@@ -37966,7 +37964,7 @@ var AgentUIAddon = class extends BaseAddon {
|
|
|
37966
37964
|
capability: adminUiCapability,
|
|
37967
37965
|
provider: {
|
|
37968
37966
|
getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
|
|
37969
|
-
getVersion: async () => ({ version: "1.2.
|
|
37967
|
+
getVersion: async () => ({ version: "1.2.84" })
|
|
37970
37968
|
}
|
|
37971
37969
|
}];
|
|
37972
37970
|
}
|