@camstack/addon-terminal 0.1.80 → 0.1.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.
- package/dist/addon.js +66 -38
- package/dist/addon.mjs +66 -38
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -7948,17 +7948,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
|
|
|
7948
7948
|
/**
|
|
7949
7949
|
* DERIVED per-camera storage summary — the single field cheap consumers read
|
|
7950
7950
|
* (the viewer's status dot, the camera list) instead of walking `bands`:
|
|
7951
|
-
* - `off`
|
|
7952
|
-
* - `events`
|
|
7953
|
-
* - `continuous`
|
|
7954
|
-
*
|
|
7955
|
-
*
|
|
7956
|
-
*
|
|
7951
|
+
* - `off` — no band covers the camera (or it is disabled).
|
|
7952
|
+
* - `events` — every band records around triggers only.
|
|
7953
|
+
* - `continuous` — at least one band records continuously.
|
|
7954
|
+
* - `on-device-decision`— the DEVICE decides: recording runs for as long as the
|
|
7955
|
+
* camera raises its own `recording-signal` level (a robot that cleans). There
|
|
7956
|
+
* is no schedule to author, because there is no hour to program — see
|
|
7957
|
+
* {@link RecordingConfigSchema}`.deviceDecision`.
|
|
7958
|
+
*
|
|
7959
|
+
* NEVER authored: the recorder stamps it from the authoritative intent
|
|
7960
|
+
* (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
|
|
7961
|
+
* has no effect.
|
|
7962
|
+
*
|
|
7963
|
+
* `on-device-decision` is named for WHO decides, not for how the recording is
|
|
7964
|
+
* requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
|
|
7965
|
+
* something the operator makes (the live gate is the recorder's own "demand
|
|
7966
|
+
* window"), and a knob whose name suggests the operator starts it while the
|
|
7967
|
+
* device actually does is the D62 shape — a control nobody can predict.
|
|
7957
7968
|
*/
|
|
7958
7969
|
var RecordingStorageModeSchema = _enum([
|
|
7959
7970
|
"off",
|
|
7960
7971
|
"events",
|
|
7961
|
-
"continuous"
|
|
7972
|
+
"continuous",
|
|
7973
|
+
"on-device-decision"
|
|
7962
7974
|
]);
|
|
7963
7975
|
/**
|
|
7964
7976
|
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
@@ -8008,22 +8020,7 @@ var RecordingTriggersSchema = object({
|
|
|
8008
8020
|
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
8009
8021
|
* registrare.
|
|
8010
8022
|
*/
|
|
8011
|
-
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
8012
|
-
/**
|
|
8013
|
-
* La camera registra per tutta la durata del SEGNALE che lei stessa
|
|
8014
|
-
* pubblica — la cap `recording-signal` (`active: true` mentre il device è in
|
|
8015
|
-
* funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
|
|
8016
|
-
* resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
|
|
8017
|
-
* caduta, così una pulizia di quaranta minuti è UNA clip.
|
|
8018
|
-
*
|
|
8019
|
-
* Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
|
|
8020
|
-
* suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
|
|
8021
|
-
* riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
|
|
8022
|
-
* segnale mai abbassato (un evento perso) non può tenere aperta una
|
|
8023
|
-
* registrazione (D11). Vedi `recorder/addon/band-decision.ts`
|
|
8024
|
-
* (`holdTrigger` / `releaseTrigger`).
|
|
8025
|
-
*/
|
|
8026
|
-
deviceSignal: boolean().optional()
|
|
8023
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
8027
8024
|
});
|
|
8028
8025
|
/**
|
|
8029
8026
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8053,13 +8050,28 @@ var RecordingBandSchema = object({
|
|
|
8053
8050
|
end: string().regex(HHMM),
|
|
8054
8051
|
mode: RecordingBandModeSchema,
|
|
8055
8052
|
triggers: RecordingBandTriggersSchema.optional(),
|
|
8053
|
+
/**
|
|
8054
|
+
* RETIRED (D381). A band no longer carries a pre-buffer of its own.
|
|
8055
|
+
*
|
|
8056
|
+
* It was the retroactive KEEP bound — which already-written segments survive
|
|
8057
|
+
* a trigger — and it had to be at least as wide as the widest pre-roll the
|
|
8058
|
+
* broker could serve, or the gate would delete the seconds the ring had just
|
|
8059
|
+
* handed the writer. That "at least as wide as" is the tell: it was a second
|
|
8060
|
+
* expression of the broker's retention, in different units, in a different
|
|
8061
|
+
* addon, with an invariant the operator had to maintain by hand. The keep
|
|
8062
|
+
* bound is now derived from the one prebuffer ceiling and there is nothing
|
|
8063
|
+
* left to configure here.
|
|
8064
|
+
*
|
|
8065
|
+
* The key survives in the SHAPE so a config written before that record still
|
|
8066
|
+
* parses and can be migrated deliberately — `RecordingBandSchema` is not
|
|
8067
|
+
* strict, so simply deleting it would strip an operator's value in silence on
|
|
8068
|
+
* the next save (the failure D380 came one commit from shipping). Nothing
|
|
8069
|
+
* reads it: {@link stripRetiredBandPreBufferSec} removes it on load.
|
|
8070
|
+
*/
|
|
8056
8071
|
preBufferSec: number().min(0).optional(),
|
|
8057
8072
|
postBufferSec: number().min(0).optional()
|
|
8058
8073
|
});
|
|
8059
|
-
({
|
|
8060
|
-
preBufferSec: 15,
|
|
8061
|
-
postBufferSec: 30
|
|
8062
|
-
}).postBufferSec * 1e3;
|
|
8074
|
+
({ postBufferSec: 30 }).postBufferSec * 1e3;
|
|
8063
8075
|
/**
|
|
8064
8076
|
* Per-device retention overrides. Every field is optional; an unset or `0`
|
|
8065
8077
|
* value inherits the node-wide recorder default. Only footage-lifetime limits
|
|
@@ -8107,8 +8119,29 @@ var RecordingConfigSchema = object({
|
|
|
8107
8119
|
* "off" is the absence of a covering band, never a band value.
|
|
8108
8120
|
*/
|
|
8109
8121
|
bands: array(RecordingBandSchema).default([]),
|
|
8122
|
+
/**
|
|
8123
|
+
* THE device-decided intent: record for as long as the camera itself raises
|
|
8124
|
+
* `recording-signal` (`active: true` while the device is in function — a
|
|
8125
|
+
* robot that cleans). AUTHORED, unlike `mode`, and the only authored
|
|
8126
|
+
* recording intent that is not a band.
|
|
8127
|
+
*
|
|
8128
|
+
* It carries NO schedule on purpose. A band is an HOUR, and this feature has
|
|
8129
|
+
* no hour to program: the device decides. What it costs the operator is one
|
|
8130
|
+
* flag — "this camera can record on its own" — and what it buys is the same
|
|
8131
|
+
* hold/release the recorder already implements (D371, `holdTrigger` /
|
|
8132
|
+
* `releaseTrigger`): the window opens on the rise, stays open for the whole
|
|
8133
|
+
* job however long it is, and closes one pad after the fall.
|
|
8134
|
+
*
|
|
8135
|
+
* EXCLUSIVE with `bands` (below): two authorities deciding when the same
|
|
8136
|
+
* camera records is the D62 failure. `off` remains `enabled: false`, so an
|
|
8137
|
+
* operator switching this camera off is REPORTED off, never as broken.
|
|
8138
|
+
*/
|
|
8139
|
+
deviceDecision: boolean().optional(),
|
|
8110
8140
|
retention: RecordingRetentionSchema.optional()
|
|
8111
|
-
}).strict()
|
|
8141
|
+
}).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
|
|
8142
|
+
message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
|
|
8143
|
+
path: ["bands"]
|
|
8144
|
+
});
|
|
8112
8145
|
/**
|
|
8113
8146
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
8114
8147
|
*
|
|
@@ -21043,11 +21076,7 @@ var CameraAudioStatusSchema = object({
|
|
|
21043
21076
|
});
|
|
21044
21077
|
/** Recording block — null when no recording cap is active for this device. */
|
|
21045
21078
|
var CameraRecordingStatusSchema = object({
|
|
21046
|
-
mode:
|
|
21047
|
-
"off",
|
|
21048
|
-
"continuous",
|
|
21049
|
-
"events"
|
|
21050
|
-
]),
|
|
21079
|
+
mode: RecordingStorageModeSchema,
|
|
21051
21080
|
active: boolean(),
|
|
21052
21081
|
storageBytes: number()
|
|
21053
21082
|
});
|
|
@@ -29449,11 +29478,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
|
|
|
29449
29478
|
var RecordingStatusSchema = object({
|
|
29450
29479
|
deviceId: number(),
|
|
29451
29480
|
enabled: boolean(),
|
|
29452
|
-
|
|
29453
|
-
|
|
29454
|
-
|
|
29455
|
-
|
|
29456
|
-
]),
|
|
29481
|
+
/** THE derived storage mode, from the one definition
|
|
29482
|
+
* (`deriveRecordingMode`) — never a second enum. A duplicated list is how
|
|
29483
|
+
* `on-device-decision` could have reached the recorder and not the status. */
|
|
29484
|
+
activeMode: RecordingStorageModeSchema,
|
|
29457
29485
|
nodeId: string(),
|
|
29458
29486
|
storageBytes: number()
|
|
29459
29487
|
});
|
package/dist/addon.mjs
CHANGED
|
@@ -7925,17 +7925,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
|
|
|
7925
7925
|
/**
|
|
7926
7926
|
* DERIVED per-camera storage summary — the single field cheap consumers read
|
|
7927
7927
|
* (the viewer's status dot, the camera list) instead of walking `bands`:
|
|
7928
|
-
* - `off`
|
|
7929
|
-
* - `events`
|
|
7930
|
-
* - `continuous`
|
|
7931
|
-
*
|
|
7932
|
-
*
|
|
7933
|
-
*
|
|
7928
|
+
* - `off` — no band covers the camera (or it is disabled).
|
|
7929
|
+
* - `events` — every band records around triggers only.
|
|
7930
|
+
* - `continuous` — at least one band records continuously.
|
|
7931
|
+
* - `on-device-decision`— the DEVICE decides: recording runs for as long as the
|
|
7932
|
+
* camera raises its own `recording-signal` level (a robot that cleans). There
|
|
7933
|
+
* is no schedule to author, because there is no hour to program — see
|
|
7934
|
+
* {@link RecordingConfigSchema}`.deviceDecision`.
|
|
7935
|
+
*
|
|
7936
|
+
* NEVER authored: the recorder stamps it from the authoritative intent
|
|
7937
|
+
* (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
|
|
7938
|
+
* has no effect.
|
|
7939
|
+
*
|
|
7940
|
+
* `on-device-decision` is named for WHO decides, not for how the recording is
|
|
7941
|
+
* requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
|
|
7942
|
+
* something the operator makes (the live gate is the recorder's own "demand
|
|
7943
|
+
* window"), and a knob whose name suggests the operator starts it while the
|
|
7944
|
+
* device actually does is the D62 shape — a control nobody can predict.
|
|
7934
7945
|
*/
|
|
7935
7946
|
var RecordingStorageModeSchema = _enum([
|
|
7936
7947
|
"off",
|
|
7937
7948
|
"events",
|
|
7938
|
-
"continuous"
|
|
7949
|
+
"continuous",
|
|
7950
|
+
"on-device-decision"
|
|
7939
7951
|
]);
|
|
7940
7952
|
/**
|
|
7941
7953
|
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
@@ -7985,22 +7997,7 @@ var RecordingTriggersSchema = object({
|
|
|
7985
7997
|
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
7986
7998
|
* registrare.
|
|
7987
7999
|
*/
|
|
7988
|
-
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7989
|
-
/**
|
|
7990
|
-
* La camera registra per tutta la durata del SEGNALE che lei stessa
|
|
7991
|
-
* pubblica — la cap `recording-signal` (`active: true` mentre il device è in
|
|
7992
|
-
* funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
|
|
7993
|
-
* resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
|
|
7994
|
-
* caduta, così una pulizia di quaranta minuti è UNA clip.
|
|
7995
|
-
*
|
|
7996
|
-
* Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
|
|
7997
|
-
* suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
|
|
7998
|
-
* riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
|
|
7999
|
-
* segnale mai abbassato (un evento perso) non può tenere aperta una
|
|
8000
|
-
* registrazione (D11). Vedi `recorder/addon/band-decision.ts`
|
|
8001
|
-
* (`holdTrigger` / `releaseTrigger`).
|
|
8002
|
-
*/
|
|
8003
|
-
deviceSignal: boolean().optional()
|
|
8000
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
8004
8001
|
});
|
|
8005
8002
|
/**
|
|
8006
8003
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8030,13 +8027,28 @@ var RecordingBandSchema = object({
|
|
|
8030
8027
|
end: string().regex(HHMM),
|
|
8031
8028
|
mode: RecordingBandModeSchema,
|
|
8032
8029
|
triggers: RecordingBandTriggersSchema.optional(),
|
|
8030
|
+
/**
|
|
8031
|
+
* RETIRED (D381). A band no longer carries a pre-buffer of its own.
|
|
8032
|
+
*
|
|
8033
|
+
* It was the retroactive KEEP bound — which already-written segments survive
|
|
8034
|
+
* a trigger — and it had to be at least as wide as the widest pre-roll the
|
|
8035
|
+
* broker could serve, or the gate would delete the seconds the ring had just
|
|
8036
|
+
* handed the writer. That "at least as wide as" is the tell: it was a second
|
|
8037
|
+
* expression of the broker's retention, in different units, in a different
|
|
8038
|
+
* addon, with an invariant the operator had to maintain by hand. The keep
|
|
8039
|
+
* bound is now derived from the one prebuffer ceiling and there is nothing
|
|
8040
|
+
* left to configure here.
|
|
8041
|
+
*
|
|
8042
|
+
* The key survives in the SHAPE so a config written before that record still
|
|
8043
|
+
* parses and can be migrated deliberately — `RecordingBandSchema` is not
|
|
8044
|
+
* strict, so simply deleting it would strip an operator's value in silence on
|
|
8045
|
+
* the next save (the failure D380 came one commit from shipping). Nothing
|
|
8046
|
+
* reads it: {@link stripRetiredBandPreBufferSec} removes it on load.
|
|
8047
|
+
*/
|
|
8033
8048
|
preBufferSec: number().min(0).optional(),
|
|
8034
8049
|
postBufferSec: number().min(0).optional()
|
|
8035
8050
|
});
|
|
8036
|
-
({
|
|
8037
|
-
preBufferSec: 15,
|
|
8038
|
-
postBufferSec: 30
|
|
8039
|
-
}).postBufferSec * 1e3;
|
|
8051
|
+
({ postBufferSec: 30 }).postBufferSec * 1e3;
|
|
8040
8052
|
/**
|
|
8041
8053
|
* Per-device retention overrides. Every field is optional; an unset or `0`
|
|
8042
8054
|
* value inherits the node-wide recorder default. Only footage-lifetime limits
|
|
@@ -8084,8 +8096,29 @@ var RecordingConfigSchema = object({
|
|
|
8084
8096
|
* "off" is the absence of a covering band, never a band value.
|
|
8085
8097
|
*/
|
|
8086
8098
|
bands: array(RecordingBandSchema).default([]),
|
|
8099
|
+
/**
|
|
8100
|
+
* THE device-decided intent: record for as long as the camera itself raises
|
|
8101
|
+
* `recording-signal` (`active: true` while the device is in function — a
|
|
8102
|
+
* robot that cleans). AUTHORED, unlike `mode`, and the only authored
|
|
8103
|
+
* recording intent that is not a band.
|
|
8104
|
+
*
|
|
8105
|
+
* It carries NO schedule on purpose. A band is an HOUR, and this feature has
|
|
8106
|
+
* no hour to program: the device decides. What it costs the operator is one
|
|
8107
|
+
* flag — "this camera can record on its own" — and what it buys is the same
|
|
8108
|
+
* hold/release the recorder already implements (D371, `holdTrigger` /
|
|
8109
|
+
* `releaseTrigger`): the window opens on the rise, stays open for the whole
|
|
8110
|
+
* job however long it is, and closes one pad after the fall.
|
|
8111
|
+
*
|
|
8112
|
+
* EXCLUSIVE with `bands` (below): two authorities deciding when the same
|
|
8113
|
+
* camera records is the D62 failure. `off` remains `enabled: false`, so an
|
|
8114
|
+
* operator switching this camera off is REPORTED off, never as broken.
|
|
8115
|
+
*/
|
|
8116
|
+
deviceDecision: boolean().optional(),
|
|
8087
8117
|
retention: RecordingRetentionSchema.optional()
|
|
8088
|
-
}).strict()
|
|
8118
|
+
}).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
|
|
8119
|
+
message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
|
|
8120
|
+
path: ["bands"]
|
|
8121
|
+
});
|
|
8089
8122
|
/**
|
|
8090
8123
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
8091
8124
|
*
|
|
@@ -21020,11 +21053,7 @@ var CameraAudioStatusSchema = object({
|
|
|
21020
21053
|
});
|
|
21021
21054
|
/** Recording block — null when no recording cap is active for this device. */
|
|
21022
21055
|
var CameraRecordingStatusSchema = object({
|
|
21023
|
-
mode:
|
|
21024
|
-
"off",
|
|
21025
|
-
"continuous",
|
|
21026
|
-
"events"
|
|
21027
|
-
]),
|
|
21056
|
+
mode: RecordingStorageModeSchema,
|
|
21028
21057
|
active: boolean(),
|
|
21029
21058
|
storageBytes: number()
|
|
21030
21059
|
});
|
|
@@ -29426,11 +29455,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
|
|
|
29426
29455
|
var RecordingStatusSchema = object({
|
|
29427
29456
|
deviceId: number(),
|
|
29428
29457
|
enabled: boolean(),
|
|
29429
|
-
|
|
29430
|
-
|
|
29431
|
-
|
|
29432
|
-
|
|
29433
|
-
]),
|
|
29458
|
+
/** THE derived storage mode, from the one definition
|
|
29459
|
+
* (`deriveRecordingMode`) — never a second enum. A duplicated list is how
|
|
29460
|
+
* `on-device-decision` could have reached the recorder and not the status. */
|
|
29461
|
+
activeMode: RecordingStorageModeSchema,
|
|
29434
29462
|
nodeId: string(),
|
|
29435
29463
|
storageBytes: number()
|
|
29436
29464
|
});
|