@camstack/addon-agent-ui 1.2.79 → 1.2.81

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 +48 -35
  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.
@@ -8011,8 +8008,29 @@ var RecordingConfigSchema = object({
8011
8008
  * "off" is the absence of a covering band, never a band value.
8012
8009
  */
8013
8010
  bands: array(RecordingBandSchema).default([]),
8011
+ /**
8012
+ * THE device-decided intent: record for as long as the camera itself raises
8013
+ * `recording-signal` (`active: true` while the device is in function — a
8014
+ * robot that cleans). AUTHORED, unlike `mode`, and the only authored
8015
+ * recording intent that is not a band.
8016
+ *
8017
+ * It carries NO schedule on purpose. A band is an HOUR, and this feature has
8018
+ * no hour to program: the device decides. What it costs the operator is one
8019
+ * flag — "this camera can record on its own" — and what it buys is the same
8020
+ * hold/release the recorder already implements (D371, `holdTrigger` /
8021
+ * `releaseTrigger`): the window opens on the rise, stays open for the whole
8022
+ * job however long it is, and closes one pad after the fall.
8023
+ *
8024
+ * EXCLUSIVE with `bands` (below): two authorities deciding when the same
8025
+ * camera records is the D62 failure. `off` remains `enabled: false`, so an
8026
+ * operator switching this camera off is REPORTED off, never as broken.
8027
+ */
8028
+ deviceDecision: boolean().optional(),
8014
8029
  retention: RecordingRetentionSchema.optional()
8015
- }).strict();
8030
+ }).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
8031
+ message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
8032
+ path: ["bands"]
8033
+ });
8016
8034
  /**
8017
8035
  * Entity-relocation job state (storage entity-routing spec, Phase 4).
8018
8036
  *
@@ -20660,11 +20678,7 @@ var CameraAudioStatusSchema = object({
20660
20678
  });
20661
20679
  /** Recording block — null when no recording cap is active for this device. */
20662
20680
  var CameraRecordingStatusSchema = object({
20663
- mode: _enum([
20664
- "off",
20665
- "continuous",
20666
- "events"
20667
- ]),
20681
+ mode: RecordingStorageModeSchema,
20668
20682
  active: boolean(),
20669
20683
  storageBytes: number()
20670
20684
  });
@@ -27070,11 +27084,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
27070
27084
  var RecordingStatusSchema = object({
27071
27085
  deviceId: number(),
27072
27086
  enabled: boolean(),
27073
- activeMode: _enum([
27074
- "off",
27075
- "continuous",
27076
- "events"
27077
- ]),
27087
+ /** THE derived storage mode, from the one definition
27088
+ * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
27089
+ * `on-device-decision` could have reached the recorder and not the status. */
27090
+ activeMode: RecordingStorageModeSchema,
27078
27091
  nodeId: string(),
27079
27092
  storageBytes: number()
27080
27093
  });
@@ -37919,7 +37932,7 @@ var AgentUIAddon = class extends BaseAddon {
37919
37932
  capability: adminUiCapability,
37920
37933
  provider: {
37921
37934
  getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
37922
- getVersion: async () => ({ version: "1.2.79" })
37935
+ getVersion: async () => ({ version: "1.2.81" })
37923
37936
  }
37924
37937
  }];
37925
37938
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-agent-ui",
3
- "version": "1.2.79",
3
+ "version": "1.2.81",
4
4
  "description": "Agent UI — lightweight status dashboard served by every agent node",
5
5
  "keywords": [
6
6
  "camstack",