@camstack/addon-agent-ui 1.2.80 → 1.2.82

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.
Files changed (2) hide show
  1. package/dist/addon.js +67 -39
  2. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -7852,17 +7852,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7852
7852
  /**
7853
7853
  * DERIVED per-camera storage summary — the single field cheap consumers read
7854
7854
  * (the viewer's status dot, the camera list) instead of walking `bands`:
7855
- * - `off` — no band covers the camera (or it is disabled).
7856
- * - `events` — every band records around triggers only.
7857
- * - `continuous` — at least one band records continuously.
7858
- *
7859
- * NEVER authored: the recorder stamps it from the authoritative `bands` on
7860
- * every save (`activeModeForConfig`). Writing it has no effect.
7855
+ * - `off` — no band covers the camera (or it is disabled).
7856
+ * - `events` — every band records around triggers only.
7857
+ * - `continuous` — at least one band records continuously.
7858
+ * - `on-device-decision`— the DEVICE decides: recording runs for as long as the
7859
+ * camera raises its own `recording-signal` level (a robot that cleans). There
7860
+ * is no schedule to author, because there is no hour to program — see
7861
+ * {@link RecordingConfigSchema}`.deviceDecision`.
7862
+ *
7863
+ * NEVER authored: the recorder stamps it from the authoritative intent
7864
+ * (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
7865
+ * has no effect.
7866
+ *
7867
+ * `on-device-decision` is named for WHO decides, not for how the recording is
7868
+ * requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
7869
+ * something the operator makes (the live gate is the recorder's own "demand
7870
+ * window"), and a knob whose name suggests the operator starts it while the
7871
+ * device actually does is the D62 shape — a control nobody can predict.
7861
7872
  */
7862
7873
  var RecordingStorageModeSchema = _enum([
7863
7874
  "off",
7864
7875
  "events",
7865
- "continuous"
7876
+ "continuous",
7877
+ "on-device-decision"
7866
7878
  ]);
7867
7879
  /**
7868
7880
  * Le macro classi che possono aprire una finestra di registrazione — le stesse
@@ -7912,22 +7924,7 @@ var RecordingTriggersSchema = object({
7912
7924
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7913
7925
  * registrare.
7914
7926
  */
7915
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
7916
- /**
7917
- * La camera registra per tutta la durata del SEGNALE che lei stessa
7918
- * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
7919
- * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
7920
- * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
7921
- * caduta, così una pulizia di quaranta minuti è UNA clip.
7922
- *
7923
- * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
7924
- * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
7925
- * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
7926
- * segnale mai abbassato (un evento perso) non può tenere aperta una
7927
- * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
7928
- * (`holdTrigger` / `releaseTrigger`).
7929
- */
7930
- deviceSignal: boolean().optional()
7927
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7931
7928
  });
7932
7929
  /**
7933
7930
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -7957,13 +7954,28 @@ var RecordingBandSchema = object({
7957
7954
  end: string().regex(HHMM),
7958
7955
  mode: RecordingBandModeSchema,
7959
7956
  triggers: RecordingBandTriggersSchema.optional(),
7957
+ /**
7958
+ * RETIRED (D381). A band no longer carries a pre-buffer of its own.
7959
+ *
7960
+ * It was the retroactive KEEP bound — which already-written segments survive
7961
+ * a trigger — and it had to be at least as wide as the widest pre-roll the
7962
+ * broker could serve, or the gate would delete the seconds the ring had just
7963
+ * handed the writer. That "at least as wide as" is the tell: it was a second
7964
+ * expression of the broker's retention, in different units, in a different
7965
+ * addon, with an invariant the operator had to maintain by hand. The keep
7966
+ * bound is now derived from the one prebuffer ceiling and there is nothing
7967
+ * left to configure here.
7968
+ *
7969
+ * The key survives in the SHAPE so a config written before that record still
7970
+ * parses and can be migrated deliberately — `RecordingBandSchema` is not
7971
+ * strict, so simply deleting it would strip an operator's value in silence on
7972
+ * the next save (the failure D380 came one commit from shipping). Nothing
7973
+ * reads it: {@link stripRetiredBandPreBufferSec} removes it on load.
7974
+ */
7960
7975
  preBufferSec: number().min(0).optional(),
7961
7976
  postBufferSec: number().min(0).optional()
7962
7977
  });
7963
- ({
7964
- preBufferSec: 15,
7965
- postBufferSec: 30
7966
- }).postBufferSec * 1e3;
7978
+ ({ postBufferSec: 30 }).postBufferSec * 1e3;
7967
7979
  /**
7968
7980
  * Per-device retention overrides. Every field is optional; an unset or `0`
7969
7981
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -8011,8 +8023,29 @@ var RecordingConfigSchema = object({
8011
8023
  * "off" is the absence of a covering band, never a band value.
8012
8024
  */
8013
8025
  bands: array(RecordingBandSchema).default([]),
8026
+ /**
8027
+ * THE device-decided intent: record for as long as the camera itself raises
8028
+ * `recording-signal` (`active: true` while the device is in function — a
8029
+ * robot that cleans). AUTHORED, unlike `mode`, and the only authored
8030
+ * recording intent that is not a band.
8031
+ *
8032
+ * It carries NO schedule on purpose. A band is an HOUR, and this feature has
8033
+ * no hour to program: the device decides. What it costs the operator is one
8034
+ * flag — "this camera can record on its own" — and what it buys is the same
8035
+ * hold/release the recorder already implements (D371, `holdTrigger` /
8036
+ * `releaseTrigger`): the window opens on the rise, stays open for the whole
8037
+ * job however long it is, and closes one pad after the fall.
8038
+ *
8039
+ * EXCLUSIVE with `bands` (below): two authorities deciding when the same
8040
+ * camera records is the D62 failure. `off` remains `enabled: false`, so an
8041
+ * operator switching this camera off is REPORTED off, never as broken.
8042
+ */
8043
+ deviceDecision: boolean().optional(),
8014
8044
  retention: RecordingRetentionSchema.optional()
8015
- }).strict();
8045
+ }).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
8046
+ message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
8047
+ path: ["bands"]
8048
+ });
8016
8049
  /**
8017
8050
  * Entity-relocation job state (storage entity-routing spec, Phase 4).
8018
8051
  *
@@ -20660,11 +20693,7 @@ var CameraAudioStatusSchema = object({
20660
20693
  });
20661
20694
  /** Recording block — null when no recording cap is active for this device. */
20662
20695
  var CameraRecordingStatusSchema = object({
20663
- mode: _enum([
20664
- "off",
20665
- "continuous",
20666
- "events"
20667
- ]),
20696
+ mode: RecordingStorageModeSchema,
20668
20697
  active: boolean(),
20669
20698
  storageBytes: number()
20670
20699
  });
@@ -27070,11 +27099,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
27070
27099
  var RecordingStatusSchema = object({
27071
27100
  deviceId: number(),
27072
27101
  enabled: boolean(),
27073
- activeMode: _enum([
27074
- "off",
27075
- "continuous",
27076
- "events"
27077
- ]),
27102
+ /** THE derived storage mode, from the one definition
27103
+ * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
27104
+ * `on-device-decision` could have reached the recorder and not the status. */
27105
+ activeMode: RecordingStorageModeSchema,
27078
27106
  nodeId: string(),
27079
27107
  storageBytes: number()
27080
27108
  });
@@ -37919,7 +37947,7 @@ var AgentUIAddon = class extends BaseAddon {
37919
37947
  capability: adminUiCapability,
37920
37948
  provider: {
37921
37949
  getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
37922
- getVersion: async () => ({ version: "1.2.80" })
37950
+ getVersion: async () => ({ version: "1.2.82" })
37923
37951
  }
37924
37952
  }];
37925
37953
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-agent-ui",
3
- "version": "1.2.80",
3
+ "version": "1.2.82",
4
4
  "description": "Agent UI — lightweight status dashboard served by every agent node",
5
5
  "keywords": [
6
6
  "camstack",