@camstack/types 0.1.35 → 0.1.37

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.
Files changed (95) hide show
  1. package/dist/capabilities/addon-widgets-source.cap.d.ts +73 -5
  2. package/dist/capabilities/addon-widgets-source.cap.d.ts.map +1 -1
  3. package/dist/capabilities/addon-widgets.cap.d.ts +22 -4
  4. package/dist/capabilities/addon-widgets.cap.d.ts.map +1 -1
  5. package/dist/capabilities/audio-analysis.cap.d.ts +7 -4
  6. package/dist/capabilities/audio-analysis.cap.d.ts.map +1 -1
  7. package/dist/capabilities/camera-streams.cap.d.ts +7 -5
  8. package/dist/capabilities/camera-streams.cap.d.ts.map +1 -1
  9. package/dist/capabilities/capability-definition.d.ts +114 -0
  10. package/dist/capabilities/capability-definition.d.ts.map +1 -1
  11. package/dist/capabilities/decoder.cap.d.ts +90 -0
  12. package/dist/capabilities/decoder.cap.d.ts.map +1 -1
  13. package/dist/capabilities/detection-pipeline.cap.d.ts +6 -4
  14. package/dist/capabilities/detection-pipeline.cap.d.ts.map +1 -1
  15. package/dist/capabilities/device-manager.cap.d.ts +3 -3
  16. package/dist/capabilities/device-ops.cap.d.ts +1 -1
  17. package/dist/capabilities/index.d.ts +18 -11
  18. package/dist/capabilities/index.d.ts.map +1 -1
  19. package/dist/capabilities/motion-detection.cap.d.ts +2 -0
  20. package/dist/capabilities/motion-detection.cap.d.ts.map +1 -1
  21. package/dist/capabilities/motion-zones.cap.d.ts +83 -0
  22. package/dist/capabilities/motion-zones.cap.d.ts.map +1 -0
  23. package/dist/capabilities/nodes.cap.d.ts +9 -0
  24. package/dist/capabilities/nodes.cap.d.ts.map +1 -1
  25. package/dist/capabilities/oauth-integration.cap.d.ts +103 -0
  26. package/dist/capabilities/oauth-integration.cap.d.ts.map +1 -0
  27. package/dist/capabilities/pipeline-analytics.cap.d.ts +2 -0
  28. package/dist/capabilities/pipeline-analytics.cap.d.ts.map +1 -1
  29. package/dist/capabilities/ptz-autotrack.cap.d.ts +10 -0
  30. package/dist/capabilities/ptz-autotrack.cap.d.ts.map +1 -1
  31. package/dist/capabilities/ptz.cap.d.ts +57 -1
  32. package/dist/capabilities/ptz.cap.d.ts.map +1 -1
  33. package/dist/capabilities/schemas/streaming-shared.d.ts +110 -3
  34. package/dist/capabilities/schemas/streaming-shared.d.ts.map +1 -1
  35. package/dist/capabilities/snapshot.cap.d.ts +2 -0
  36. package/dist/capabilities/snapshot.cap.d.ts.map +1 -1
  37. package/dist/capabilities/sso-bridge.cap.d.ts +120 -0
  38. package/dist/capabilities/sso-bridge.cap.d.ts.map +1 -1
  39. package/dist/capabilities/stream-broker.cap.d.ts +97 -4
  40. package/dist/capabilities/stream-broker.cap.d.ts.map +1 -1
  41. package/dist/capabilities/stream-params-config-schema.d.ts +56 -0
  42. package/dist/capabilities/stream-params-config-schema.d.ts.map +1 -0
  43. package/dist/capabilities/stream-params.cap.d.ts +482 -0
  44. package/dist/capabilities/stream-params.cap.d.ts.map +1 -0
  45. package/dist/capabilities/user-management.cap.d.ts +198 -1
  46. package/dist/capabilities/user-management.cap.d.ts.map +1 -1
  47. package/dist/capabilities/webrtc-session.cap.d.ts +2 -0
  48. package/dist/capabilities/webrtc-session.cap.d.ts.map +1 -1
  49. package/dist/generated/addon-api.d.ts +1175 -51
  50. package/dist/generated/addon-api.d.ts.map +1 -1
  51. package/dist/generated/cap-status-types.d.ts +7 -3
  52. package/dist/generated/cap-status-types.d.ts.map +1 -1
  53. package/dist/generated/capability-router-map.d.ts +13 -4
  54. package/dist/generated/capability-router-map.d.ts.map +1 -1
  55. package/dist/generated/device-local-state.d.ts +6 -0
  56. package/dist/generated/device-local-state.d.ts.map +1 -1
  57. package/dist/generated/device-proxy.d.ts +6 -0
  58. package/dist/generated/device-proxy.d.ts.map +1 -1
  59. package/dist/generated/method-access-map.d.ts +1 -1
  60. package/dist/generated/method-access-map.d.ts.map +1 -1
  61. package/dist/generated/system-proxy.d.ts +4 -4
  62. package/dist/generated/system-proxy.d.ts.map +1 -1
  63. package/dist/{index-BkSgJYP7.js → index-BblD92Si.js} +600 -98
  64. package/dist/index-BblD92Si.js.map +1 -0
  65. package/dist/{index-CWhQOnm9.mjs → index-CgPd35k5.mjs} +949 -447
  66. package/dist/index-CgPd35k5.mjs.map +1 -0
  67. package/dist/index.d.ts +2 -1
  68. package/dist/index.d.ts.map +1 -1
  69. package/dist/index.js +313 -7
  70. package/dist/index.js.map +1 -1
  71. package/dist/index.mjs +587 -281
  72. package/dist/index.mjs.map +1 -1
  73. package/dist/interfaces/addon.d.ts +123 -29
  74. package/dist/interfaces/addon.d.ts.map +1 -1
  75. package/dist/interfaces/capability.d.ts +6 -23
  76. package/dist/interfaces/capability.d.ts.map +1 -1
  77. package/dist/interfaces/config-ui.d.ts +4 -101
  78. package/dist/interfaces/config-ui.d.ts.map +1 -1
  79. package/dist/interfaces/decoder.d.ts +12 -0
  80. package/dist/interfaces/decoder.d.ts.map +1 -1
  81. package/dist/interfaces/device-provider.d.ts +0 -4
  82. package/dist/interfaces/device-provider.d.ts.map +1 -1
  83. package/dist/interfaces/event-bus.d.ts +15 -0
  84. package/dist/interfaces/event-bus.d.ts.map +1 -1
  85. package/dist/interfaces/frame-handle.d.ts +40 -0
  86. package/dist/interfaces/frame-handle.d.ts.map +1 -0
  87. package/dist/interfaces/kernel-abstractions.d.ts +6 -0
  88. package/dist/interfaces/kernel-abstractions.d.ts.map +1 -1
  89. package/dist/interfaces/stream-broker.d.ts +40 -21
  90. package/dist/interfaces/stream-broker.d.ts.map +1 -1
  91. package/dist/node.js +1 -1
  92. package/dist/node.mjs +1 -1
  93. package/package.json +1 -1
  94. package/dist/index-BkSgJYP7.js.map +0 -1
  95. package/dist/index-CWhQOnm9.mjs.map +0 -1
@@ -46,9 +46,9 @@ export type CameraStream = z.infer<typeof CameraStreamSchema>;
46
46
  export declare const ProfileSlotStatusSchema: z.ZodEnum<{
47
47
  error: "error";
48
48
  streaming: "streaming";
49
+ unassigned: "unassigned";
49
50
  idle: "idle";
50
51
  connecting: "connecting";
51
- unassigned: "unassigned";
52
52
  }>;
53
53
  export type ProfileSlotStatus = z.infer<typeof ProfileSlotStatusSchema>;
54
54
  export declare const ProfileSlotSchema: z.ZodObject<{
@@ -63,9 +63,9 @@ export declare const ProfileSlotSchema: z.ZodObject<{
63
63
  status: z.ZodEnum<{
64
64
  error: "error";
65
65
  streaming: "streaming";
66
+ unassigned: "unassigned";
66
67
  idle: "idle";
67
68
  connecting: "connecting";
68
- unassigned: "unassigned";
69
69
  }>;
70
70
  resolution: z.ZodOptional<z.ZodObject<{
71
71
  width: z.ZodNumber;
@@ -87,9 +87,9 @@ export declare const StreamSourceEntrySchema: z.ZodObject<{
87
87
  custom: "custom";
88
88
  rtsp: "rtsp";
89
89
  rtmp: "rtmp";
90
- webrtc: "webrtc";
91
90
  annexb: "annexb";
92
91
  "http-mjpeg": "http-mjpeg";
92
+ webrtc: "webrtc";
93
93
  }>;
94
94
  url: z.ZodOptional<z.ZodString>;
95
95
  resolution: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
@@ -136,6 +136,113 @@ export declare const DecodedFrameSchema: z.ZodObject<{
136
136
  }>;
137
137
  timestamp: z.ZodNumber;
138
138
  }, z.core.$strip>;
139
+ /**
140
+ * Wire schema for `FrameHandle` — a zero-pixel, serialisable reference to a
141
+ * frame in a shared-memory ring (Phase 5 / D9). Mirrors the `FrameHandle` TS
142
+ * interface in `interfaces/frame-handle.ts` field-for-field so a decoder cap
143
+ * method (`pullHandles`) can carry handles over tRPC / Moleculer.
144
+ *
145
+ * The `satisfies` assertion below pins this schema to the interface: if a
146
+ * field is added to / removed from `FrameHandle` without a matching schema
147
+ * edit, `z.infer<typeof FrameHandleSchema>` stops being assignable to
148
+ * `FrameHandle` and the build fails — no silent drift.
149
+ */
150
+ export declare const FrameHandleSchema: z.ZodObject<{
151
+ shmId: z.ZodString;
152
+ slot: z.ZodNumber;
153
+ seq: z.ZodNumber;
154
+ width: z.ZodNumber;
155
+ height: z.ZodNumber;
156
+ format: z.ZodEnum<{
157
+ jpeg: "jpeg";
158
+ rgb: "rgb";
159
+ bgr: "bgr";
160
+ yuv420: "yuv420";
161
+ gray: "gray";
162
+ }>;
163
+ pts: z.ZodNumber;
164
+ byteLength: z.ZodNumber;
165
+ nodeId: z.ZodString;
166
+ slotCount: z.ZodNumber;
167
+ }, z.core.$strip>;
168
+ /**
169
+ * Pixel format a frame-handle subscriber can request from the broker
170
+ * (Phase 5 / D9). The packed, raster subset of `FrameFormat` — the formats a
171
+ * `frameSink: 'shm'` decoder session can write into a `FrameRing` slot.
172
+ * `jpeg` is excluded: a variable-length stream is not a fixed-stride ring
173
+ * payload, and no decoded-frame consumer requests it over the shm plane.
174
+ */
175
+ export declare const FrameHandleFormatSchema: z.ZodEnum<{
176
+ rgb: "rgb";
177
+ bgr: "bgr";
178
+ yuv420: "yuv420";
179
+ gray: "gray";
180
+ }>;
181
+ export type FrameHandleFormat = z.infer<typeof FrameHandleFormatSchema>;
182
+ /**
183
+ * Input for `stream-broker.subscribeFrames` (Phase 5 / D9). A consumer asks the
184
+ * broker for a `FrameHandle` stream of one `format`; the broker maintains one
185
+ * shared-memory ring per `(brokerId, format)` actually requested, so a `gray`
186
+ * subscriber (motion) and an `rgb` subscriber (detection) each read the format
187
+ * they asked for with no broker-side conversion.
188
+ */
189
+ export declare const SubscribeFramesInputSchema: z.ZodObject<{
190
+ brokerId: z.ZodString;
191
+ format: z.ZodEnum<{
192
+ rgb: "rgb";
193
+ bgr: "bgr";
194
+ yuv420: "yuv420";
195
+ gray: "gray";
196
+ }>;
197
+ maxFps: z.ZodOptional<z.ZodNumber>;
198
+ tag: z.ZodOptional<z.ZodString>;
199
+ }, z.core.$strip>;
200
+ export type SubscribeFramesInput = z.infer<typeof SubscribeFramesInputSchema>;
201
+ /**
202
+ * Result of `stream-broker.subscribeFrames`. The consumer then polls
203
+ * `pullFrameHandles({ subscriptionId, maxCount })` and feeds each returned
204
+ * `FrameHandle` to a `FrameRingReader`.
205
+ */
206
+ export declare const SubscribeFramesResultSchema: z.ZodObject<{
207
+ subscriptionId: z.ZodString;
208
+ maxFps: z.ZodNumber;
209
+ }, z.core.$strip>;
210
+ export type SubscribeFramesResult = z.infer<typeof SubscribeFramesResultSchema>;
211
+ /**
212
+ * Wire schema for a decoded audio chunk (Phase 5 / D9). Mirrors the
213
+ * `DecodedAudioChunk` TS interface in `interfaces/stream-broker.ts`: PCM
214
+ * sample bytes plus the track parameters a consumer needs to interpret them.
215
+ *
216
+ * Audio chunks are tiny (a ~500ms AudioCodecSession window is a few KB of
217
+ * Float32 PCM), so unlike video frames they ship their bytes INLINE over
218
+ * tRPC / Moleculer — no shared-memory plane. `data` is typed `Uint8Array`
219
+ * (the wire-serialisable supertype of `Buffer`) to match `DecodedFrameSchema`
220
+ * / `EncodedPacketSchema`'s precedent; a `Buffer` is assignable to it.
221
+ */
222
+ export declare const DecodedAudioChunkSchema: z.ZodObject<{
223
+ data: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
224
+ sampleRate: z.ZodNumber;
225
+ channels: z.ZodNumber;
226
+ timestamp: z.ZodNumber;
227
+ }, z.core.$strip>;
228
+ export type DecodedAudioChunkWire = z.infer<typeof DecodedAudioChunkSchema>;
229
+ /**
230
+ * Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9). The
231
+ * handle-free, ship-bytes-inline analogue of `subscribeFrames`: a consumer
232
+ * asks the broker for the decoded audio-chunk stream of one broker; the
233
+ * broker keeps a per-subscription bounded FIFO queue the consumer drains via
234
+ * `pullAudioChunks`.
235
+ */
236
+ export declare const SubscribeAudioChunksInputSchema: z.ZodObject<{
237
+ brokerId: z.ZodString;
238
+ tag: z.ZodOptional<z.ZodString>;
239
+ }, z.core.$strip>;
240
+ export type SubscribeAudioChunksInput = z.infer<typeof SubscribeAudioChunksInputSchema>;
241
+ /** Result of `stream-broker.subscribeAudioChunks`. */
242
+ export declare const SubscribeAudioChunksResultSchema: z.ZodObject<{
243
+ subscriptionId: z.ZodString;
244
+ }, z.core.$strip>;
245
+ export type SubscribeAudioChunksResult = z.infer<typeof SubscribeAudioChunksResultSchema>;
139
246
  export declare const BrokerStatusSchema: z.ZodEnum<{
140
247
  error: "error";
141
248
  streaming: "streaming";
@@ -1 +1 @@
1
- {"version":3,"file":"streaming-shared.d.ts","sourceRoot":"","sources":["../../../src/capabilities/schemas/streaming-shared.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAUvB,eAAO,MAAM,gBAAgB;;;;EAAiC,CAAA;AAC9D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEzD,oDAAoD;AACpD,eAAO,MAAM,iBAAiB,iCAAkC,CAAA;AAiBhE,eAAO,MAAM,mBAAmB;;;;;;EAM9B,CAAA;AACF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAE/D,eAAO,MAAM,yBAAyB;;;iBAGpC,CAAA;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;iBA2C7B,CAAA;AACF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAS7D,eAAO,MAAM,uBAAuB;;;;;;EAMlC,CAAA;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAEvE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;iBAY5B,CAAA;AACF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE3D;;;GAGG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;iBAUlC,CAAA;AAEF,eAAO,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;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuC5B,CAAA"}
@@ -48,6 +48,8 @@ export declare const snapshotCapability: {
48
48
  readonly name: "snapshot";
49
49
  readonly scope: "device";
50
50
  readonly mode: "singleton";
51
+ readonly kind: "wrapper";
52
+ readonly defaultActive: true;
51
53
  readonly deviceTypes: readonly [DeviceType.Camera];
52
54
  readonly exposesDeviceSettings: true;
53
55
  readonly methods: {
@@ -1 +1 @@
1
- {"version":3,"file":"snapshot.cap.d.ts","sourceRoot":"","sources":["../../src/capabilities/snapshot.cap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAqC,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAClG,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAErD;;;;;;GAMG;AACH,QAAA,MAAM,mBAAmB;;;iBAGvB,CAAA;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH;;;;;GAKG;AACH,QAAA,MAAM,oBAAoB;;;;;iBASxB,CAAA;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCU,CAAA;AAEzC,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAE5E,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,CAAA"}
1
+ {"version":3,"file":"snapshot.cap.d.ts","sourceRoot":"","sources":["../../src/capabilities/snapshot.cap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAqC,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAClG,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAErD;;;;;;GAMG;AACH,QAAA,MAAM,mBAAmB;;;iBAGvB,CAAA;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH;;;;;GAKG;AACH,QAAA,MAAM,oBAAoB;;;;;iBASxB,CAAA;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuCU,CAAA;AAEzC,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAE5E,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,CAAA"}
@@ -22,6 +22,46 @@ declare const SsoBridgeClaimsSchema: z.ZodObject<{
22
22
  email: z.ZodOptional<z.ZodString>;
23
23
  displayName: z.ZodOptional<z.ZodString>;
24
24
  hubUrl: z.ZodOptional<z.ZodString>;
25
+ scopes: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
26
+ type: z.ZodLiteral<"category">;
27
+ target: z.ZodEnum<{
28
+ system: "system";
29
+ device: "device";
30
+ }>;
31
+ access: z.ZodArray<z.ZodEnum<{
32
+ view: "view";
33
+ create: "create";
34
+ delete: "delete";
35
+ }>>;
36
+ }, z.core.$strip>, z.ZodObject<{
37
+ type: z.ZodLiteral<"capability">;
38
+ target: z.ZodString;
39
+ access: z.ZodArray<z.ZodEnum<{
40
+ view: "view";
41
+ create: "create";
42
+ delete: "delete";
43
+ }>>;
44
+ }, z.core.$strip>, z.ZodObject<{
45
+ type: z.ZodLiteral<"addon">;
46
+ target: z.ZodString;
47
+ access: z.ZodArray<z.ZodEnum<{
48
+ view: "view";
49
+ create: "create";
50
+ delete: "delete";
51
+ }>>;
52
+ }, z.core.$strip>, z.ZodObject<{
53
+ type: z.ZodLiteral<"device">;
54
+ targets: z.ZodArray<z.ZodString>;
55
+ access: z.ZodArray<z.ZodEnum<{
56
+ view: "view";
57
+ create: "create";
58
+ delete: "delete";
59
+ }>>;
60
+ }, z.core.$strip>], "type">>>;
61
+ redirectUri: z.ZodOptional<z.ZodString>;
62
+ integrationId: z.ZodOptional<z.ZodString>;
63
+ jti: z.ZodOptional<z.ZodString>;
64
+ sessionId: z.ZodOptional<z.ZodString>;
25
65
  }, z.core.$strip>;
26
66
  export declare const ssoBridgeCapability: {
27
67
  readonly name: "sso-bridge";
@@ -38,6 +78,46 @@ export declare const ssoBridgeCapability: {
38
78
  email: z.ZodOptional<z.ZodString>;
39
79
  displayName: z.ZodOptional<z.ZodString>;
40
80
  hubUrl: z.ZodOptional<z.ZodString>;
81
+ scopes: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
82
+ type: z.ZodLiteral<"category">;
83
+ target: z.ZodEnum<{
84
+ system: "system";
85
+ device: "device";
86
+ }>;
87
+ access: z.ZodArray<z.ZodEnum<{
88
+ view: "view";
89
+ create: "create";
90
+ delete: "delete";
91
+ }>>;
92
+ }, z.core.$strip>, z.ZodObject<{
93
+ type: z.ZodLiteral<"capability">;
94
+ target: z.ZodString;
95
+ access: z.ZodArray<z.ZodEnum<{
96
+ view: "view";
97
+ create: "create";
98
+ delete: "delete";
99
+ }>>;
100
+ }, z.core.$strip>, z.ZodObject<{
101
+ type: z.ZodLiteral<"addon">;
102
+ target: z.ZodString;
103
+ access: z.ZodArray<z.ZodEnum<{
104
+ view: "view";
105
+ create: "create";
106
+ delete: "delete";
107
+ }>>;
108
+ }, z.core.$strip>, z.ZodObject<{
109
+ type: z.ZodLiteral<"device">;
110
+ targets: z.ZodArray<z.ZodString>;
111
+ access: z.ZodArray<z.ZodEnum<{
112
+ view: "view";
113
+ create: "create";
114
+ delete: "delete";
115
+ }>>;
116
+ }, z.core.$strip>], "type">>>;
117
+ redirectUri: z.ZodOptional<z.ZodString>;
118
+ integrationId: z.ZodOptional<z.ZodString>;
119
+ jti: z.ZodOptional<z.ZodString>;
120
+ sessionId: z.ZodOptional<z.ZodString>;
41
121
  }, z.core.$strip>;
42
122
  ttlSec: z.ZodOptional<z.ZodNumber>;
43
123
  }, z.core.$strip>, z.ZodObject<{
@@ -53,6 +133,46 @@ export declare const ssoBridgeCapability: {
53
133
  email: z.ZodOptional<z.ZodString>;
54
134
  displayName: z.ZodOptional<z.ZodString>;
55
135
  hubUrl: z.ZodOptional<z.ZodString>;
136
+ scopes: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
137
+ type: z.ZodLiteral<"category">;
138
+ target: z.ZodEnum<{
139
+ system: "system";
140
+ device: "device";
141
+ }>;
142
+ access: z.ZodArray<z.ZodEnum<{
143
+ view: "view";
144
+ create: "create";
145
+ delete: "delete";
146
+ }>>;
147
+ }, z.core.$strip>, z.ZodObject<{
148
+ type: z.ZodLiteral<"capability">;
149
+ target: z.ZodString;
150
+ access: z.ZodArray<z.ZodEnum<{
151
+ view: "view";
152
+ create: "create";
153
+ delete: "delete";
154
+ }>>;
155
+ }, z.core.$strip>, z.ZodObject<{
156
+ type: z.ZodLiteral<"addon">;
157
+ target: z.ZodString;
158
+ access: z.ZodArray<z.ZodEnum<{
159
+ view: "view";
160
+ create: "create";
161
+ delete: "delete";
162
+ }>>;
163
+ }, z.core.$strip>, z.ZodObject<{
164
+ type: z.ZodLiteral<"device">;
165
+ targets: z.ZodArray<z.ZodString>;
166
+ access: z.ZodArray<z.ZodEnum<{
167
+ view: "view";
168
+ create: "create";
169
+ delete: "delete";
170
+ }>>;
171
+ }, z.core.$strip>], "type">>>;
172
+ redirectUri: z.ZodOptional<z.ZodString>;
173
+ integrationId: z.ZodOptional<z.ZodString>;
174
+ jti: z.ZodOptional<z.ZodString>;
175
+ sessionId: z.ZodOptional<z.ZodString>;
56
176
  }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
57
177
  };
58
178
  };
@@ -1 +1 @@
1
- {"version":3,"file":"sso-bridge.cap.d.ts","sourceRoot":"","sources":["../../src/capabilities/sso-bridge.cap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAqC,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAElG;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,qBAAqB;;;;;;;;iBAgBzB,CAAA;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkBS,CAAA;AAEzC,MAAM,MAAM,kBAAkB,GAAG,aAAa,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAC1E,OAAO,EAAE,qBAAqB,EAAE,CAAA"}
1
+ {"version":3,"file":"sso-bridge.cap.d.ts","sourceRoot":"","sources":["../../src/capabilities/sso-bridge.cap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAqC,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAGlG;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2BzB,CAAA;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkBS,CAAA;AAEzC,MAAM,MAAM,kBAAkB,GAAG,aAAa,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAC1E,OAAO,EAAE,qBAAqB,EAAE,CAAA"}
@@ -1,6 +1,5 @@
1
1
  import { z } from 'zod';
2
2
  import { type InferProvider } from './capability-definition.js';
3
- import type { IStreamBroker } from '../interfaces/stream-broker.js';
4
3
  declare const RtspRestreamEntrySchema: z.ZodObject<{
5
4
  brokerId: z.ZodString;
6
5
  url: z.ZodString;
@@ -205,9 +204,9 @@ export declare const streamBrokerCapability: {
205
204
  status: z.ZodEnum<{
206
205
  error: "error";
207
206
  streaming: "streaming";
207
+ unassigned: "unassigned";
208
208
  idle: "idle";
209
209
  connecting: "connecting";
210
- unassigned: "unassigned";
211
210
  }>;
212
211
  resolution: z.ZodOptional<z.ZodObject<{
213
212
  width: z.ZodNumber;
@@ -352,9 +351,103 @@ export declare const streamBrokerCapability: {
352
351
  released: z.ZodBoolean;
353
352
  refcount: z.ZodNumber;
354
353
  }, z.core.$strip>, "mutation">;
355
- readonly getBroker: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
354
+ /**
355
+ * ── Decoded audio-chunk plane (Phase 5 / D9) ──────────────────────
356
+ *
357
+ * The serialisable replacement for the live-object `IStreamBroker.
358
+ * onDecodedAudioChunk` callback path. Unlike the video frame plane,
359
+ * audio chunks are tiny (a ~500ms PCM window is a few KB) so they ship
360
+ * their bytes INLINE over tRPC — no shared-memory ring. A consumer:
361
+ *
362
+ * 1. `subscribeAudioChunks({ brokerId, tag })` — the broker registers
363
+ * a per-subscription bounded FIFO queue and returns a
364
+ * `subscriptionId`.
365
+ * 2. polls `pullAudioChunks({ subscriptionId, maxCount })` — drains
366
+ * `DecodedAudioChunk[]` in arrival order (FIFO, no latest-wins
367
+ * drop: an audio gap is audible / breaks an analysis window). The
368
+ * queue is generously sized; it only drops its oldest chunk if a
369
+ * truly stalled consumer lets it overflow.
370
+ * 3. `unsubscribeAudioChunks({ subscriptionId })` on teardown.
371
+ */
372
+ readonly subscribeAudioChunks: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
356
373
  brokerId: z.ZodString;
357
- }, z.core.$strip>, z.ZodCustom<IStreamBroker | null, IStreamBroker | null>, import("./capability-definition.js").CapabilityMethodKind>;
374
+ tag: z.ZodOptional<z.ZodString>;
375
+ }, z.core.$strip>, z.ZodObject<{
376
+ subscriptionId: z.ZodString;
377
+ }, z.core.$strip>, "mutation">;
378
+ readonly pullAudioChunks: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
379
+ subscriptionId: z.ZodString;
380
+ maxCount: z.ZodDefault<z.ZodNumber>;
381
+ }, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
382
+ data: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
383
+ sampleRate: z.ZodNumber;
384
+ channels: z.ZodNumber;
385
+ timestamp: z.ZodNumber;
386
+ }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
387
+ readonly unsubscribeAudioChunks: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
388
+ subscriptionId: z.ZodString;
389
+ }, z.core.$strip>, z.ZodObject<{
390
+ released: z.ZodBoolean;
391
+ }, z.core.$strip>, "mutation">;
392
+ /**
393
+ * ── Shared-memory frame plane (Phase 5 / D9) ──────────────────────
394
+ *
395
+ * The handle-based replacement for the live-object `IStreamBroker.
396
+ * onDecodedFrame` callback path. A consumer:
397
+ *
398
+ * 1. `subscribeFrames({ brokerId, format })` — the broker spins up
399
+ * (or reuses) a `frameSink: 'shm'` decoder session producing that
400
+ * `format` and returns a `subscriptionId`.
401
+ * 2. polls `pullFrameHandles({ subscriptionId, maxCount })` — drains
402
+ * zero-pixel `FrameHandle[]`; each handle is fed to a
403
+ * `FrameRingReader` that opens the named shm segment and reads the
404
+ * pixels back zero-copy.
405
+ * 3. `unsubscribeFrames({ subscriptionId })` on teardown.
406
+ *
407
+ * The broker keeps one shm ring per `(brokerId, format)` actually
408
+ * requested — no broker-side `sharp` conversion. fps throttling is
409
+ * implicit (latest-wins ring reads drop frames for a slow consumer).
410
+ */
411
+ readonly subscribeFrames: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
412
+ brokerId: z.ZodString;
413
+ format: z.ZodEnum<{
414
+ rgb: "rgb";
415
+ bgr: "bgr";
416
+ yuv420: "yuv420";
417
+ gray: "gray";
418
+ }>;
419
+ maxFps: z.ZodOptional<z.ZodNumber>;
420
+ tag: z.ZodOptional<z.ZodString>;
421
+ }, z.core.$strip>, z.ZodObject<{
422
+ subscriptionId: z.ZodString;
423
+ maxFps: z.ZodNumber;
424
+ }, z.core.$strip>, "mutation">;
425
+ readonly pullFrameHandles: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
426
+ subscriptionId: z.ZodString;
427
+ maxCount: z.ZodDefault<z.ZodNumber>;
428
+ }, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
429
+ shmId: z.ZodString;
430
+ slot: z.ZodNumber;
431
+ seq: z.ZodNumber;
432
+ width: z.ZodNumber;
433
+ height: z.ZodNumber;
434
+ format: z.ZodEnum<{
435
+ jpeg: "jpeg";
436
+ rgb: "rgb";
437
+ bgr: "bgr";
438
+ yuv420: "yuv420";
439
+ gray: "gray";
440
+ }>;
441
+ pts: z.ZodNumber;
442
+ byteLength: z.ZodNumber;
443
+ nodeId: z.ZodString;
444
+ slotCount: z.ZodNumber;
445
+ }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
446
+ readonly unsubscribeFrames: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
447
+ subscriptionId: z.ZodString;
448
+ }, z.core.$strip>, z.ZodObject<{
449
+ released: z.ZodBoolean;
450
+ }, z.core.$strip>, "mutation">;
358
451
  readonly setPreBufferDuration: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
359
452
  brokerId: z.ZodString;
360
453
  seconds: z.ZodNumber;
@@ -1 +1 @@
1
- {"version":3,"file":"stream-broker.cap.d.ts","sourceRoot":"","sources":["../../src/capabilities/stream-broker.cap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAA4C,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAMzG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAEnE,QAAA,MAAM,uBAAuB;;;;;iBAK3B,CAAA;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;iBAQjC,CAAA;AAEF,eAAO,MAAM,yBAAyB;;;;;;iBAMpC,CAAA;AAEF,eAAO,MAAM,uBAAuB;;;;iBAIlC,CAAA;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;iBAM9B,CAAA;AAEF,MAA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* Pure schema-shaping helper: turns the camera-probed `StreamParamsOptions`
5
+ * (availability descriptor) + the current `StreamParamsStatus` (per-profile
6
+ * config) into a `ConfigUISchema` the admin-ui `ConfigFormBuilder` renders
7
+ * directly — one section per profile (main / sub / ext) with resolution,
8
+ * codec, framerate, bitrate, bitrate-mode, encoder-profile and GOP controls.
9
+ *
10
+ * This is the server-side home of the logic that the bespoke
11
+ * `StreamParamsSettings` cap-settings composite used to run client-side
12
+ * (`buildProfileSection`). Both the Reolink and Hikvision `stream-params`
13
+ * providers call `buildStreamParamsConfigSchema` from their
14
+ * `getConfigSchema` cap method so the two cameras emit a structurally
15
+ * identical form. No addon dependencies — only `@camstack/types` shapes —
16
+ * so it lives in `@camstack/types` and is shared without a cross-addon
17
+ * import.
18
+ *
19
+ * The form field keys follow the `stream<Profile>_<prop>` convention
20
+ * (`streamMain_resolution`, `streamSub_codec`, …) so a flat form patch can
21
+ * be re-split per profile on save by `parseStreamParamsFormPatch`.
22
+ */
23
+ import type { ConfigUISchema } from '../interfaces/config-ui.js';
24
+ import type { StreamParamsOptions, StreamParamsStatus, StreamProfile, StreamProfilePatch } from './stream-params.cap.js';
25
+ /** Layout metadata for one of the camera's stream profiles. */
26
+ export interface StreamProfileMeta {
27
+ readonly profile: StreamProfile;
28
+ /** Form-field key prefix (`streamMain`, `streamSub`, `streamExt`). */
29
+ readonly prefix: string;
30
+ /** Human-facing section title. */
31
+ readonly label: string;
32
+ }
33
+ /**
34
+ * The three well-known stream profiles in render order. Exported so the
35
+ * providers and the save-path parser share one definition.
36
+ */
37
+ export declare const STREAM_PROFILE_META: readonly StreamProfileMeta[];
38
+ /**
39
+ * Build the full `stream-params` `ConfigUISchema` from the camera-probed
40
+ * options + current per-profile config. Returns `null` when no profile
41
+ * exposes a configurable property — the cap then reports "no schema" and
42
+ * the renderer shows the unsupported-camera message.
43
+ *
44
+ * `default` on each field is seeded from the current config so the
45
+ * `ConfigFormBuilder` (which reads `value ?? default`) renders the live
46
+ * camera state without a separate `values` map.
47
+ */
48
+ export declare function buildStreamParamsConfigSchema(options: StreamParamsOptions, status: StreamParamsStatus | null): ConfigUISchema | null;
49
+ /**
50
+ * Re-split a flat `ConfigFormBuilder` patch into a `StreamProfilePatch`
51
+ * for one profile. Returns `null` when no field for the profile changed.
52
+ * Select fields arrive as strings — coerced here. Mirrors the save path
53
+ * the bespoke `StreamParamsSettings` composite used.
54
+ */
55
+ export declare function parseStreamParamsFormPatch(patch: Record<string, unknown>, prefix: string): StreamProfilePatch | null;
56
+ //# sourceMappingURL=stream-params-config-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stream-params-config-schema.d.ts","sourceRoot":"","sources":["../../src/capabilities/stream-params-config-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EAA8B,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC5F,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAExH,+DAA+D;AAC/D,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAA;IAC/B,sEAAsE;IACtE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,kCAAkC;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,iBAAiB,EAIlD,CAAA;AAoKV;;;;;;;;;GASG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,mBAAmB,EAC5B,MAAM,EAAE,kBAAkB,GAAG,IAAI,GAChC,cAAc,GAAG,IAAI,CAUvB;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,MAAM,EAAE,MAAM,GACb,kBAAkB,GAAG,IAAI,CA6C3B"}