@camstack/types 1.2.43 → 1.2.45
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 +8 -2
- package/dist/addon.mjs +8 -2
- package/dist/capabilities/index.d.ts +21 -3
- package/dist/capabilities/osd-manager.cap.d.ts +900 -0
- package/dist/capabilities/pipeline-analytics.cap.d.ts +1192 -74
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts +10 -0
- package/dist/capabilities/pipeline-runner.cap.d.ts +6 -0
- package/dist/capabilities/schemas/streaming-shared.d.ts +2 -0
- package/dist/capabilities/server-management.cap.d.ts +3 -3
- package/dist/capabilities/stream-broker.cap.d.ts +32 -0
- package/dist/ffmpeg/fmp4-box-splitter.d.ts +113 -0
- package/dist/ffmpeg/fmp4-fragment-child.d.ts +85 -0
- package/dist/ffmpeg/fmp4-fragment-plane.d.ts +142 -0
- package/dist/ffmpeg/invocation.d.ts +4 -2
- package/dist/fmp4-box-splitter-B53u9-Nu.mjs +615 -0
- package/dist/fmp4-box-splitter-BkWH7O3L.js +686 -0
- package/dist/generated/addon-api.d.ts +162 -0
- package/dist/generated/cap-input-defaults.d.ts +1 -1
- package/dist/generated/capability-router-map.d.ts +5 -2
- package/dist/generated/device-proxy.d.ts +3 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1114 -407
- package/dist/index.mjs +1075 -397
- package/dist/interfaces/camera-switches.d.ts +48 -0
- package/dist/interfaces/stream-broker.d.ts +19 -49
- package/dist/node.d.ts +4 -0
- package/dist/node.js +509 -3
- package/dist/node.mjs +507 -3
- package/dist/notification/schedule.d.ts +20 -0
- package/dist/{sleep-Bx9IIoT0.js → sleep-BOI-sVEA.js} +37 -1
- package/dist/{sleep-DtstvzWm.mjs → sleep-Bf5fBs7u.mjs} +37 -1
- package/dist/types/detection.d.ts +31 -0
- package/dist/types/pipeline-step.d.ts +22 -1
- package/package.json +1 -1
- package/dist/canonical-hash-7nfBbEqR.mjs +0 -35
- package/dist/canonical-hash-BcZHRHIx.js +0 -40
|
@@ -18,6 +18,19 @@
|
|
|
18
18
|
* | `notifications` | `notificationRules.setDeviceMuted` | `NotificationCenter.evaluateAndEnqueue` returns before any rule is evaluated |
|
|
19
19
|
* | `privacy-mask` | `privacyMask.setMask({ enabled })` → the CAMERA | the camera blanks the masked regions itself; every stream and recording carries the black boxes |
|
|
20
20
|
* | `device-audio` | `privacyMask.setAudioEnabled` → the CAMERA | the camera stops encoding an audio track at all; every consumer sees silent video |
|
|
21
|
+
* | `broker-audio` | `streamBroker.setDeviceAudioMute` → `DeviceOverride.audioMuted` | `StreamBroker.setAudioMuted` drops the audio plane at the source: no `type:'audio'` packet leaves `fanOutEncoded`, no RTP reaches the restreamer, and the restreamer serves the video-only SDP |
|
|
22
|
+
*
|
|
23
|
+
* ## `device-audio` and `broker-audio` are two functions, not two knobs
|
|
24
|
+
*
|
|
25
|
+
* They look adjacent and they are not the same control ([D83](../../../../docs/decisions/adr-0083.md)):
|
|
26
|
+
* `device-audio` writes the CAMERA, so it is hardware privacy — the microphone
|
|
27
|
+
* genuinely stops, it survives CamStack entirely, and it costs a multi-second
|
|
28
|
+
* encoder restart on every flip. `broker-audio` writes THIS server, so it is
|
|
29
|
+
* instant, vendor-independent and reversible without touching the camera, and
|
|
30
|
+
* a camera that ignores or lacks the ISAPI/Reolink control is still silenced.
|
|
31
|
+
* D62 forbids a second switch that *disagrees* with the first; these two
|
|
32
|
+
* cannot disagree, because neither reads the other's store — the camera holds
|
|
33
|
+
* one, the broker holds the other, and each reports its own fact.
|
|
21
34
|
*
|
|
22
35
|
* ## The two switches whose authority is not on this server
|
|
23
36
|
*
|
|
@@ -83,6 +96,7 @@ export declare const CameraSwitchIdSchema: z.ZodEnum<{
|
|
|
83
96
|
notifications: "notifications";
|
|
84
97
|
"object-detection": "object-detection";
|
|
85
98
|
"device-audio": "device-audio";
|
|
99
|
+
"broker-audio": "broker-audio";
|
|
86
100
|
}>;
|
|
87
101
|
export type CameraSwitchId = z.infer<typeof CameraSwitchIdSchema>;
|
|
88
102
|
/**
|
|
@@ -96,6 +110,10 @@ export type CameraSwitchId = z.infer<typeof CameraSwitchIdSchema>;
|
|
|
96
110
|
* `object-detection` despite feeding it: a mask blanks REGIONS, so its blast
|
|
97
111
|
* radius is partial, and the "broadest first" rule does not rank a partial
|
|
98
112
|
* control above a whole-function one.
|
|
113
|
+
*
|
|
114
|
+
* `broker-audio` sits directly BELOW `device-audio` by the same source-first
|
|
115
|
+
* rule: the camera's microphone feeds the broker, so silencing the camera
|
|
116
|
+
* leaves the broker's mute with nothing to suppress; the reverse is not true.
|
|
99
117
|
*/
|
|
100
118
|
export declare const CAMERA_SWITCH_ORDER: readonly CameraSwitchId[];
|
|
101
119
|
/**
|
|
@@ -119,6 +137,8 @@ export declare const CameraSwitchAuthoritySchema: z.ZodDiscriminatedUnion<[z.Zod
|
|
|
119
137
|
}, z.core.$strip>, z.ZodObject<{
|
|
120
138
|
kind: z.ZodLiteral<"camera-mask">;
|
|
121
139
|
capName: z.ZodString;
|
|
140
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
141
|
+
kind: z.ZodLiteral<"broker-audio-mute">;
|
|
122
142
|
}, z.core.$strip>], "kind">;
|
|
123
143
|
export type CameraSwitchAuthority = z.infer<typeof CameraSwitchAuthoritySchema>;
|
|
124
144
|
/**
|
|
@@ -149,6 +169,7 @@ export declare const CameraSwitchSchema: z.ZodObject<{
|
|
|
149
169
|
notifications: "notifications";
|
|
150
170
|
"object-detection": "object-detection";
|
|
151
171
|
"device-audio": "device-audio";
|
|
172
|
+
"broker-audio": "broker-audio";
|
|
152
173
|
}>;
|
|
153
174
|
label: z.ZodString;
|
|
154
175
|
costWhenOff: z.ZodString;
|
|
@@ -174,6 +195,8 @@ export declare const CameraSwitchSchema: z.ZodObject<{
|
|
|
174
195
|
}, z.core.$strip>, z.ZodObject<{
|
|
175
196
|
kind: z.ZodLiteral<"camera-mask">;
|
|
176
197
|
capName: z.ZodString;
|
|
198
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
199
|
+
kind: z.ZodLiteral<"broker-audio-mute">;
|
|
177
200
|
}, z.core.$strip>], "kind">;
|
|
178
201
|
}, z.core.$strip>;
|
|
179
202
|
export type CameraSwitch = z.infer<typeof CameraSwitchSchema>;
|
|
@@ -189,6 +212,7 @@ export declare const CameraSwitchGroupSchema: z.ZodObject<{
|
|
|
189
212
|
notifications: "notifications";
|
|
190
213
|
"object-detection": "object-detection";
|
|
191
214
|
"device-audio": "device-audio";
|
|
215
|
+
"broker-audio": "broker-audio";
|
|
192
216
|
}>;
|
|
193
217
|
label: z.ZodString;
|
|
194
218
|
costWhenOff: z.ZodString;
|
|
@@ -214,6 +238,8 @@ export declare const CameraSwitchGroupSchema: z.ZodObject<{
|
|
|
214
238
|
}, z.core.$strip>, z.ZodObject<{
|
|
215
239
|
kind: z.ZodLiteral<"camera-mask">;
|
|
216
240
|
capName: z.ZodString;
|
|
241
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
242
|
+
kind: z.ZodLiteral<"broker-audio-mute">;
|
|
217
243
|
}, z.core.$strip>], "kind">;
|
|
218
244
|
}, z.core.$strip>>>;
|
|
219
245
|
fetchedAt: z.ZodNumber;
|
|
@@ -305,6 +331,28 @@ export interface CameraSwitchDerivationInput {
|
|
|
305
331
|
* `null` = the cap is bound to this camera but did not answer.
|
|
306
332
|
*/
|
|
307
333
|
readonly privacyMask: PrivacyMaskSwitchState | null;
|
|
334
|
+
/**
|
|
335
|
+
* The BROKER's audio-plane policy for this camera, read from the
|
|
336
|
+
* stream-broker on the device's source-owner node. `null` = the broker did
|
|
337
|
+
* not answer, which renders no control rather than a control defaulted to
|
|
338
|
+
* "audio flows".
|
|
339
|
+
*/
|
|
340
|
+
readonly brokerAudio: BrokerAudioSwitchState | null;
|
|
341
|
+
}
|
|
342
|
+
/** What the stream-broker reported about its audio plane for one camera. */
|
|
343
|
+
export interface BrokerAudioSwitchState {
|
|
344
|
+
/**
|
|
345
|
+
* `DeviceOverride.audioMuted` — the broker's own persisted policy. `true`
|
|
346
|
+
* means the broker drops this camera's audio on every plane it serves.
|
|
347
|
+
*
|
|
348
|
+
* There is no `supported` companion, deliberately. Muting a camera that is
|
|
349
|
+
* currently silent is not a dead control: the policy governs what happens
|
|
350
|
+
* when sound DOES appear (a camera unmuted at the device, a stream that
|
|
351
|
+
* only carries audio at night), so it is meaningful to set in advance.
|
|
352
|
+
* That is the opposite of the privacy mask with zero zones, where flipping
|
|
353
|
+
* the master enable is provably a no-op until something else changes.
|
|
354
|
+
*/
|
|
355
|
+
readonly muted: boolean;
|
|
308
356
|
}
|
|
309
357
|
/** What the camera-probed audio switch reported for one camera. */
|
|
310
358
|
export interface DeviceAudioSwitchState {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import type { SubscribeAudioChunksResult, SubscribeFramesInput, SubscribeFramesResult } from '../capabilities/schemas/streaming-shared.js';
|
|
2
|
+
import type { BrokerStatsSchema, BrokerStatusSchema, SubscribeAudioChunksResult, SubscribeFramesInput, SubscribeFramesResult } from '../capabilities/schemas/streaming-shared.js';
|
|
3
3
|
import type { BrokerConsumerAttribution } from '../capabilities/stream-broker.cap.js';
|
|
4
4
|
import type { FrameFormat } from '../types/io.js';
|
|
5
5
|
import type { FrameHandle } from './frame-handle.js';
|
|
@@ -161,54 +161,24 @@ export interface AudioSubscribeOptions {
|
|
|
161
161
|
*/
|
|
162
162
|
readonly tag?: string;
|
|
163
163
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
/** Number of connected RTSP restream clients */
|
|
183
|
-
readonly rtspClients: number;
|
|
184
|
-
/** Number of connected TCP pipe clients */
|
|
185
|
-
readonly pipeClients: number;
|
|
186
|
-
/** Pre-buffer configured duration in seconds */
|
|
187
|
-
readonly preBufferSec: number;
|
|
188
|
-
/** Pre-buffer actual buffered duration in ms */
|
|
189
|
-
readonly preBufferMs: number;
|
|
190
|
-
/** Pre-buffer packet count */
|
|
191
|
-
readonly preBufferPackets: number;
|
|
192
|
-
/**
|
|
193
|
-
* Moleculer node id of the decoder provider currently servicing this
|
|
194
|
-
* stream's decoded subscribers. `null` until the deferred decoder is
|
|
195
|
-
* created (no decoded clients yet, or codec not detected).
|
|
196
|
-
*/
|
|
197
|
-
readonly decoderNodeId: string | null;
|
|
198
|
-
/**
|
|
199
|
-
* Detected audio track parameters from the RTSP DESCRIBE / SDP. Null
|
|
200
|
-
* when the stream has no audio track or the broker is still in cold
|
|
201
|
-
* start. `supported` reflects whether the local native + ffmpeg-based
|
|
202
|
-
* decoder pipeline can produce PCM chunks for downstream consumers
|
|
203
|
-
* (audio-analyzer). When `false`, the codec is detected but skipped.
|
|
204
|
-
*/
|
|
205
|
-
readonly audio?: {
|
|
206
|
-
readonly codec: string;
|
|
207
|
-
readonly sampleRate: number;
|
|
208
|
-
readonly channels: number;
|
|
209
|
-
readonly supported: boolean;
|
|
210
|
-
} | null;
|
|
211
|
-
}
|
|
164
|
+
/**
|
|
165
|
+
* Broker lifecycle state. Inferred from `BrokerStatusSchema` — the enum the
|
|
166
|
+
* wire actually validates against.
|
|
167
|
+
*/
|
|
168
|
+
export type BrokerStatus = z.infer<typeof BrokerStatusSchema>;
|
|
169
|
+
/**
|
|
170
|
+
* Live broker telemetry: the payload of `streamBroker.getBrokerStats` and of
|
|
171
|
+
* the stats push the admin-UI panel subscribes to.
|
|
172
|
+
*
|
|
173
|
+
* Inferred from `BrokerStatsSchema` in
|
|
174
|
+
* `capabilities/schemas/streaming-shared.ts`, which is the schema the cap
|
|
175
|
+
* method validates its output against — so the schema IS the type. This was a
|
|
176
|
+
* hand-written twin until 2026-08-08: two shapes, neither generated from the
|
|
177
|
+
* other, and a field added to one and not the other compiled fine and then
|
|
178
|
+
* silently disappeared on the wire. Every field is documented on the schema;
|
|
179
|
+
* do not restate it here, and never re-introduce a second declaration.
|
|
180
|
+
*/
|
|
181
|
+
export type BrokerStats = z.infer<typeof BrokerStatsSchema>;
|
|
212
182
|
export interface IStreamBroker {
|
|
213
183
|
readonly deviceId: string;
|
|
214
184
|
readonly status: BrokerStatus;
|
package/dist/node.d.ts
CHANGED
|
@@ -8,3 +8,7 @@ export { canonicalDeviceFingerprint, diffExportTargets, resolveExportFingerprint
|
|
|
8
8
|
export type { DeviceExportShape, ExportDelta, ExportTargetEntry, } from './utils/export-reconciler.js';
|
|
9
9
|
export { FfmpegProcess } from './ffmpeg/process.js';
|
|
10
10
|
export type { FfmpegProcessOptions, FfmpegExit, FfmpegExitClass } from './ffmpeg/process.js';
|
|
11
|
+
export { Fmp4FragmentPlane } from './ffmpeg/fmp4-fragment-plane.js';
|
|
12
|
+
export type { Fmp4CloseReason, Fmp4Packet, Fmp4PrebufferOptions, Fmp4PrebufferStats, Fmp4SubscribeInput, Fmp4SubscriberInfo, Fmp4Subscription, } from './ffmpeg/fmp4-fragment-plane.js';
|
|
13
|
+
export { Fmp4FragmentChild } from './ffmpeg/fmp4-fragment-child.js';
|
|
14
|
+
export type { Fmp4FragmentChildArgs, Fmp4FragmentChildDeps, } from './ffmpeg/fmp4-fragment-child.js';
|