@camstack/types 1.2.42 → 1.2.43
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 +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/cap-call-context.d.ts +26 -0
- package/dist/capabilities/index.d.ts +3 -3
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts +26 -0
- package/dist/capabilities/privacy-mask.cap.d.ts +69 -9
- package/dist/capabilities/recording.cap.d.ts +27 -0
- package/dist/capabilities/snapshot.cap.d.ts +1 -1
- package/dist/capabilities/stream-broker.cap.d.ts +4 -0
- package/dist/capabilities/stream-params.cap.d.ts +8 -4
- package/dist/device/device-profile.d.ts +12 -4
- package/dist/device/system-mirror.d.ts +11 -0
- package/dist/ffmpeg/encode-defaults.d.ts +18 -0
- package/dist/ffmpeg/invocation.d.ts +100 -2
- package/dist/ffmpeg/sharing-key.d.ts +54 -2
- package/dist/generated/addon-api.d.ts +32 -0
- package/dist/generated/device-proxy.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +749 -56
- package/dist/index.mjs +725 -57
- package/dist/interfaces/camera-switches.d.ts +163 -5
- package/dist/interfaces/inference-engine.d.ts +24 -3
- package/dist/pipeline/native-lease.d.ts +150 -0
- package/dist/{sleep-Cvi1JxZp.js → sleep-Bx9IIoT0.js} +38 -1
- package/dist/{sleep-BmNKsY7v.mjs → sleep-DtstvzWm.mjs} +33 -2
- package/dist/utils/addon-id.d.ts +30 -0
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_event_category = require("./event-category-BE4PDZ_3.js");
|
|
3
|
-
const require_sleep = require("./sleep-
|
|
3
|
+
const require_sleep = require("./sleep-Bx9IIoT0.js");
|
|
4
4
|
const require_err_msg = require("./err-msg-COpsHMw2.js");
|
|
5
5
|
//#region src/generated/collection-array-methods.ts
|
|
6
6
|
/**
|
package/dist/addon.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as EventCategory } from "./event-category-41fKf-q9.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { C as DeviceType, F as readNodePin, L as ReadinessRegistry, O as expandCapMethods, P as nodePin, R as ReadinessTimeoutError, V as scopeKey, a as asJsonObject, d as DEVICE_SCOPED_CAPS, f as isDeviceScopedCap, gt as normalizeAddonInitResult, ht as BaseAddon, mt as DisposerChain, p as createDeviceProxy, pt as DATAPLANE_SECRET_HEADER, s as asString, t as sleep, u as parseJsonUnknown, v as deviceOpsCapability, w as adminUiCapability, y as viewerUiCapability, yt as emitReadiness } from "./sleep-DtstvzWm.mjs";
|
|
3
3
|
import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
|
|
4
4
|
//#region src/generated/collection-array-methods.ts
|
|
5
5
|
/**
|
|
@@ -28,8 +28,34 @@ export interface NodePinnedRequestOptions {
|
|
|
28
28
|
/**
|
|
29
29
|
* Build the tRPC request options that pin a single capability call to `nodeId`.
|
|
30
30
|
* Pass as the second argument to `.query(input, …)` / `.mutate(input, …)`.
|
|
31
|
+
*
|
|
32
|
+
* ## The id is normalised here, and it has to be
|
|
33
|
+
*
|
|
34
|
+
* A forked addon reads its own node from `ctx.kernel.localNodeId`, and inside a
|
|
35
|
+
* worker that value is a RUNNER id — `hub/export-hap`, not `hub`. Routing
|
|
36
|
+
* compares a pin against real node ids, so such a pin matches nothing and the
|
|
37
|
+
* call fails with `no provider registered for cap "…"`. The local-first
|
|
38
|
+
* resolver already guarded against this (`localNodeId.split('/')[0]`), which
|
|
39
|
+
* made the hazard invisible: unpinned calls worked, and only an explicit pin —
|
|
40
|
+
* the thing you reach for when you specifically need THIS node — silently
|
|
41
|
+
* addressed a node that does not exist.
|
|
42
|
+
*
|
|
43
|
+
* Cost of it being missing: `addon-export-hap` pinned `decoder.getInfo` to its
|
|
44
|
+
* own node to read the host's hardware-decode backend. It never once answered,
|
|
45
|
+
* so every HomeKit egress transcode decoded in SOFTWARE — including 4K H.265 —
|
|
46
|
+
* while D67's whole premise was that the decoder addon is the authority on
|
|
47
|
+
* hardware. The warn said `decoding in SOFTWARE` and read as "this node has no
|
|
48
|
+
* hardware", which was false.
|
|
49
|
+
*
|
|
50
|
+
* Normalising in the ONE constructor fixes every caller at once, which is why
|
|
51
|
+
* it is here and not at the call sites.
|
|
31
52
|
*/
|
|
32
53
|
export declare function nodePin(nodeId: string): NodePinnedRequestOptions;
|
|
54
|
+
/**
|
|
55
|
+
* A runner id is `<nodeId>/<addonId>`; a node id has no slash. Taking the head
|
|
56
|
+
* is idempotent, so passing an already-clean id costs nothing.
|
|
57
|
+
*/
|
|
58
|
+
export declare function toNodeId(idOrRunnerId: string): string;
|
|
33
59
|
/**
|
|
34
60
|
* Read a per-call node pin out of a tRPC `op.context` (transport side).
|
|
35
61
|
* Returns the pinned nodeId, or `undefined` when no pin is present.
|
|
@@ -99,7 +99,7 @@ export { type IStorageCapProvider, StorageLocationTypeSchema, storageCapability,
|
|
|
99
99
|
export { type EvictableUsage, type EvictResult, type IStorageEvictableProvider, storageEvictableCapability, } from './storage-evictable.cap.js';
|
|
100
100
|
export { AbortUploadInputSchema as StorageAbortUploadInputSchema, BeginDownloadInputSchema as StorageBeginDownloadInputSchema, BeginDownloadResultSchema as StorageBeginDownloadResultSchema, BeginUploadInputSchema as StorageBeginUploadInputSchema, BeginUploadResultSchema as StorageBeginUploadResultSchema, EndDownloadInputSchema as StorageEndDownloadInputSchema, FinalizeUploadInputSchema as StorageFinalizeUploadInputSchema, type IStorageProviderImpl, ProviderInfoSchema as StorageProviderInfoSchema, ReadChunkInputSchema as StorageReadChunkInputSchema, storageProviderCapability, TestLocationResultSchema as StorageTestLocationResultSchema, WriteChunkInputSchema as StorageWriteChunkInputSchema, } from './storage-provider.cap.js';
|
|
101
101
|
export type { AudioCodecTarget, BrokerAudioClient, BrokerClients, BrokerConsumerAttribution, BrokerConsumerKind, BrokerDecodedClient, BrokerEncodedClient, BrokerRtspClient, GetStreamWithCodecInput, PlaceholderReason, RtpSource, VideoCodecTarget, } from './stream-broker.cap.js';
|
|
102
|
-
export { BrokerAudioClientSchema, BrokerClientsSchema, BrokerConsumerAttributionSchema, BrokerConsumerKindSchema, BrokerDecodedClientSchema, BrokerEncodedClientSchema, BrokerRtspClientSchema, GetStreamWithCodecInputSchema, PlaceholderReasonSchema, RtpSourceSchema, RtspRestreamEntrySchema, type StreamBrokerClient, type StreamFormat, StreamFormatSchema, streamBrokerCapability, } from './stream-broker.cap.js';
|
|
102
|
+
export { BrokerAudioClientSchema, BrokerClientsSchema, BrokerConsumerAttributionSchema, BrokerConsumerKindSchema, BrokerDecodedClientSchema, BrokerEncodedClientSchema, BrokerRtspClientSchema, type EgressEncode, EgressEncodeSchema, type EgressRateControl, EgressRateControlSchema, type EgressTranscode, type EgressTranscodeRequest, EgressTranscodeRequestSchema, EgressTranscodeSchema, GetStreamWithCodecInputSchema, PlaceholderReasonSchema, RtpSourceSchema, RtspRestreamEntrySchema, type StreamBrokerClient, type StreamFormat, StreamFormatSchema, streamBrokerCapability, } from './stream-broker.cap.js';
|
|
103
103
|
export { type ITerminalSessionProvider, type TerminalProfileInfo, TerminalProfileInfoSchema, type TerminalSessionInfo, TerminalSessionInfoSchema, terminalSessionCapability, } from './terminal-session.cap.js';
|
|
104
104
|
export type { ITurnProvider } from './turn-provider.cap.js';
|
|
105
105
|
export { TurnServerSchema, turnProviderCapability } from './turn-provider.cap.js';
|
|
@@ -172,11 +172,11 @@ export { type HardwareDecodeAccels, type HardwareEncoderId, type HardwareEncoder
|
|
|
172
172
|
export { type IPowerMeterProvider, type PowerMeterStatus, PowerMeterStatusSchema, powerMeterCapability, } from './power-meter.cap.js';
|
|
173
173
|
export { type GpsLocation, type IPresenceProvider, type PresenceStatus, PresenceStatusSchema, presenceCapability, } from './presence.cap.js';
|
|
174
174
|
export { type IPressureSensorProvider, type PressureSensorStatus, PressureSensorStatusSchema, pressureSensorCapability, } from './pressure-sensor.cap.js';
|
|
175
|
-
export { type IPrivacyMaskProvider, type PrivacyMaskOptions, PrivacyMaskOptionsSchema, type PrivacyMaskPatch, PrivacyMaskPatchSchema, type PrivacyMaskRegion, PrivacyMaskRegionSchema, type PrivacyMaskShape, PrivacyMaskShapeSchema, type PrivacyMaskStatus, PrivacyMaskStatusSchema, privacyMaskCapability, } from './privacy-mask.cap.js';
|
|
175
|
+
export { type IPrivacyMaskProvider, type PrivacyMaskOptions, PrivacyMaskOptionsSchema, type PrivacyMaskPatch, PrivacyMaskPatchSchema, type PrivacyMaskRegion, PrivacyMaskRegionSchema, type PrivacyMaskShape, PrivacyMaskShapeSchema, type PrivacyMaskStatus, PrivacyMaskStatusSchema, privacyMaskCapability, summarisePrivacyAudio, } from './privacy-mask.cap.js';
|
|
176
176
|
export { type IPtzProvider, PtzMoveCommandSchema, type PtzOptions, PtzOptionsSchema, PtzPositionSchema, PtzPresetSchema, type PtzStatus, PtzStatusSchema, ptzCapability, } from './ptz.cap.js';
|
|
177
177
|
export { type IPtzAutotrackProvider, type PtzAutotrackRuntimeState, PtzAutotrackRuntimeStateSchema, type PtzAutotrackSettings, PtzAutotrackSettingsSchema, type PtzAutotrackStatus, PtzAutotrackStatusSchema, type PtzAutotrackTargetOption, PtzAutotrackTargetOptionSchema, ptzAutotrackCapability, } from './ptz-autotrack.cap.js';
|
|
178
178
|
export { type IRebootProvider, rebootCapability } from './reboot.cap.js';
|
|
179
|
-
export { type IRecordingProvider, type LocateSegmentResult, LocateSegmentResultSchema, type ReadSegmentBytesResult, ReadSegmentBytesResultSchema, type RecordingAvailability, RecordingAvailabilitySchema, type RecordingDays, RecordingDaysSchema, type RecordingDeviceUsage, RecordingDeviceUsageSchema, type RecordingLocationUsage, RecordingLocationUsageSchema, type RecordingManifest, RecordingManifestSchema, RecordingRangeSchema, type RecordingStatus, RecordingStatusSchema, type RecordingStorageUsage, RecordingStorageUsageSchema, recordingCapability, } from './recording.cap.js';
|
|
179
|
+
export { type IRecordingProvider, type LocateSegmentResult, LocateSegmentResultSchema, type ReadGopBytesResult, ReadGopBytesResultSchema, type ReadSegmentBytesResult, ReadSegmentBytesResultSchema, type RecordingAvailability, RecordingAvailabilitySchema, type RecordingDays, RecordingDaysSchema, type RecordingDeviceUsage, RecordingDeviceUsageSchema, type RecordingLocationUsage, RecordingLocationUsageSchema, type RecordingManifest, RecordingManifestSchema, RecordingRangeSchema, type RecordingStatus, RecordingStatusSchema, type RecordingStorageUsage, RecordingStorageUsageSchema, recordingCapability, } from './recording.cap.js';
|
|
180
180
|
export { type ExportDownload, ExportDownloadSchema, type ExportOptions, ExportOptionsSchema, type ExportRecord, ExportRecordSchema, ExportSpeedSchema, type ExportState, ExportStateSchema, ExportTimelapseSchema, type IRecordingExportProvider, recordingExportCapability, } from './recording-export.cap.js';
|
|
181
181
|
export { type ISceneMonitorProvider, type SceneCheck, SceneCheckSchema, type SceneCondition, SceneConditionSchema, type SceneMonitor, SceneMonitorSchema, type SceneMonitorState, SceneMonitorStateSchema, type SceneMonitorStatus, SceneMonitorStatusSchema, type SceneReference, SceneReferenceSchema, sceneMonitorCapability, } from './scene-monitor.cap.js';
|
|
182
182
|
export { type ZoneRule, type ZoneRuleMode, ZoneRuleModeEnum, ZoneRuleSchema, type ZoneRules, ZoneRulesArraySchema, } from './schemas/zone-rule.js';
|
|
@@ -442,11 +442,13 @@ declare const CameraStatusSchema: z.ZodObject<{
|
|
|
442
442
|
storageBytes: z.ZodNumber;
|
|
443
443
|
}, z.core.$strip>>;
|
|
444
444
|
switchedOff: z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
445
|
+
"privacy-mask": "privacy-mask";
|
|
445
446
|
"audio-analysis": "audio-analysis";
|
|
446
447
|
recording: "recording";
|
|
447
448
|
"stream-broker": "stream-broker";
|
|
448
449
|
notifications: "notifications";
|
|
449
450
|
"object-detection": "object-detection";
|
|
451
|
+
"device-audio": "device-audio";
|
|
450
452
|
}>>>;
|
|
451
453
|
fetchedAt: z.ZodNumber;
|
|
452
454
|
}, z.core.$strip>;
|
|
@@ -1090,11 +1092,13 @@ export declare const pipelineOrchestratorCapability: {
|
|
|
1090
1092
|
deviceId: z.ZodNumber;
|
|
1091
1093
|
switches: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
1092
1094
|
id: z.ZodEnum<{
|
|
1095
|
+
"privacy-mask": "privacy-mask";
|
|
1093
1096
|
"audio-analysis": "audio-analysis";
|
|
1094
1097
|
recording: "recording";
|
|
1095
1098
|
"stream-broker": "stream-broker";
|
|
1096
1099
|
notifications: "notifications";
|
|
1097
1100
|
"object-detection": "object-detection";
|
|
1101
|
+
"device-audio": "device-audio";
|
|
1098
1102
|
}>;
|
|
1099
1103
|
label: z.ZodString;
|
|
1100
1104
|
costWhenOff: z.ZodString;
|
|
@@ -1102,6 +1106,7 @@ export declare const pipelineOrchestratorCapability: {
|
|
|
1102
1106
|
unavailableReason: z.ZodOptional<z.ZodEnum<{
|
|
1103
1107
|
"no-provider": "no-provider";
|
|
1104
1108
|
"source-unreachable": "source-unreachable";
|
|
1109
|
+
"not-configured": "not-configured";
|
|
1105
1110
|
}>>;
|
|
1106
1111
|
enabled: z.ZodBoolean;
|
|
1107
1112
|
authority: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -1113,6 +1118,12 @@ export declare const pipelineOrchestratorCapability: {
|
|
|
1113
1118
|
kind: z.ZodLiteral<"recording-config">;
|
|
1114
1119
|
}, z.core.$strip>, z.ZodObject<{
|
|
1115
1120
|
kind: z.ZodLiteral<"notification-mute">;
|
|
1121
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1122
|
+
kind: z.ZodLiteral<"camera-audio">;
|
|
1123
|
+
capName: z.ZodString;
|
|
1124
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1125
|
+
kind: z.ZodLiteral<"camera-mask">;
|
|
1126
|
+
capName: z.ZodString;
|
|
1116
1127
|
}, z.core.$strip>], "kind">;
|
|
1117
1128
|
}, z.core.$strip>>>;
|
|
1118
1129
|
fetchedAt: z.ZodNumber;
|
|
@@ -1133,22 +1144,26 @@ export declare const pipelineOrchestratorCapability: {
|
|
|
1133
1144
|
readonly setCameraSwitch: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
1134
1145
|
deviceId: z.ZodNumber;
|
|
1135
1146
|
switchId: z.ZodEnum<{
|
|
1147
|
+
"privacy-mask": "privacy-mask";
|
|
1136
1148
|
"audio-analysis": "audio-analysis";
|
|
1137
1149
|
recording: "recording";
|
|
1138
1150
|
"stream-broker": "stream-broker";
|
|
1139
1151
|
notifications: "notifications";
|
|
1140
1152
|
"object-detection": "object-detection";
|
|
1153
|
+
"device-audio": "device-audio";
|
|
1141
1154
|
}>;
|
|
1142
1155
|
enabled: z.ZodBoolean;
|
|
1143
1156
|
}, z.core.$strip>, z.ZodObject<{
|
|
1144
1157
|
deviceId: z.ZodNumber;
|
|
1145
1158
|
switches: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
1146
1159
|
id: z.ZodEnum<{
|
|
1160
|
+
"privacy-mask": "privacy-mask";
|
|
1147
1161
|
"audio-analysis": "audio-analysis";
|
|
1148
1162
|
recording: "recording";
|
|
1149
1163
|
"stream-broker": "stream-broker";
|
|
1150
1164
|
notifications: "notifications";
|
|
1151
1165
|
"object-detection": "object-detection";
|
|
1166
|
+
"device-audio": "device-audio";
|
|
1152
1167
|
}>;
|
|
1153
1168
|
label: z.ZodString;
|
|
1154
1169
|
costWhenOff: z.ZodString;
|
|
@@ -1156,6 +1171,7 @@ export declare const pipelineOrchestratorCapability: {
|
|
|
1156
1171
|
unavailableReason: z.ZodOptional<z.ZodEnum<{
|
|
1157
1172
|
"no-provider": "no-provider";
|
|
1158
1173
|
"source-unreachable": "source-unreachable";
|
|
1174
|
+
"not-configured": "not-configured";
|
|
1159
1175
|
}>>;
|
|
1160
1176
|
enabled: z.ZodBoolean;
|
|
1161
1177
|
authority: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -1167,6 +1183,12 @@ export declare const pipelineOrchestratorCapability: {
|
|
|
1167
1183
|
kind: z.ZodLiteral<"recording-config">;
|
|
1168
1184
|
}, z.core.$strip>, z.ZodObject<{
|
|
1169
1185
|
kind: z.ZodLiteral<"notification-mute">;
|
|
1186
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1187
|
+
kind: z.ZodLiteral<"camera-audio">;
|
|
1188
|
+
capName: z.ZodString;
|
|
1189
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1190
|
+
kind: z.ZodLiteral<"camera-mask">;
|
|
1191
|
+
capName: z.ZodString;
|
|
1170
1192
|
}, z.core.$strip>], "kind">;
|
|
1171
1193
|
}, z.core.$strip>>>;
|
|
1172
1194
|
fetchedAt: z.ZodNumber;
|
|
@@ -1281,11 +1303,13 @@ export declare const pipelineOrchestratorCapability: {
|
|
|
1281
1303
|
storageBytes: z.ZodNumber;
|
|
1282
1304
|
}, z.core.$strip>>;
|
|
1283
1305
|
switchedOff: z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
1306
|
+
"privacy-mask": "privacy-mask";
|
|
1284
1307
|
"audio-analysis": "audio-analysis";
|
|
1285
1308
|
recording: "recording";
|
|
1286
1309
|
"stream-broker": "stream-broker";
|
|
1287
1310
|
notifications: "notifications";
|
|
1288
1311
|
"object-detection": "object-detection";
|
|
1312
|
+
"device-audio": "device-audio";
|
|
1289
1313
|
}>>>;
|
|
1290
1314
|
fetchedAt: z.ZodNumber;
|
|
1291
1315
|
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
@@ -1398,11 +1422,13 @@ export declare const pipelineOrchestratorCapability: {
|
|
|
1398
1422
|
storageBytes: z.ZodNumber;
|
|
1399
1423
|
}, z.core.$strip>>;
|
|
1400
1424
|
switchedOff: z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
1425
|
+
"privacy-mask": "privacy-mask";
|
|
1401
1426
|
"audio-analysis": "audio-analysis";
|
|
1402
1427
|
recording: "recording";
|
|
1403
1428
|
"stream-broker": "stream-broker";
|
|
1404
1429
|
notifications: "notifications";
|
|
1405
1430
|
"object-detection": "object-detection";
|
|
1431
|
+
"device-audio": "device-audio";
|
|
1406
1432
|
}>>>;
|
|
1407
1433
|
fetchedAt: z.ZodNumber;
|
|
1408
1434
|
}, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
@@ -1,13 +1,31 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { type InferNativeProvider } from './capability-definition.js';
|
|
3
2
|
import { DeviceType } from '../device/device-type.js';
|
|
3
|
+
import { type InferNativeProvider } from './capability-definition.js';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
5
|
+
* PRIVACY — what the camera deliberately does not capture. Two planes:
|
|
6
|
+
*
|
|
7
|
+
* - **video**: up to `maxRegions` SHAPES the camera blanks out (NOT a cell
|
|
8
|
+
* grid). Reolink `<shelterList>` zones are rectangles; Hikvision ISAPI
|
|
9
|
+
* `<RegionCoordinatesList>` zones are free polygons (this camera: exactly
|
|
10
|
+
* 4 vertices, not necessarily axis-aligned). The cap composes the shared
|
|
11
|
+
* rect|polygon subset of the MaskShape vocabulary. All coords are
|
|
12
|
+
* normalized 0..1 (top-left origin).
|
|
13
|
+
* - **audio**: the camera's microphone. `setAudioEnabled(false)` stops the
|
|
14
|
+
* camera encoding an audio track at all, so EVERY consumer — live view,
|
|
15
|
+
* recording, the audio analyzer, an export — sees silent video. There is
|
|
16
|
+
* no server-side copy of this fact; the camera is the store and every read
|
|
17
|
+
* is a read-through, which is why a switch over it cannot drift
|
|
18
|
+
* ([D62](../../../../docs/decisions/adr-0062.md)).
|
|
19
|
+
*
|
|
20
|
+
* Both belong here for one reason: they are the two things an operator turns
|
|
21
|
+
* off when the answer to "what is this camera allowed to record" changes, and
|
|
22
|
+
* both are applied ON the device, before anything leaves it.
|
|
23
|
+
*
|
|
24
|
+
* **The audio flag has exactly one writer.** `stream-params` used to carry a
|
|
25
|
+
* per-profile `audio` in its patch schema — reachable from no UI and honoured
|
|
26
|
+
* by one provider — and it was removed when this landed. A second writer onto
|
|
27
|
+
* one device register is the shape of every knob this repo has shipped that
|
|
28
|
+
* disagreed with the one the reader read.
|
|
11
29
|
*/
|
|
12
30
|
/** A privacy-mask region's geometry — rectangle or free polygon. */
|
|
13
31
|
export declare const PrivacyMaskShapeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -41,7 +59,7 @@ export declare const PrivacyMaskRegionSchema: z.ZodObject<{
|
|
|
41
59
|
}, z.core.$strip>>;
|
|
42
60
|
}, z.core.$strip>], "kind">;
|
|
43
61
|
}, z.core.$strip>;
|
|
44
|
-
/** Current on-camera privacy
|
|
62
|
+
/** Current on-camera privacy state — mask master enable + zones + microphone. */
|
|
45
63
|
export declare const PrivacyMaskStatusSchema: z.ZodObject<{
|
|
46
64
|
enabled: z.ZodBoolean;
|
|
47
65
|
regions: z.ZodArray<z.ZodObject<{
|
|
@@ -61,9 +79,10 @@ export declare const PrivacyMaskStatusSchema: z.ZodObject<{
|
|
|
61
79
|
}, z.core.$strip>>;
|
|
62
80
|
}, z.core.$strip>], "kind">;
|
|
63
81
|
}, z.core.$strip>>;
|
|
82
|
+
audioEnabled: z.ZodNullable<z.ZodBoolean>;
|
|
64
83
|
lastFetchedAt: z.ZodNumber;
|
|
65
84
|
}, z.core.$strip>;
|
|
66
|
-
/** Per-camera availability. */
|
|
85
|
+
/** Per-camera availability. Probed, never assumed from the model name. */
|
|
67
86
|
export declare const PrivacyMaskOptionsSchema: z.ZodObject<{
|
|
68
87
|
maxRegions: z.ZodNumber;
|
|
69
88
|
supportedShapes: z.ZodArray<z.ZodEnum<{
|
|
@@ -76,6 +95,7 @@ export declare const PrivacyMaskOptionsSchema: z.ZodObject<{
|
|
|
76
95
|
min: z.ZodNumber;
|
|
77
96
|
max: z.ZodNumber;
|
|
78
97
|
}, z.core.$strip>>;
|
|
98
|
+
supportsAudioMute: z.ZodBoolean;
|
|
79
99
|
}, z.core.$strip>;
|
|
80
100
|
/** Partial change — every field optional. */
|
|
81
101
|
export declare const PrivacyMaskPatchSchema: z.ZodObject<{
|
|
@@ -132,6 +152,7 @@ export declare const privacyMaskCapability: {
|
|
|
132
152
|
min: z.ZodNumber;
|
|
133
153
|
max: z.ZodNumber;
|
|
134
154
|
}, z.core.$strip>>;
|
|
155
|
+
supportsAudioMute: z.ZodBoolean;
|
|
135
156
|
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
136
157
|
readonly setMask: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
137
158
|
deviceId: z.ZodNumber;
|
|
@@ -156,6 +177,24 @@ export declare const privacyMaskCapability: {
|
|
|
156
177
|
}, z.core.$strip>>>;
|
|
157
178
|
}, z.core.$strip>;
|
|
158
179
|
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
180
|
+
/**
|
|
181
|
+
* Turn the camera's microphone on or off, at the camera.
|
|
182
|
+
*
|
|
183
|
+
* Deliberately its OWN mutation rather than a field on
|
|
184
|
+
* {@link PrivacyMaskPatchSchema}: `patch.enabled` already means "the video
|
|
185
|
+
* mask master switch", and overloading it would make one boolean mean two
|
|
186
|
+
* unrelated things on the same call. It is also the only method here whose
|
|
187
|
+
* write leaves the device in a state a later `getStatus` reads back
|
|
188
|
+
* verbatim, which is what makes it safe as a switch authority.
|
|
189
|
+
*
|
|
190
|
+
* A camera whose `getOptions().supportsAudioMute` is false must REJECT
|
|
191
|
+
* this rather than silently accept it — a write nothing applies is exactly
|
|
192
|
+
* what the switch group exists to remove.
|
|
193
|
+
*/
|
|
194
|
+
readonly setAudioEnabled: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
195
|
+
deviceId: z.ZodNumber;
|
|
196
|
+
enabled: z.ZodBoolean;
|
|
197
|
+
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
159
198
|
};
|
|
160
199
|
readonly status: {
|
|
161
200
|
readonly schema: z.ZodObject<{
|
|
@@ -177,6 +216,7 @@ export declare const privacyMaskCapability: {
|
|
|
177
216
|
}, z.core.$strip>>;
|
|
178
217
|
}, z.core.$strip>], "kind">;
|
|
179
218
|
}, z.core.$strip>>;
|
|
219
|
+
audioEnabled: z.ZodNullable<z.ZodBoolean>;
|
|
180
220
|
lastFetchedAt: z.ZodNumber;
|
|
181
221
|
}, z.core.$strip>;
|
|
182
222
|
readonly kind: "poll";
|
|
@@ -200,7 +240,27 @@ export declare const privacyMaskCapability: {
|
|
|
200
240
|
}, z.core.$strip>>;
|
|
201
241
|
}, z.core.$strip>], "kind">;
|
|
202
242
|
}, z.core.$strip>>;
|
|
243
|
+
audioEnabled: z.ZodNullable<z.ZodBoolean>;
|
|
203
244
|
lastFetchedAt: z.ZodNumber;
|
|
204
245
|
}, z.core.$strip>;
|
|
205
246
|
};
|
|
206
247
|
export type IPrivacyMaskProvider = InferNativeProvider<typeof privacyMaskCapability>;
|
|
248
|
+
/**
|
|
249
|
+
* Collapse a camera's PER-PROFILE audio flags into the one answer
|
|
250
|
+
* {@link PrivacyMaskStatusSchema.shape.audioEnabled} promises.
|
|
251
|
+
*
|
|
252
|
+
* Both firmwares this cap talks to store the flag per stream profile, and
|
|
253
|
+
* both let those profiles disagree. The rule is `some`, not `every`: privacy
|
|
254
|
+
* is only satisfied when NOTHING is carrying sound, so a camera whose sub
|
|
255
|
+
* stream is still audible must read as `true` and be switchable off — not as
|
|
256
|
+
* `false` because the main stream happens to be muted already.
|
|
257
|
+
*
|
|
258
|
+
* An empty list is `null` ("this camera reported no audio flag at all"),
|
|
259
|
+
* never `false`.
|
|
260
|
+
*
|
|
261
|
+
* Lives here rather than in each provider so the rule the schema documents
|
|
262
|
+
* and the rule the providers apply cannot drift apart.
|
|
263
|
+
*/
|
|
264
|
+
export declare function summarisePrivacyAudio(profiles: readonly {
|
|
265
|
+
readonly audioEnabled: boolean;
|
|
266
|
+
}[]): boolean | null;
|
|
@@ -109,6 +109,20 @@ export declare const ReadSegmentBytesResultSchema: z.ZodObject<{
|
|
|
109
109
|
data: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
|
|
110
110
|
}, z.core.$strip>;
|
|
111
111
|
export type ReadSegmentBytesResult = z.infer<typeof ReadSegmentBytesResultSchema>;
|
|
112
|
+
/**
|
|
113
|
+
* One GOP of a finalized segment, cut by byte range through the segment's own
|
|
114
|
+
* `mfra` (D31 on the D42 feeder path). `data` is the `ftyp`+`moov` head plus
|
|
115
|
+
* the single `moof`+`mdat` covering the requested instant — standalone-
|
|
116
|
+
* demuxable, never the whole file. When the segment's index cannot be parsed
|
|
117
|
+
* the provider degrades INSIDE the mechanism to the whole segment (still one
|
|
118
|
+
* `data`, `gopStartMs` = the segment start) — a worse read, not another path.
|
|
119
|
+
*/
|
|
120
|
+
export declare const ReadGopBytesResultSchema: z.ZodObject<{
|
|
121
|
+
data: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
|
|
122
|
+
gopStartMs: z.ZodNumber;
|
|
123
|
+
gopDurMs: z.ZodNumber;
|
|
124
|
+
}, z.core.$strip>;
|
|
125
|
+
export type ReadGopBytesResult = z.infer<typeof ReadGopBytesResultSchema>;
|
|
112
126
|
export declare const recordingCapability: {
|
|
113
127
|
readonly name: "recording";
|
|
114
128
|
readonly scope: "system";
|
|
@@ -246,6 +260,19 @@ export declare const recordingCapability: {
|
|
|
246
260
|
}, z.core.$strip>, z.ZodObject<{
|
|
247
261
|
data: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
|
|
248
262
|
}, z.core.$strip>, "query">;
|
|
263
|
+
/** Read the single GOP of segment `startMs` covering `epochMs`, by mfra
|
|
264
|
+
* byte range — the scrub-granular read (D31 letter on the feeder path).
|
|
265
|
+
* See {@link ReadGopBytesResultSchema} for the degradation contract. */
|
|
266
|
+
readonly readGopBytes: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
267
|
+
deviceId: z.ZodNumber;
|
|
268
|
+
profile: z.ZodString;
|
|
269
|
+
startMs: z.ZodNumber;
|
|
270
|
+
epochMs: z.ZodNumber;
|
|
271
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
272
|
+
data: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
|
|
273
|
+
gopStartMs: z.ZodNumber;
|
|
274
|
+
gopDurMs: z.ZodNumber;
|
|
275
|
+
}, z.core.$strip>, "query">;
|
|
249
276
|
readonly setDeviceConfig: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
250
277
|
deviceId: z.ZodNumber;
|
|
251
278
|
config: z.ZodObject<{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { type InferProvider } from './capability-definition.js';
|
|
3
2
|
import { DeviceType } from '../device/device-type.js';
|
|
3
|
+
import { type InferProvider } from './capability-definition.js';
|
|
4
4
|
/**
|
|
5
5
|
* A single device snapshot returned as base64 JPEG/PNG.
|
|
6
6
|
*
|
|
@@ -420,6 +420,7 @@ export declare const EgressTranscodeRequestSchema: z.ZodObject<{
|
|
|
420
420
|
h264_mp4toannexb: "h264_mp4toannexb";
|
|
421
421
|
hevc_mp4toannexb: "hevc_mp4toannexb";
|
|
422
422
|
}>>;
|
|
423
|
+
publishLocally: z.ZodOptional<z.ZodBoolean>;
|
|
423
424
|
pixelFormat: z.ZodOptional<z.ZodEnum<{
|
|
424
425
|
yuv420p: "yuv420p";
|
|
425
426
|
nv12: "nv12";
|
|
@@ -450,6 +451,7 @@ export declare const EgressTranscodeSchema: z.ZodObject<{
|
|
|
450
451
|
transcoded: z.ZodBoolean;
|
|
451
452
|
encoder: z.ZodString;
|
|
452
453
|
decodeHwAccel: z.ZodNullable<z.ZodString>;
|
|
454
|
+
camStreamId: z.ZodNullable<z.ZodString>;
|
|
453
455
|
}, z.core.$strip>;
|
|
454
456
|
export type EgressTranscode = z.infer<typeof EgressTranscodeSchema>;
|
|
455
457
|
export declare const streamBrokerCapability: {
|
|
@@ -955,6 +957,7 @@ export declare const streamBrokerCapability: {
|
|
|
955
957
|
h264_mp4toannexb: "h264_mp4toannexb";
|
|
956
958
|
hevc_mp4toannexb: "hevc_mp4toannexb";
|
|
957
959
|
}>>;
|
|
960
|
+
publishLocally: z.ZodOptional<z.ZodBoolean>;
|
|
958
961
|
pixelFormat: z.ZodOptional<z.ZodEnum<{
|
|
959
962
|
yuv420p: "yuv420p";
|
|
960
963
|
nv12: "nv12";
|
|
@@ -983,6 +986,7 @@ export declare const streamBrokerCapability: {
|
|
|
983
986
|
transcoded: z.ZodBoolean;
|
|
984
987
|
encoder: z.ZodString;
|
|
985
988
|
decodeHwAccel: z.ZodNullable<z.ZodString>;
|
|
989
|
+
camStreamId: z.ZodNullable<z.ZodString>;
|
|
986
990
|
}, z.core.$strip>, "mutation">;
|
|
987
991
|
/** Drop one reference. The child dies when the last holder releases. */
|
|
988
992
|
readonly releaseEgressTranscode: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { type InferNativeProvider } from './capability-definition.js';
|
|
3
2
|
import { DeviceType } from '../device/device-type.js';
|
|
3
|
+
import { type InferNativeProvider } from './capability-definition.js';
|
|
4
4
|
/** One of the camera's stream profiles. */
|
|
5
5
|
export declare const StreamProfileSchema: z.ZodEnum<{
|
|
6
6
|
sub: "sub";
|
|
@@ -183,7 +183,13 @@ export declare const StreamParamsOptionsSchema: z.ZodObject<{
|
|
|
183
183
|
}, z.core.$strip>>;
|
|
184
184
|
}, z.core.$strip>;
|
|
185
185
|
/** A partial change to one profile — every field optional; a provider
|
|
186
|
-
* ignores fields it doesn't support.
|
|
186
|
+
* ignores fields it doesn't support.
|
|
187
|
+
*
|
|
188
|
+
* There is deliberately NO `audio` here. It existed until 2026-08-07,
|
|
189
|
+
* reachable from no form and honoured by exactly one provider, while the
|
|
190
|
+
* camera's microphone is a whole-device fact. It now has one writer,
|
|
191
|
+
* `privacyMask.setAudioEnabled`, which writes every profile — see
|
|
192
|
+
* `privacy-mask.cap.ts`. */
|
|
187
193
|
export declare const StreamProfilePatchSchema: z.ZodObject<{
|
|
188
194
|
width: z.ZodOptional<z.ZodNumber>;
|
|
189
195
|
height: z.ZodOptional<z.ZodNumber>;
|
|
@@ -203,7 +209,6 @@ export declare const StreamProfilePatchSchema: z.ZodObject<{
|
|
|
203
209
|
main: "main";
|
|
204
210
|
}>>;
|
|
205
211
|
gop: z.ZodOptional<z.ZodNumber>;
|
|
206
|
-
audio: z.ZodOptional<z.ZodBoolean>;
|
|
207
212
|
}, z.core.$strip>;
|
|
208
213
|
export type StreamParamsStatus = z.infer<typeof StreamParamsStatusSchema>;
|
|
209
214
|
export type StreamParamsOptions = z.infer<typeof StreamParamsOptionsSchema>;
|
|
@@ -316,7 +321,6 @@ export declare const streamParamsCapability: {
|
|
|
316
321
|
main: "main";
|
|
317
322
|
}>>;
|
|
318
323
|
gop: z.ZodOptional<z.ZodNumber>;
|
|
319
|
-
audio: z.ZodOptional<z.ZodBoolean>;
|
|
320
324
|
}, z.core.$strip>;
|
|
321
325
|
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
322
326
|
/**
|
|
@@ -120,10 +120,18 @@ export interface DeviceProfile {
|
|
|
120
120
|
*/
|
|
121
121
|
readonly defaults: DeviceProfileDefaults;
|
|
122
122
|
/**
|
|
123
|
-
* Generic settings overrides
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
123
|
+
* Generic settings overrides, keyed by dot-path, intended to be
|
|
124
|
+
* interpreted by the per-driver / per-addon config schema.
|
|
125
|
+
*
|
|
126
|
+
* **Nothing reads this today.** It is a declared extension point with no
|
|
127
|
+
* consumer anywhere in the workspace, so any entry placed here is inert. It
|
|
128
|
+
* shipped populated — `snapshot.minRefreshIntervalSec: 3600` and
|
|
129
|
+
* `streamBroker.preBufferEnabled: false` on the battery profile — which read
|
|
130
|
+
* as live policy and were not: both behaviours are really enforced off
|
|
131
|
+
* `DeviceFeature.BatteryOperated` directly, by `BATTERY_DEFAULT_MAX_AGE_S`
|
|
132
|
+
* in `snapshot.addon.ts` and by `getEffectivePreBufferSec` in
|
|
133
|
+
* `stream-broker-manager.ts`. Emptied 2026-08-07; keep it empty until a
|
|
134
|
+
* reader exists, or an entry here is just documentation that lies.
|
|
127
135
|
*/
|
|
128
136
|
readonly settings: Readonly<Record<string, unknown>>;
|
|
129
137
|
}
|
|
@@ -62,6 +62,17 @@ export interface SystemMirrorApi extends SliceHandleApi {
|
|
|
62
62
|
addonId?: string;
|
|
63
63
|
}): Promise<ReadonlyArray<DeviceInfo>>;
|
|
64
64
|
};
|
|
65
|
+
/**
|
|
66
|
+
* Single-device metadata read. Required — `refreshDeviceMetadata`
|
|
67
|
+
* runs once per `device.registered` / `device.updated` event, and a
|
|
68
|
+
* full-catalog fetch there is what melts the hub during a
|
|
69
|
+
* deploy/restart storm (see `refreshDeviceMetadata`).
|
|
70
|
+
*/
|
|
71
|
+
readonly getDevice: {
|
|
72
|
+
query(input: {
|
|
73
|
+
deviceId: number;
|
|
74
|
+
}): Promise<DeviceInfo | null>;
|
|
75
|
+
};
|
|
65
76
|
};
|
|
66
77
|
readonly deviceState: SliceHandleApi['deviceState'] & {
|
|
67
78
|
readonly getAllSnapshots: {
|
|
@@ -56,6 +56,24 @@ export declare const WEBRTC_EGRESS_PROFILE: EncodeProfile;
|
|
|
56
56
|
* audio plane (out-of-band), so this is `passthrough` exactly like the browser
|
|
57
57
|
* — see the ADR for why the previous in-band Opus was encoded and discarded.
|
|
58
58
|
*/
|
|
59
|
+
/**
|
|
60
|
+
* Alexa's egress asks for OPUS, and that is a change with a history.
|
|
61
|
+
*
|
|
62
|
+
* The previous profile encoded Opus IN-BAND into an MPEG-TS, where it was
|
|
63
|
+
* discarded: Opus is `stream_type 0x06` and the broker's demuxer maps only
|
|
64
|
+
* `0x0f` (aac), `0x03`/`0x04` (mp2) and `0x81` (ac3). Every frame it produced
|
|
65
|
+
* died at the demuxer, so the encode was replaced with `passthrough` — correct,
|
|
66
|
+
* because paying libopus for nothing is worse than silence.
|
|
67
|
+
*
|
|
68
|
+
* But `passthrough` means the egress emits NO audio at all, and Alexa's audio
|
|
69
|
+
* does not arrive by magic: it rides the published stream, which is what the
|
|
70
|
+
* WebRTC session dials. So the Echo had video and silence either way.
|
|
71
|
+
*
|
|
72
|
+
* Opus here now reaches the egress AUDIO SIDECAR — a separate RTP leg the
|
|
73
|
+
* restreamer grafts onto its SDP — which never touches the MPEG-TS demuxer that
|
|
74
|
+
* killed the in-band attempt. Same codec, different plane, and this one the
|
|
75
|
+
* consumer can actually negotiate.
|
|
76
|
+
*/
|
|
59
77
|
export declare const ALEXA_EGRESS_PROFILE: EncodeProfile;
|
|
60
78
|
/** VBV window for a consumer whose budget is enforced per second (HomeKit). */
|
|
61
79
|
export declare const RATE_CONTROL_TIGHT: FfmpegRateControl;
|