@camstack/addon-ai 0.4.76 → 0.4.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 CHANGED
@@ -8052,17 +8052,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
8052
8052
  /**
8053
8053
  * DERIVED per-camera storage summary — the single field cheap consumers read
8054
8054
  * (the viewer's status dot, the camera list) instead of walking `bands`:
8055
- * - `off` — no band covers the camera (or it is disabled).
8056
- * - `events` — every band records around triggers only.
8057
- * - `continuous` — at least one band records continuously.
8058
- *
8059
- * NEVER authored: the recorder stamps it from the authoritative `bands` on
8060
- * every save (`activeModeForConfig`). Writing it has no effect.
8055
+ * - `off` — no band covers the camera (or it is disabled).
8056
+ * - `events` — every band records around triggers only.
8057
+ * - `continuous` — at least one band records continuously.
8058
+ * - `on-device-decision`— the DEVICE decides: recording runs for as long as the
8059
+ * camera raises its own `recording-signal` level (a robot that cleans). There
8060
+ * is no schedule to author, because there is no hour to program — see
8061
+ * {@link RecordingConfigSchema}`.deviceDecision`.
8062
+ *
8063
+ * NEVER authored: the recorder stamps it from the authoritative intent
8064
+ * (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
8065
+ * has no effect.
8066
+ *
8067
+ * `on-device-decision` is named for WHO decides, not for how the recording is
8068
+ * requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
8069
+ * something the operator makes (the live gate is the recorder's own "demand
8070
+ * window"), and a knob whose name suggests the operator starts it while the
8071
+ * device actually does is the D62 shape — a control nobody can predict.
8061
8072
  */
8062
8073
  var RecordingStorageModeSchema = _enum([
8063
8074
  "off",
8064
8075
  "events",
8065
- "continuous"
8076
+ "continuous",
8077
+ "on-device-decision"
8066
8078
  ]);
8067
8079
  /**
8068
8080
  * Le macro classi che possono aprire una finestra di registrazione — le stesse
@@ -8112,22 +8124,7 @@ var RecordingTriggersSchema = object({
8112
8124
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
8113
8125
  * registrare.
8114
8126
  */
8115
- sensorDeviceIds: array(number$1().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
8116
- /**
8117
- * La camera registra per tutta la durata del SEGNALE che lei stessa
8118
- * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
8119
- * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
8120
- * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
8121
- * caduta, così una pulizia di quaranta minuti è UNA clip.
8122
- *
8123
- * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
8124
- * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
8125
- * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
8126
- * segnale mai abbassato (un evento perso) non può tenere aperta una
8127
- * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
8128
- * (`holdTrigger` / `releaseTrigger`).
8129
- */
8130
- deviceSignal: boolean().optional()
8127
+ sensorDeviceIds: array(number$1().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
8131
8128
  });
8132
8129
  /**
8133
8130
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -8211,8 +8208,29 @@ var RecordingConfigSchema = object({
8211
8208
  * "off" is the absence of a covering band, never a band value.
8212
8209
  */
8213
8210
  bands: array(RecordingBandSchema).default([]),
8211
+ /**
8212
+ * THE device-decided intent: record for as long as the camera itself raises
8213
+ * `recording-signal` (`active: true` while the device is in function — a
8214
+ * robot that cleans). AUTHORED, unlike `mode`, and the only authored
8215
+ * recording intent that is not a band.
8216
+ *
8217
+ * It carries NO schedule on purpose. A band is an HOUR, and this feature has
8218
+ * no hour to program: the device decides. What it costs the operator is one
8219
+ * flag — "this camera can record on its own" — and what it buys is the same
8220
+ * hold/release the recorder already implements (D371, `holdTrigger` /
8221
+ * `releaseTrigger`): the window opens on the rise, stays open for the whole
8222
+ * job however long it is, and closes one pad after the fall.
8223
+ *
8224
+ * EXCLUSIVE with `bands` (below): two authorities deciding when the same
8225
+ * camera records is the D62 failure. `off` remains `enabled: false`, so an
8226
+ * operator switching this camera off is REPORTED off, never as broken.
8227
+ */
8228
+ deviceDecision: boolean().optional(),
8214
8229
  retention: RecordingRetentionSchema.optional()
8215
- }).strict();
8230
+ }).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
8231
+ message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
8232
+ path: ["bands"]
8233
+ });
8216
8234
  /**
8217
8235
  * Entity-relocation job state (storage entity-routing spec, Phase 4).
8218
8236
  *
@@ -20954,11 +20972,7 @@ var CameraAudioStatusSchema = object({
20954
20972
  });
20955
20973
  /** Recording block — null when no recording cap is active for this device. */
20956
20974
  var CameraRecordingStatusSchema = object({
20957
- mode: _enum([
20958
- "off",
20959
- "continuous",
20960
- "events"
20961
- ]),
20975
+ mode: RecordingStorageModeSchema,
20962
20976
  active: boolean(),
20963
20977
  storageBytes: number$1()
20964
20978
  });
@@ -27364,11 +27378,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
27364
27378
  var RecordingStatusSchema = object({
27365
27379
  deviceId: number$1(),
27366
27380
  enabled: boolean(),
27367
- activeMode: _enum([
27368
- "off",
27369
- "continuous",
27370
- "events"
27371
- ]),
27381
+ /** THE derived storage mode, from the one definition
27382
+ * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
27383
+ * `on-device-decision` could have reached the recorder and not the status. */
27384
+ activeMode: RecordingStorageModeSchema,
27372
27385
  nodeId: string(),
27373
27386
  storageBytes: number$1()
27374
27387
  });
package/dist/addon.mjs CHANGED
@@ -8079,17 +8079,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
8079
8079
  /**
8080
8080
  * DERIVED per-camera storage summary — the single field cheap consumers read
8081
8081
  * (the viewer's status dot, the camera list) instead of walking `bands`:
8082
- * - `off` — no band covers the camera (or it is disabled).
8083
- * - `events` — every band records around triggers only.
8084
- * - `continuous` — at least one band records continuously.
8085
- *
8086
- * NEVER authored: the recorder stamps it from the authoritative `bands` on
8087
- * every save (`activeModeForConfig`). Writing it has no effect.
8082
+ * - `off` — no band covers the camera (or it is disabled).
8083
+ * - `events` — every band records around triggers only.
8084
+ * - `continuous` — at least one band records continuously.
8085
+ * - `on-device-decision`— the DEVICE decides: recording runs for as long as the
8086
+ * camera raises its own `recording-signal` level (a robot that cleans). There
8087
+ * is no schedule to author, because there is no hour to program — see
8088
+ * {@link RecordingConfigSchema}`.deviceDecision`.
8089
+ *
8090
+ * NEVER authored: the recorder stamps it from the authoritative intent
8091
+ * (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
8092
+ * has no effect.
8093
+ *
8094
+ * `on-device-decision` is named for WHO decides, not for how the recording is
8095
+ * requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
8096
+ * something the operator makes (the live gate is the recorder's own "demand
8097
+ * window"), and a knob whose name suggests the operator starts it while the
8098
+ * device actually does is the D62 shape — a control nobody can predict.
8088
8099
  */
8089
8100
  var RecordingStorageModeSchema = _enum([
8090
8101
  "off",
8091
8102
  "events",
8092
- "continuous"
8103
+ "continuous",
8104
+ "on-device-decision"
8093
8105
  ]);
8094
8106
  /**
8095
8107
  * Le macro classi che possono aprire una finestra di registrazione — le stesse
@@ -8139,22 +8151,7 @@ var RecordingTriggersSchema = object({
8139
8151
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
8140
8152
  * registrare.
8141
8153
  */
8142
- sensorDeviceIds: array(number$1().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
8143
- /**
8144
- * La camera registra per tutta la durata del SEGNALE che lei stessa
8145
- * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
8146
- * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
8147
- * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
8148
- * caduta, così una pulizia di quaranta minuti è UNA clip.
8149
- *
8150
- * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
8151
- * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
8152
- * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
8153
- * segnale mai abbassato (un evento perso) non può tenere aperta una
8154
- * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
8155
- * (`holdTrigger` / `releaseTrigger`).
8156
- */
8157
- deviceSignal: boolean().optional()
8154
+ sensorDeviceIds: array(number$1().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
8158
8155
  });
8159
8156
  /**
8160
8157
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -8238,8 +8235,29 @@ var RecordingConfigSchema = object({
8238
8235
  * "off" is the absence of a covering band, never a band value.
8239
8236
  */
8240
8237
  bands: array(RecordingBandSchema).default([]),
8238
+ /**
8239
+ * THE device-decided intent: record for as long as the camera itself raises
8240
+ * `recording-signal` (`active: true` while the device is in function — a
8241
+ * robot that cleans). AUTHORED, unlike `mode`, and the only authored
8242
+ * recording intent that is not a band.
8243
+ *
8244
+ * It carries NO schedule on purpose. A band is an HOUR, and this feature has
8245
+ * no hour to program: the device decides. What it costs the operator is one
8246
+ * flag — "this camera can record on its own" — and what it buys is the same
8247
+ * hold/release the recorder already implements (D371, `holdTrigger` /
8248
+ * `releaseTrigger`): the window opens on the rise, stays open for the whole
8249
+ * job however long it is, and closes one pad after the fall.
8250
+ *
8251
+ * EXCLUSIVE with `bands` (below): two authorities deciding when the same
8252
+ * camera records is the D62 failure. `off` remains `enabled: false`, so an
8253
+ * operator switching this camera off is REPORTED off, never as broken.
8254
+ */
8255
+ deviceDecision: boolean().optional(),
8241
8256
  retention: RecordingRetentionSchema.optional()
8242
- }).strict();
8257
+ }).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
8258
+ message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
8259
+ path: ["bands"]
8260
+ });
8243
8261
  /**
8244
8262
  * Entity-relocation job state (storage entity-routing spec, Phase 4).
8245
8263
  *
@@ -20981,11 +20999,7 @@ var CameraAudioStatusSchema = object({
20981
20999
  });
20982
21000
  /** Recording block — null when no recording cap is active for this device. */
20983
21001
  var CameraRecordingStatusSchema = object({
20984
- mode: _enum([
20985
- "off",
20986
- "continuous",
20987
- "events"
20988
- ]),
21002
+ mode: RecordingStorageModeSchema,
20989
21003
  active: boolean(),
20990
21004
  storageBytes: number$1()
20991
21005
  });
@@ -27391,11 +27405,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
27391
27405
  var RecordingStatusSchema = object({
27392
27406
  deviceId: number$1(),
27393
27407
  enabled: boolean(),
27394
- activeMode: _enum([
27395
- "off",
27396
- "continuous",
27397
- "events"
27398
- ]),
27408
+ /** THE derived storage mode, from the one definition
27409
+ * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
27410
+ * `on-device-decision` could have reached the recorder and not the status. */
27411
+ activeMode: RecordingStorageModeSchema,
27399
27412
  nodeId: string(),
27400
27413
  storageBytes: number$1()
27401
27414
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-ai",
3
- "version": "0.4.76",
3
+ "version": "0.4.78",
4
4
  "description": "AI addon for CamStack — the `llm` collection provider (cloud, LAN, and camstack-managed local llama.cpp profiles) plus the per-node `llm-runtime` managed executor.",
5
5
  "keywords": [
6
6
  "camstack",