@camstack/addon-terminal 0.1.77 → 0.1.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
@@ -6477,6 +6477,21 @@ var CameraStreamSchema = object({
6477
6477
  */
6478
6478
  autoEligible: boolean().optional(),
6479
6479
  /**
6480
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
6481
+ * whose only sensible role is the low-bandwidth one, `high` for a main
6482
+ * stream. Consulted by the broker's automatic ranking
6483
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
6484
+ * an operator's manual assignment still wins, and an absent hint is the
6485
+ * pixel-ranked default every camera had before this field existed.
6486
+ *
6487
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
6488
+ * storage class is written for on its own (`recordings` is high|mid,
6489
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
6490
+ * camera's single 720p relay is a `low` in every respect except the slot the
6491
+ * heuristic put it in.
6492
+ */
6493
+ profileHint: CamProfileSchema.optional(),
6494
+ /**
6480
6495
  * Transport-specific opaque metadata. The broker passes it through to
6481
6496
  * the source reader without inspecting it. Currently used by
6482
6497
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -7993,7 +8008,22 @@ var RecordingTriggersSchema = object({
7993
8008
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7994
8009
  * registrare.
7995
8010
  */
7996
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
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()
7997
8027
  });
7998
8028
  /**
7999
8029
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -11457,6 +11487,8 @@ method(object({
11457
11487
  label: string().optional(),
11458
11488
  deviceFeatures: array(string()).optional(),
11459
11489
  autoEligible: boolean().optional(),
11490
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
11491
+ profileHint: CamProfileSchema.optional(),
11460
11492
  metadata: record(string(), unknown()).optional(),
11461
11493
  /** Required when kind === 'derived' — the source camStreamId the
11462
11494
  * derived broker reads its encoded plane from.
@@ -30049,6 +30081,77 @@ method(object({
30049
30081
  auth: "protected"
30050
30082
  });
30051
30083
  /**
30084
+ * A camera's own "record me NOW" LEVEL — a signal the device raises while
30085
+ * something it knows about is happening (a robot vacuum cleaning, a machine
30086
+ * running, a gate open) and lowers when it stops.
30087
+ *
30088
+ * It is a level, not an edge. The sensor triggers the recorder already listens
30089
+ * to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
30090
+ * post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
30091
+ * still happening" cannot be expressed as an edge plus a post-buffer without
30092
+ * either re-triggering on a timer (polling — D224 forbids the consumer keeping
30093
+ * the fact fresh) or picking a post-buffer long enough to cover every job,
30094
+ * which records the dock for that long after every short one. So the recorder
30095
+ * reads the LEVEL: it records for as long as `active` is true, plus the band's
30096
+ * own post-buffer once it falls.
30097
+ *
30098
+ * Who owns the fact: the PROVIDER of the device, which already reads the state
30099
+ * the signal is derived from (the vacuum's lifecycle state, for Dreame). It
30100
+ * writes this slice on every change; consumers subscribe to the kernel's
30101
+ * `DeviceStateChanged` for it and read it back through
30102
+ * `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
30103
+ * against the device (D224, D8/D11).
30104
+ *
30105
+ * Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
30106
+ * to Home Assistant, HomeKit and the sensor picker as a thing an operator can
30107
+ * bind, and "the camera wants to record" is not a room sensor. It is a fact
30108
+ * about the camera, on the camera.
30109
+ */
30110
+ var RecordingSignalStatusSchema = object({
30111
+ /** True while the device asks to be recorded. */
30112
+ active: boolean(),
30113
+ /**
30114
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
30115
+ * …). Free text for the log line and the UI badge; the recorder never
30116
+ * branches on it.
30117
+ */
30118
+ reason: string(),
30119
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
30120
+ lastChangedAt: number()
30121
+ });
30122
+ /** The runtime-state slice: the status plus the clock every slice carries. */
30123
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
30124
+ var recordingSignalCapability = {
30125
+ name: "recording-signal",
30126
+ scope: "device",
30127
+ deviceNative: true,
30128
+ mode: "singleton",
30129
+ deviceTypes: [DeviceType.Camera],
30130
+ methods: {
30131
+ /** The current level, straight from the slice the provider keeps fresh. */
30132
+ getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
30133
+ status: {
30134
+ schema: RecordingSignalStatusSchema,
30135
+ kind: "push",
30136
+ empty: {
30137
+ active: false,
30138
+ reason: "unknown",
30139
+ lastChangedAt: 0
30140
+ }
30141
+ },
30142
+ runtimeState: RecordingSignalRuntimeStateSchema,
30143
+ /**
30144
+ * Runtime-state durability: **session** — a restored `active: true` from
30145
+ * before a restart is exactly the stale level the recorder's reconcile bound
30146
+ * exists to end, and the provider re-derives the true level on activation
30147
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
30148
+ *
30149
+ * See `RuntimeStateDurability`. Enforced by
30150
+ * `scripts/check-runtime-state-durability.ts`.
30151
+ */
30152
+ durability: "session"
30153
+ };
30154
+ /**
30052
30155
  * scene-monitor — device-scoped reference-region state cap. An operator marks
30053
30156
  * a rect ROI on a camera frame and names one or more states; the engine
30054
30157
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -30546,6 +30649,8 @@ var CamStreamDescriptorSchema = object({
30546
30649
  deviceFeatures: array(string()).optional(),
30547
30650
  /** Eligible for automatic profile assignment. Absent = `true`. */
30548
30651
  autoEligible: boolean().optional(),
30652
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
30653
+ profileHint: CamProfileSchema.optional(),
30549
30654
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
30550
30655
  metadata: record(string(), unknown()).optional()
30551
30656
  });
@@ -32685,6 +32790,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32685
32790
  pressureSensor: pressureSensorCapability,
32686
32791
  privacyMask: privacyMaskCapability,
32687
32792
  ptzAutotrack: ptzAutotrackCapability,
32793
+ recordingSignal: recordingSignalCapability,
32688
32794
  sceneMonitor: sceneMonitorCapability,
32689
32795
  scriptRunner: scriptRunnerCapability,
32690
32796
  smoke: smokeCapability,
@@ -38065,6 +38171,12 @@ Object.freeze({
38065
38171
  addonId: null,
38066
38172
  access: "view"
38067
38173
  },
38174
+ "recordingSignal.getStatus": {
38175
+ capName: "recording-signal",
38176
+ capScope: "device",
38177
+ addonId: null,
38178
+ access: "view"
38179
+ },
38068
38180
  "sceneMonitor.captureReference": {
38069
38181
  capName: "scene-monitor",
38070
38182
  capScope: "device",
@@ -41057,6 +41169,11 @@ Object.freeze({
41057
41169
  form: "single",
41058
41170
  optional: true
41059
41171
  }],
41172
+ "recordingSignal.getStatus": [{
41173
+ name: "deviceId",
41174
+ form: "single",
41175
+ optional: false
41176
+ }],
41060
41177
  "sceneMonitor.captureReference": [{
41061
41178
  name: "deviceId",
41062
41179
  form: "single",
package/dist/addon.mjs CHANGED
@@ -6454,6 +6454,21 @@ var CameraStreamSchema = object({
6454
6454
  */
6455
6455
  autoEligible: boolean().optional(),
6456
6456
  /**
6457
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
6458
+ * whose only sensible role is the low-bandwidth one, `high` for a main
6459
+ * stream. Consulted by the broker's automatic ranking
6460
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
6461
+ * an operator's manual assignment still wins, and an absent hint is the
6462
+ * pixel-ranked default every camera had before this field existed.
6463
+ *
6464
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
6465
+ * storage class is written for on its own (`recordings` is high|mid,
6466
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
6467
+ * camera's single 720p relay is a `low` in every respect except the slot the
6468
+ * heuristic put it in.
6469
+ */
6470
+ profileHint: CamProfileSchema.optional(),
6471
+ /**
6457
6472
  * Transport-specific opaque metadata. The broker passes it through to
6458
6473
  * the source reader without inspecting it. Currently used by
6459
6474
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -7970,7 +7985,22 @@ var RecordingTriggersSchema = object({
7970
7985
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7971
7986
  * registrare.
7972
7987
  */
7973
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
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()
7974
8004
  });
7975
8005
  /**
7976
8006
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -11434,6 +11464,8 @@ method(object({
11434
11464
  label: string().optional(),
11435
11465
  deviceFeatures: array(string()).optional(),
11436
11466
  autoEligible: boolean().optional(),
11467
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
11468
+ profileHint: CamProfileSchema.optional(),
11437
11469
  metadata: record(string(), unknown()).optional(),
11438
11470
  /** Required when kind === 'derived' — the source camStreamId the
11439
11471
  * derived broker reads its encoded plane from.
@@ -30026,6 +30058,77 @@ method(object({
30026
30058
  auth: "protected"
30027
30059
  });
30028
30060
  /**
30061
+ * A camera's own "record me NOW" LEVEL — a signal the device raises while
30062
+ * something it knows about is happening (a robot vacuum cleaning, a machine
30063
+ * running, a gate open) and lowers when it stops.
30064
+ *
30065
+ * It is a level, not an edge. The sensor triggers the recorder already listens
30066
+ * to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
30067
+ * post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
30068
+ * still happening" cannot be expressed as an edge plus a post-buffer without
30069
+ * either re-triggering on a timer (polling — D224 forbids the consumer keeping
30070
+ * the fact fresh) or picking a post-buffer long enough to cover every job,
30071
+ * which records the dock for that long after every short one. So the recorder
30072
+ * reads the LEVEL: it records for as long as `active` is true, plus the band's
30073
+ * own post-buffer once it falls.
30074
+ *
30075
+ * Who owns the fact: the PROVIDER of the device, which already reads the state
30076
+ * the signal is derived from (the vacuum's lifecycle state, for Dreame). It
30077
+ * writes this slice on every change; consumers subscribe to the kernel's
30078
+ * `DeviceStateChanged` for it and read it back through
30079
+ * `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
30080
+ * against the device (D224, D8/D11).
30081
+ *
30082
+ * Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
30083
+ * to Home Assistant, HomeKit and the sensor picker as a thing an operator can
30084
+ * bind, and "the camera wants to record" is not a room sensor. It is a fact
30085
+ * about the camera, on the camera.
30086
+ */
30087
+ var RecordingSignalStatusSchema = object({
30088
+ /** True while the device asks to be recorded. */
30089
+ active: boolean(),
30090
+ /**
30091
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
30092
+ * …). Free text for the log line and the UI badge; the recorder never
30093
+ * branches on it.
30094
+ */
30095
+ reason: string(),
30096
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
30097
+ lastChangedAt: number()
30098
+ });
30099
+ /** The runtime-state slice: the status plus the clock every slice carries. */
30100
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
30101
+ var recordingSignalCapability = {
30102
+ name: "recording-signal",
30103
+ scope: "device",
30104
+ deviceNative: true,
30105
+ mode: "singleton",
30106
+ deviceTypes: [DeviceType.Camera],
30107
+ methods: {
30108
+ /** The current level, straight from the slice the provider keeps fresh. */
30109
+ getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
30110
+ status: {
30111
+ schema: RecordingSignalStatusSchema,
30112
+ kind: "push",
30113
+ empty: {
30114
+ active: false,
30115
+ reason: "unknown",
30116
+ lastChangedAt: 0
30117
+ }
30118
+ },
30119
+ runtimeState: RecordingSignalRuntimeStateSchema,
30120
+ /**
30121
+ * Runtime-state durability: **session** — a restored `active: true` from
30122
+ * before a restart is exactly the stale level the recorder's reconcile bound
30123
+ * exists to end, and the provider re-derives the true level on activation
30124
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
30125
+ *
30126
+ * See `RuntimeStateDurability`. Enforced by
30127
+ * `scripts/check-runtime-state-durability.ts`.
30128
+ */
30129
+ durability: "session"
30130
+ };
30131
+ /**
30029
30132
  * scene-monitor — device-scoped reference-region state cap. An operator marks
30030
30133
  * a rect ROI on a camera frame and names one or more states; the engine
30031
30134
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -30523,6 +30626,8 @@ var CamStreamDescriptorSchema = object({
30523
30626
  deviceFeatures: array(string()).optional(),
30524
30627
  /** Eligible for automatic profile assignment. Absent = `true`. */
30525
30628
  autoEligible: boolean().optional(),
30629
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
30630
+ profileHint: CamProfileSchema.optional(),
30526
30631
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
30527
30632
  metadata: record(string(), unknown()).optional()
30528
30633
  });
@@ -32662,6 +32767,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32662
32767
  pressureSensor: pressureSensorCapability,
32663
32768
  privacyMask: privacyMaskCapability,
32664
32769
  ptzAutotrack: ptzAutotrackCapability,
32770
+ recordingSignal: recordingSignalCapability,
32665
32771
  sceneMonitor: sceneMonitorCapability,
32666
32772
  scriptRunner: scriptRunnerCapability,
32667
32773
  smoke: smokeCapability,
@@ -38042,6 +38148,12 @@ Object.freeze({
38042
38148
  addonId: null,
38043
38149
  access: "view"
38044
38150
  },
38151
+ "recordingSignal.getStatus": {
38152
+ capName: "recording-signal",
38153
+ capScope: "device",
38154
+ addonId: null,
38155
+ access: "view"
38156
+ },
38045
38157
  "sceneMonitor.captureReference": {
38046
38158
  capName: "scene-monitor",
38047
38159
  capScope: "device",
@@ -41034,6 +41146,11 @@ Object.freeze({
41034
41146
  form: "single",
41035
41147
  optional: true
41036
41148
  }],
41149
+ "recordingSignal.getStatus": [{
41150
+ name: "deviceId",
41151
+ form: "single",
41152
+ optional: false
41153
+ }],
41037
41154
  "sceneMonitor.captureReference": [{
41038
41155
  name: "deviceId",
41039
41156
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-terminal",
3
- "version": "0.1.77",
3
+ "version": "0.1.78",
4
4
  "description": "Interactive terminal sessions (pty + xterm) as a CamStack addon",
5
5
  "keywords": [
6
6
  "camstack",