@camstack/types 0.1.34 → 0.1.36
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/capabilities/addon-widgets-source.cap.d.ts +73 -5
- package/dist/capabilities/addon-widgets-source.cap.d.ts.map +1 -1
- package/dist/capabilities/addon-widgets.cap.d.ts +22 -4
- package/dist/capabilities/addon-widgets.cap.d.ts.map +1 -1
- package/dist/capabilities/addons.cap.d.ts +21 -0
- package/dist/capabilities/addons.cap.d.ts.map +1 -1
- package/dist/capabilities/audio-analysis.cap.d.ts +7 -4
- package/dist/capabilities/audio-analysis.cap.d.ts.map +1 -1
- package/dist/capabilities/camera-streams.cap.d.ts +7 -5
- package/dist/capabilities/camera-streams.cap.d.ts.map +1 -1
- package/dist/capabilities/capability-definition.d.ts +114 -0
- package/dist/capabilities/capability-definition.d.ts.map +1 -1
- package/dist/capabilities/decoder.cap.d.ts +90 -0
- package/dist/capabilities/decoder.cap.d.ts.map +1 -1
- package/dist/capabilities/detection-pipeline.cap.d.ts +6 -4
- package/dist/capabilities/detection-pipeline.cap.d.ts.map +1 -1
- package/dist/capabilities/device-manager.cap.d.ts +3 -3
- package/dist/capabilities/device-ops.cap.d.ts +1 -1
- package/dist/capabilities/index.d.ts +20 -20
- package/dist/capabilities/index.d.ts.map +1 -1
- package/dist/capabilities/local-network.cap.d.ts +5 -5
- package/dist/capabilities/mesh-network.cap.d.ts +4 -2
- package/dist/capabilities/mesh-network.cap.d.ts.map +1 -1
- package/dist/capabilities/motion-detection.cap.d.ts +2 -0
- package/dist/capabilities/motion-detection.cap.d.ts.map +1 -1
- package/dist/capabilities/motion-zones.cap.d.ts +83 -0
- package/dist/capabilities/motion-zones.cap.d.ts.map +1 -0
- package/dist/capabilities/network-access.cap.d.ts +5 -4
- package/dist/capabilities/network-access.cap.d.ts.map +1 -1
- package/dist/capabilities/nodes.cap.d.ts +9 -0
- package/dist/capabilities/nodes.cap.d.ts.map +1 -1
- package/dist/capabilities/oauth-integration.cap.d.ts +103 -0
- package/dist/capabilities/oauth-integration.cap.d.ts.map +1 -0
- package/dist/capabilities/pipeline-analytics.cap.d.ts +2 -0
- package/dist/capabilities/pipeline-analytics.cap.d.ts.map +1 -1
- package/dist/capabilities/ptz-autotrack.cap.d.ts +10 -0
- package/dist/capabilities/ptz-autotrack.cap.d.ts.map +1 -1
- package/dist/capabilities/ptz.cap.d.ts +57 -1
- package/dist/capabilities/ptz.cap.d.ts.map +1 -1
- package/dist/capabilities/schemas/streaming-shared.d.ts +110 -3
- package/dist/capabilities/schemas/streaming-shared.d.ts.map +1 -1
- package/dist/capabilities/snapshot.cap.d.ts +2 -0
- package/dist/capabilities/snapshot.cap.d.ts.map +1 -1
- package/dist/capabilities/sso-bridge.cap.d.ts +120 -0
- package/dist/capabilities/sso-bridge.cap.d.ts.map +1 -1
- package/dist/capabilities/stream-broker.cap.d.ts +97 -4
- package/dist/capabilities/stream-broker.cap.d.ts.map +1 -1
- package/dist/capabilities/stream-params-config-schema.d.ts +56 -0
- package/dist/capabilities/stream-params-config-schema.d.ts.map +1 -0
- package/dist/capabilities/stream-params.cap.d.ts +482 -0
- package/dist/capabilities/stream-params.cap.d.ts.map +1 -0
- package/dist/capabilities/user-management.cap.d.ts +198 -1
- package/dist/capabilities/user-management.cap.d.ts.map +1 -1
- package/dist/capabilities/webrtc-session.cap.d.ts +2 -0
- package/dist/capabilities/webrtc-session.cap.d.ts.map +1 -1
- package/dist/generated/addon-api.d.ts +1396 -544
- package/dist/generated/addon-api.d.ts.map +1 -1
- package/dist/generated/cap-status-types.d.ts +7 -3
- package/dist/generated/cap-status-types.d.ts.map +1 -1
- package/dist/generated/capability-router-map.d.ts +13 -16
- package/dist/generated/capability-router-map.d.ts.map +1 -1
- package/dist/generated/device-local-state.d.ts +6 -0
- package/dist/generated/device-local-state.d.ts.map +1 -1
- package/dist/generated/device-proxy.d.ts +6 -0
- package/dist/generated/device-proxy.d.ts.map +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts.map +1 -1
- package/dist/generated/system-proxy.d.ts +7 -13
- package/dist/generated/system-proxy.d.ts.map +1 -1
- package/dist/{index-DS7418lf.js → index-BblD92Si.js} +630 -349
- package/dist/index-BblD92Si.js.map +1 -0
- package/dist/{index-Ce7RZWP4.mjs → index-CgPd35k5.mjs} +957 -676
- package/dist/index-CgPd35k5.mjs.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +325 -75
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +597 -347
- package/dist/index.mjs.map +1 -1
- package/dist/interfaces/addon.d.ts +123 -29
- package/dist/interfaces/addon.d.ts.map +1 -1
- package/dist/interfaces/capability.d.ts +7 -29
- package/dist/interfaces/capability.d.ts.map +1 -1
- package/dist/interfaces/config-ui.d.ts +4 -101
- package/dist/interfaces/config-ui.d.ts.map +1 -1
- package/dist/interfaces/decoder.d.ts +12 -0
- package/dist/interfaces/decoder.d.ts.map +1 -1
- package/dist/interfaces/device-provider.d.ts +0 -4
- package/dist/interfaces/device-provider.d.ts.map +1 -1
- package/dist/interfaces/event-bus.d.ts +15 -0
- package/dist/interfaces/event-bus.d.ts.map +1 -1
- package/dist/interfaces/frame-handle.d.ts +40 -0
- package/dist/interfaces/frame-handle.d.ts.map +1 -0
- package/dist/interfaces/kernel-abstractions.d.ts +6 -0
- package/dist/interfaces/kernel-abstractions.d.ts.map +1 -1
- package/dist/interfaces/server-network.d.ts +8 -33
- package/dist/interfaces/server-network.d.ts.map +1 -1
- package/dist/interfaces/stream-broker.d.ts +40 -21
- package/dist/interfaces/stream-broker.d.ts.map +1 -1
- package/dist/node.js +1 -1
- package/dist/node.mjs +1 -1
- package/package.json +1 -1
- package/dist/capabilities/authentication.cap.d.ts +0 -73
- package/dist/capabilities/authentication.cap.d.ts.map +0 -1
- package/dist/capabilities/mesh-orchestrator.cap.d.ts +0 -151
- package/dist/capabilities/mesh-orchestrator.cap.d.ts.map +0 -1
- package/dist/capabilities/remote-access.cap.d.ts +0 -91
- package/dist/capabilities/remote-access.cap.d.ts.map +0 -1
- package/dist/capabilities/turn-orchestrator.cap.d.ts +0 -64
- package/dist/capabilities/turn-orchestrator.cap.d.ts.map +0 -1
- package/dist/index-Ce7RZWP4.mjs.map +0 -1
- package/dist/index-DS7418lf.js.map +0 -1
|
@@ -12,6 +12,7 @@ const WELL_KNOWN_TABS = [
|
|
|
12
12
|
{ id: "osd", label: "OSD", icon: "type", order: 18 },
|
|
13
13
|
{ id: "stream-broker", label: "Stream Broker", icon: "radio", order: 20 },
|
|
14
14
|
{ id: "streaming", label: "Streaming", icon: "video", order: 35 },
|
|
15
|
+
{ id: "ptz", label: "PTZ", icon: "move", order: 40 },
|
|
15
16
|
{ id: "pipeline", label: "Detection Pipeline", icon: "cpu", order: 39 },
|
|
16
17
|
{ id: "zones", label: "Detection", icon: "shapes", order: 38 },
|
|
17
18
|
{ id: "live-stats", label: "Live Stats", icon: "activity", order: 39 },
|
|
@@ -79,6 +80,9 @@ function hydrateField(field, values) {
|
|
|
79
80
|
return { ...field, value: items };
|
|
80
81
|
}
|
|
81
82
|
const rawValue = storedValue !== void 0 ? storedValue : defaultValue !== void 0 ? defaultValue : null;
|
|
83
|
+
if (field.type === "password") {
|
|
84
|
+
return { ...field, value: "" };
|
|
85
|
+
}
|
|
82
86
|
const value = field.type === "textarea" && field.isJson && rawValue !== null && typeof rawValue === "object" ? JSON.stringify(rawValue, null, 2) : rawValue;
|
|
83
87
|
const hydrated = { ...field, value };
|
|
84
88
|
return hydrated;
|
|
@@ -181,7 +185,19 @@ const DecoderSessionConfigSchema = z.object({
|
|
|
181
185
|
* on every line so `grep tag=broker:5/high` filters one camera
|
|
182
186
|
* profile cleanly.
|
|
183
187
|
*/
|
|
184
|
-
tag: z.string().optional()
|
|
188
|
+
tag: z.string().optional(),
|
|
189
|
+
/**
|
|
190
|
+
* Where the session delivers decoded frames (Phase 5 / D9):
|
|
191
|
+
*
|
|
192
|
+
* - `'callback'` (default) — the legacy pixel path: decoded frames are
|
|
193
|
+
* buffered as `DecodedFrame`s and drained via `pullFrames`.
|
|
194
|
+
* - `'shm'` — the shared-memory frame plane: decoded frames are written
|
|
195
|
+
* into an OS shared-memory ring and drained as zero-pixel
|
|
196
|
+
* `FrameHandle`s via `pullHandles`. A session is one mode or the
|
|
197
|
+
* other — `pullFrames` returns nothing for an `'shm'` session and
|
|
198
|
+
* `pullHandles` returns nothing for a `'callback'` session.
|
|
199
|
+
*/
|
|
200
|
+
frameSink: z.enum(["callback", "shm"]).default("callback")
|
|
185
201
|
});
|
|
186
202
|
function errMsg(err) {
|
|
187
203
|
if (err instanceof Error) return err.message;
|
|
@@ -767,6 +783,9 @@ function method(input, output, options) {
|
|
|
767
783
|
function event(data) {
|
|
768
784
|
return { data };
|
|
769
785
|
}
|
|
786
|
+
function isDeviceConfigCap(def) {
|
|
787
|
+
return def?.deviceConfig !== void 0;
|
|
788
|
+
}
|
|
770
789
|
const AudioClassSummarySchema = z.object({
|
|
771
790
|
className: z.string(),
|
|
772
791
|
/** Number of windows (chunks) where this class was the top hit. */
|
|
@@ -1069,6 +1088,53 @@ const DecodedFrameSchema = z.object({
|
|
|
1069
1088
|
format: z.enum(["jpeg", "rgb", "bgr", "yuv420", "gray"]),
|
|
1070
1089
|
timestamp: z.number()
|
|
1071
1090
|
});
|
|
1091
|
+
const FrameHandleSchema = z.object({
|
|
1092
|
+
shmId: z.string(),
|
|
1093
|
+
slot: z.number().int().nonnegative(),
|
|
1094
|
+
seq: z.number().int().nonnegative(),
|
|
1095
|
+
width: z.number().int().positive(),
|
|
1096
|
+
height: z.number().int().positive(),
|
|
1097
|
+
format: z.enum(["jpeg", "rgb", "bgr", "yuv420", "gray"]),
|
|
1098
|
+
pts: z.number(),
|
|
1099
|
+
byteLength: z.number().int().nonnegative(),
|
|
1100
|
+
nodeId: z.string(),
|
|
1101
|
+
slotCount: z.number().int().positive()
|
|
1102
|
+
});
|
|
1103
|
+
const FrameHandleFormatSchema = z.enum(["rgb", "bgr", "yuv420", "gray"]);
|
|
1104
|
+
const SubscribeFramesInputSchema = z.object({
|
|
1105
|
+
brokerId: z.string(),
|
|
1106
|
+
format: FrameHandleFormatSchema,
|
|
1107
|
+
/**
|
|
1108
|
+
* Optional reader-side cadence hint in frames per second. The broker does
|
|
1109
|
+
* NOT throttle — latest-wins ring reads drop frames implicitly for a slow
|
|
1110
|
+
* consumer. The value is echoed back in `SubscribeFramesResult.maxFps` so
|
|
1111
|
+
* the consumer can pace its own `pullFrameHandles` polling.
|
|
1112
|
+
*/
|
|
1113
|
+
maxFps: z.number().positive().optional(),
|
|
1114
|
+
/** Short caller-identity tag (`motion`, `detection`, …) for diagnostics. */
|
|
1115
|
+
tag: z.string().optional()
|
|
1116
|
+
});
|
|
1117
|
+
const SubscribeFramesResultSchema = z.object({
|
|
1118
|
+
/** Opaque id the consumer passes to `pullFrameHandles` / `unsubscribeFrames`. */
|
|
1119
|
+
subscriptionId: z.string(),
|
|
1120
|
+
/** Reader-side cadence hint (frames/s) — echoes `SubscribeFramesInput.maxFps`. */
|
|
1121
|
+
maxFps: z.number().nonnegative()
|
|
1122
|
+
});
|
|
1123
|
+
const DecodedAudioChunkSchema = z.object({
|
|
1124
|
+
data: z.instanceof(Uint8Array),
|
|
1125
|
+
sampleRate: z.number().int().positive(),
|
|
1126
|
+
channels: z.number().int().positive(),
|
|
1127
|
+
timestamp: z.number()
|
|
1128
|
+
});
|
|
1129
|
+
const SubscribeAudioChunksInputSchema = z.object({
|
|
1130
|
+
brokerId: z.string(),
|
|
1131
|
+
/** Short caller-identity tag (`audio-analyzer`, …) for `listClients`. */
|
|
1132
|
+
tag: z.string().optional()
|
|
1133
|
+
});
|
|
1134
|
+
const SubscribeAudioChunksResultSchema = z.object({
|
|
1135
|
+
/** Opaque id passed to `pullAudioChunks` / `unsubscribeAudioChunks`. */
|
|
1136
|
+
subscriptionId: z.string()
|
|
1137
|
+
});
|
|
1072
1138
|
const BrokerStatusSchema$1 = z.enum(["idle", "connecting", "streaming", "error", "stopped"]);
|
|
1073
1139
|
const BrokerStatsSchema = z.object({
|
|
1074
1140
|
status: BrokerStatusSchema$1,
|
|
@@ -1298,9 +1364,76 @@ const streamBrokerCapability = {
|
|
|
1298
1364
|
z.object({ released: z.boolean(), refcount: z.number().int().nonnegative() }),
|
|
1299
1365
|
{ kind: "mutation", auth: "admin" }
|
|
1300
1366
|
),
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1367
|
+
/**
|
|
1368
|
+
* ── Decoded audio-chunk plane (Phase 5 / D9) ──────────────────────
|
|
1369
|
+
*
|
|
1370
|
+
* The serialisable replacement for the live-object `IStreamBroker.
|
|
1371
|
+
* onDecodedAudioChunk` callback path. Unlike the video frame plane,
|
|
1372
|
+
* audio chunks are tiny (a ~500ms PCM window is a few KB) so they ship
|
|
1373
|
+
* their bytes INLINE over tRPC — no shared-memory ring. A consumer:
|
|
1374
|
+
*
|
|
1375
|
+
* 1. `subscribeAudioChunks({ brokerId, tag })` — the broker registers
|
|
1376
|
+
* a per-subscription bounded FIFO queue and returns a
|
|
1377
|
+
* `subscriptionId`.
|
|
1378
|
+
* 2. polls `pullAudioChunks({ subscriptionId, maxCount })` — drains
|
|
1379
|
+
* `DecodedAudioChunk[]` in arrival order (FIFO, no latest-wins
|
|
1380
|
+
* drop: an audio gap is audible / breaks an analysis window). The
|
|
1381
|
+
* queue is generously sized; it only drops its oldest chunk if a
|
|
1382
|
+
* truly stalled consumer lets it overflow.
|
|
1383
|
+
* 3. `unsubscribeAudioChunks({ subscriptionId })` on teardown.
|
|
1384
|
+
*/
|
|
1385
|
+
subscribeAudioChunks: method(
|
|
1386
|
+
SubscribeAudioChunksInputSchema,
|
|
1387
|
+
SubscribeAudioChunksResultSchema,
|
|
1388
|
+
{ kind: "mutation" }
|
|
1389
|
+
),
|
|
1390
|
+
pullAudioChunks: method(
|
|
1391
|
+
z.object({
|
|
1392
|
+
subscriptionId: z.string(),
|
|
1393
|
+
maxCount: z.number().int().positive().default(8)
|
|
1394
|
+
}),
|
|
1395
|
+
z.array(DecodedAudioChunkSchema).readonly()
|
|
1396
|
+
),
|
|
1397
|
+
unsubscribeAudioChunks: method(
|
|
1398
|
+
z.object({ subscriptionId: z.string() }),
|
|
1399
|
+
z.object({ released: z.boolean() }),
|
|
1400
|
+
{ kind: "mutation" }
|
|
1401
|
+
),
|
|
1402
|
+
/**
|
|
1403
|
+
* ── Shared-memory frame plane (Phase 5 / D9) ──────────────────────
|
|
1404
|
+
*
|
|
1405
|
+
* The handle-based replacement for the live-object `IStreamBroker.
|
|
1406
|
+
* onDecodedFrame` callback path. A consumer:
|
|
1407
|
+
*
|
|
1408
|
+
* 1. `subscribeFrames({ brokerId, format })` — the broker spins up
|
|
1409
|
+
* (or reuses) a `frameSink: 'shm'` decoder session producing that
|
|
1410
|
+
* `format` and returns a `subscriptionId`.
|
|
1411
|
+
* 2. polls `pullFrameHandles({ subscriptionId, maxCount })` — drains
|
|
1412
|
+
* zero-pixel `FrameHandle[]`; each handle is fed to a
|
|
1413
|
+
* `FrameRingReader` that opens the named shm segment and reads the
|
|
1414
|
+
* pixels back zero-copy.
|
|
1415
|
+
* 3. `unsubscribeFrames({ subscriptionId })` on teardown.
|
|
1416
|
+
*
|
|
1417
|
+
* The broker keeps one shm ring per `(brokerId, format)` actually
|
|
1418
|
+
* requested — no broker-side `sharp` conversion. fps throttling is
|
|
1419
|
+
* implicit (latest-wins ring reads drop frames for a slow consumer).
|
|
1420
|
+
*/
|
|
1421
|
+
subscribeFrames: method(
|
|
1422
|
+
SubscribeFramesInputSchema,
|
|
1423
|
+
SubscribeFramesResultSchema,
|
|
1424
|
+
{ kind: "mutation" }
|
|
1425
|
+
),
|
|
1426
|
+
pullFrameHandles: method(
|
|
1427
|
+
z.object({
|
|
1428
|
+
subscriptionId: z.string(),
|
|
1429
|
+
maxCount: z.number().int().positive().default(4)
|
|
1430
|
+
}),
|
|
1431
|
+
z.array(FrameHandleSchema).readonly()
|
|
1432
|
+
),
|
|
1433
|
+
unsubscribeFrames: method(
|
|
1434
|
+
z.object({ subscriptionId: z.string() }),
|
|
1435
|
+
z.object({ released: z.boolean() }),
|
|
1436
|
+
{ kind: "mutation" }
|
|
1304
1437
|
),
|
|
1305
1438
|
setPreBufferDuration: method(
|
|
1306
1439
|
z.object({ brokerId: z.string(), seconds: z.number().min(0).max(30) }),
|
|
@@ -1356,6 +1489,8 @@ const cameraStreamsCapability = {
|
|
|
1356
1489
|
name: "camera-streams",
|
|
1357
1490
|
scope: "device",
|
|
1358
1491
|
mode: "singleton",
|
|
1492
|
+
kind: "wrapper",
|
|
1493
|
+
defaultActive: true,
|
|
1359
1494
|
deviceTypes: [DeviceType.Camera],
|
|
1360
1495
|
methods: {
|
|
1361
1496
|
getCameraStreams: method(
|
|
@@ -1651,6 +1786,8 @@ const motionDetectionCapability = {
|
|
|
1651
1786
|
name: "motion-detection",
|
|
1652
1787
|
scope: "device",
|
|
1653
1788
|
mode: "singleton",
|
|
1789
|
+
kind: "wrapper",
|
|
1790
|
+
defaultActive: true,
|
|
1654
1791
|
exposesDeviceSettings: true,
|
|
1655
1792
|
methods: {
|
|
1656
1793
|
analyze: method(
|
|
@@ -2522,6 +2659,42 @@ const motionTriggerCapability = {
|
|
|
2522
2659
|
},
|
|
2523
2660
|
runtimeState: MotionTriggerRuntimeStateSchema
|
|
2524
2661
|
};
|
|
2662
|
+
const MotionZoneStatusSchema = z.object({
|
|
2663
|
+
enabled: z.boolean(),
|
|
2664
|
+
sensitivity: z.number(),
|
|
2665
|
+
/** Row-major active-cell grid. Length = gridWidth*gridHeight (see getOptions). */
|
|
2666
|
+
cells: z.array(z.boolean()),
|
|
2667
|
+
lastFetchedAt: z.number()
|
|
2668
|
+
});
|
|
2669
|
+
const MotionZoneOptionsSchema = z.object({
|
|
2670
|
+
gridWidth: z.number(),
|
|
2671
|
+
gridHeight: z.number(),
|
|
2672
|
+
sensitivity: z.object({ min: z.number(), max: z.number(), step: z.number() })
|
|
2673
|
+
});
|
|
2674
|
+
const MotionZonePatchSchema = z.object({
|
|
2675
|
+
enabled: z.boolean().optional(),
|
|
2676
|
+
sensitivity: z.number().optional(),
|
|
2677
|
+
cells: z.array(z.boolean()).optional()
|
|
2678
|
+
});
|
|
2679
|
+
const motionZonesCapability = {
|
|
2680
|
+
name: "motion-zones",
|
|
2681
|
+
scope: "device",
|
|
2682
|
+
mode: "singleton",
|
|
2683
|
+
deviceTypes: [DeviceType.Camera],
|
|
2684
|
+
deviceConfig: {
|
|
2685
|
+
ui: { kind: "widget", widgetId: "host/motion-zones-grid", tab: "motion", label: "Motion Zones" }
|
|
2686
|
+
},
|
|
2687
|
+
methods: {
|
|
2688
|
+
getOptions: method(z.object({ deviceId: z.number() }), MotionZoneOptionsSchema),
|
|
2689
|
+
setZone: method(
|
|
2690
|
+
z.object({ deviceId: z.number(), patch: MotionZonePatchSchema }),
|
|
2691
|
+
z.void(),
|
|
2692
|
+
{ kind: "mutation", auth: "admin" }
|
|
2693
|
+
)
|
|
2694
|
+
},
|
|
2695
|
+
status: { schema: MotionZoneStatusSchema, kind: "poll" },
|
|
2696
|
+
runtimeState: MotionZoneStatusSchema
|
|
2697
|
+
};
|
|
2525
2698
|
const AutotrackTargetTypeSchema = z.string().describe("Vendor target string (people/vehicle/pet); empty = camera default");
|
|
2526
2699
|
const PtzAutotrackSettingsSchema = z.object({
|
|
2527
2700
|
targetType: AutotrackTargetTypeSchema,
|
|
@@ -2560,6 +2733,9 @@ const ptzAutotrackCapability = {
|
|
|
2560
2733
|
scope: "device",
|
|
2561
2734
|
mode: "singleton",
|
|
2562
2735
|
deviceTypes: [DeviceType.Camera],
|
|
2736
|
+
deviceConfig: {
|
|
2737
|
+
ui: { kind: "widget", widgetId: "host/ptz-autotrack", tab: "ptz", topTab: true, label: "Auto-Tracking", order: 5 }
|
|
2738
|
+
},
|
|
2563
2739
|
methods: {
|
|
2564
2740
|
/**
|
|
2565
2741
|
* Read the current on/off state + last-applied settings.
|
|
@@ -2626,6 +2802,111 @@ const ptzAutotrackCapability = {
|
|
|
2626
2802
|
*/
|
|
2627
2803
|
runtimeState: PtzAutotrackRuntimeStateSchema
|
|
2628
2804
|
};
|
|
2805
|
+
const StreamProfileSchema = z.enum(["main", "sub", "ext"]);
|
|
2806
|
+
const StreamProfileConfigSchema = z.object({
|
|
2807
|
+
width: z.number(),
|
|
2808
|
+
height: z.number(),
|
|
2809
|
+
codec: z.enum(["h264", "h265"]),
|
|
2810
|
+
framerate: z.number(),
|
|
2811
|
+
bitrate: z.number(),
|
|
2812
|
+
// kbps
|
|
2813
|
+
bitrateMode: z.enum(["vbr", "cbr"]).optional(),
|
|
2814
|
+
encoderProfile: z.enum(["high", "main", "baseline"]).optional(),
|
|
2815
|
+
gop: z.number().optional(),
|
|
2816
|
+
audio: z.boolean().optional()
|
|
2817
|
+
});
|
|
2818
|
+
const StreamParamsStatusSchema = z.object({
|
|
2819
|
+
/** Per-profile current config. A profile absent = the camera doesn't have it. */
|
|
2820
|
+
main: StreamProfileConfigSchema.optional(),
|
|
2821
|
+
sub: StreamProfileConfigSchema.optional(),
|
|
2822
|
+
ext: StreamProfileConfigSchema.optional(),
|
|
2823
|
+
lastFetchedAt: z.number()
|
|
2824
|
+
});
|
|
2825
|
+
const StreamProfileOptionsSchema = z.object({
|
|
2826
|
+
resolutions: z.array(z.object({ width: z.number(), height: z.number() })),
|
|
2827
|
+
codecs: z.array(z.enum(["h264", "h265"])),
|
|
2828
|
+
framerates: z.array(z.number()),
|
|
2829
|
+
/** Allowed bitrate values (kbps). Empty if the camera takes a free range. */
|
|
2830
|
+
bitrates: z.array(z.number()),
|
|
2831
|
+
/** Optional [min,max] kbps when the camera accepts a continuous range. */
|
|
2832
|
+
bitrateRange: z.tuple([z.number(), z.number()]).optional(),
|
|
2833
|
+
supportsBitrateMode: z.boolean(),
|
|
2834
|
+
supportsEncoderProfile: z.boolean(),
|
|
2835
|
+
supportsGop: z.boolean(),
|
|
2836
|
+
/** Allowed GOP / keyframe-interval range, in seconds — drives the
|
|
2837
|
+
* I-frame-interval selector. Absent when the camera advertises GOP
|
|
2838
|
+
* support but no concrete range (callers then fall back to a free
|
|
2839
|
+
* numeric input). `{ min, max, step }` per the getOptions convention. */
|
|
2840
|
+
gop: z.object({ min: z.number(), max: z.number(), step: z.number() }).optional()
|
|
2841
|
+
});
|
|
2842
|
+
const StreamParamsOptionsSchema = z.object({
|
|
2843
|
+
main: StreamProfileOptionsSchema.optional(),
|
|
2844
|
+
sub: StreamProfileOptionsSchema.optional(),
|
|
2845
|
+
ext: StreamProfileOptionsSchema.optional()
|
|
2846
|
+
});
|
|
2847
|
+
const StreamProfilePatchSchema = z.object({
|
|
2848
|
+
width: z.number().optional(),
|
|
2849
|
+
height: z.number().optional(),
|
|
2850
|
+
codec: z.enum(["h264", "h265"]).optional(),
|
|
2851
|
+
framerate: z.number().optional(),
|
|
2852
|
+
bitrate: z.number().optional(),
|
|
2853
|
+
bitrateMode: z.enum(["vbr", "cbr"]).optional(),
|
|
2854
|
+
encoderProfile: z.enum(["high", "main", "baseline"]).optional(),
|
|
2855
|
+
gop: z.number().optional(),
|
|
2856
|
+
audio: z.boolean().optional()
|
|
2857
|
+
});
|
|
2858
|
+
const streamParamsCapability = {
|
|
2859
|
+
name: "stream-params",
|
|
2860
|
+
scope: "device",
|
|
2861
|
+
mode: "singleton",
|
|
2862
|
+
deviceTypes: [DeviceType.Camera],
|
|
2863
|
+
deviceConfig: {
|
|
2864
|
+
ui: { kind: "derived-form", builderId: "stream-params", tab: "streaming" }
|
|
2865
|
+
},
|
|
2866
|
+
methods: {
|
|
2867
|
+
getOptions: method(
|
|
2868
|
+
z.object({ deviceId: z.number() }),
|
|
2869
|
+
StreamParamsOptionsSchema
|
|
2870
|
+
),
|
|
2871
|
+
setProfile: method(
|
|
2872
|
+
z.object({
|
|
2873
|
+
deviceId: z.number(),
|
|
2874
|
+
profile: StreamProfileSchema,
|
|
2875
|
+
patch: StreamProfilePatchSchema
|
|
2876
|
+
}),
|
|
2877
|
+
z.void(),
|
|
2878
|
+
{ kind: "mutation", auth: "admin" }
|
|
2879
|
+
),
|
|
2880
|
+
/**
|
|
2881
|
+
* Build the `ConfigUISchema` (admin-ui `ConfigFormBuilder` input
|
|
2882
|
+
* shape) for this camera's stream-encoder settings — one section per
|
|
2883
|
+
* profile (main / sub / ext) with the resolution / codec / framerate
|
|
2884
|
+
* / bitrate / bitrate-mode / encoder-profile / GOP controls the
|
|
2885
|
+
* firmware actually exposes.
|
|
2886
|
+
*
|
|
2887
|
+
* Driven by `getOptions` (camera-probed availability) + `getStatus`
|
|
2888
|
+
* (current per-profile config); each field's `default` is seeded
|
|
2889
|
+
* from the live config so the form renders the camera state in one
|
|
2890
|
+
* pass. Returns `null` when the camera exposes no configurable
|
|
2891
|
+
* stream property — the renderer then shows the unsupported message.
|
|
2892
|
+
*
|
|
2893
|
+
* Output is `z.unknown().nullable()` — the same convention every
|
|
2894
|
+
* other `ConfigUISchema`-returning cap method uses (`device-ops`,
|
|
2895
|
+
* `device-manager`); `ConfigUISchema` is a TS-only type with no
|
|
2896
|
+
* companion Zod schema, and a concrete object would collapse
|
|
2897
|
+
* unrelated AppRouter branches to `unknown` during codegen.
|
|
2898
|
+
*/
|
|
2899
|
+
getConfigSchema: method(
|
|
2900
|
+
z.object({ deviceId: z.number() }),
|
|
2901
|
+
z.unknown().nullable()
|
|
2902
|
+
)
|
|
2903
|
+
},
|
|
2904
|
+
status: {
|
|
2905
|
+
schema: StreamParamsStatusSchema,
|
|
2906
|
+
kind: "poll"
|
|
2907
|
+
},
|
|
2908
|
+
runtimeState: StreamParamsStatusSchema
|
|
2909
|
+
};
|
|
2629
2910
|
const SwitchStatusSchema = z.object({
|
|
2630
2911
|
on: z.boolean(),
|
|
2631
2912
|
/** Ms epoch of the last state change. Useful for UI "X minutes ago". */
|
|
@@ -3630,6 +3911,83 @@ const adminUiCapability = {
|
|
|
3630
3911
|
getVersion: method(z.void(), VersionOutputSchema)
|
|
3631
3912
|
}
|
|
3632
3913
|
};
|
|
3914
|
+
const MethodAccessSchema = z.enum(["view", "create", "delete"]);
|
|
3915
|
+
const AllowedProviderSchema = z.union([z.literal("*"), z.array(z.string())]);
|
|
3916
|
+
const AllowedDevicesSchema = z.record(z.string(), z.union([z.literal("*"), z.array(z.string())]));
|
|
3917
|
+
const CapScopeSchema = z.enum(["device", "system"]);
|
|
3918
|
+
const TokenScopeSchema = z.discriminatedUnion("type", [
|
|
3919
|
+
z.object({
|
|
3920
|
+
type: z.literal("category"),
|
|
3921
|
+
target: CapScopeSchema,
|
|
3922
|
+
access: z.array(MethodAccessSchema).min(1)
|
|
3923
|
+
}),
|
|
3924
|
+
z.object({
|
|
3925
|
+
type: z.literal("capability"),
|
|
3926
|
+
target: z.string(),
|
|
3927
|
+
access: z.array(MethodAccessSchema).min(1)
|
|
3928
|
+
}),
|
|
3929
|
+
z.object({
|
|
3930
|
+
type: z.literal("addon"),
|
|
3931
|
+
target: z.string(),
|
|
3932
|
+
access: z.array(MethodAccessSchema).min(1)
|
|
3933
|
+
}),
|
|
3934
|
+
z.object({
|
|
3935
|
+
type: z.literal("device"),
|
|
3936
|
+
/**
|
|
3937
|
+
* One or more deviceIds (serialised as strings for wire-format
|
|
3938
|
+
* consistency with the rest of the union). Matcher accepts if
|
|
3939
|
+
* `input.deviceId` ∈ `targets`. Array shape avoids the row-explosion
|
|
3940
|
+
* of one scope-per-device when granting access to a set of cameras.
|
|
3941
|
+
*/
|
|
3942
|
+
targets: z.array(z.string()).min(1),
|
|
3943
|
+
access: z.array(MethodAccessSchema).min(1)
|
|
3944
|
+
})
|
|
3945
|
+
]);
|
|
3946
|
+
const UserRecordSchema = z.object({
|
|
3947
|
+
id: z.string(),
|
|
3948
|
+
username: z.string(),
|
|
3949
|
+
passwordHash: z.string(),
|
|
3950
|
+
/**
|
|
3951
|
+
* Admin bypass. When true, the middleware skips the scope-access
|
|
3952
|
+
* check entirely. There is no other axis of privilege; the legacy
|
|
3953
|
+
* role enum collapsed onto this boolean in v2.
|
|
3954
|
+
*/
|
|
3955
|
+
isAdmin: z.boolean().default(false),
|
|
3956
|
+
allowedProviders: AllowedProviderSchema,
|
|
3957
|
+
allowedDevices: AllowedDevicesSchema,
|
|
3958
|
+
/**
|
|
3959
|
+
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
3960
|
+
* ignored. Non-admins without scopes are locked out of every
|
|
3961
|
+
* protected call.
|
|
3962
|
+
*/
|
|
3963
|
+
scopes: z.array(TokenScopeSchema).default([]),
|
|
3964
|
+
createdAt: z.number(),
|
|
3965
|
+
updatedAt: z.number()
|
|
3966
|
+
});
|
|
3967
|
+
const ApiKeyRecordSchema = z.object({
|
|
3968
|
+
id: z.string(),
|
|
3969
|
+
label: z.string(),
|
|
3970
|
+
isAdmin: z.boolean().default(false),
|
|
3971
|
+
allowedProviders: AllowedProviderSchema,
|
|
3972
|
+
allowedDevices: AllowedDevicesSchema,
|
|
3973
|
+
tokenHash: z.string(),
|
|
3974
|
+
tokenPrefix: z.string(),
|
|
3975
|
+
createdAt: z.number(),
|
|
3976
|
+
lastUsedAt: z.number().optional()
|
|
3977
|
+
});
|
|
3978
|
+
const ScopedTokenSchema = z.object({
|
|
3979
|
+
id: z.string(),
|
|
3980
|
+
userId: z.string(),
|
|
3981
|
+
name: z.string(),
|
|
3982
|
+
tokenHash: z.string(),
|
|
3983
|
+
tokenPrefix: z.string(),
|
|
3984
|
+
scopes: z.array(TokenScopeSchema),
|
|
3985
|
+
// SQLite/JSON storage round-trips undefined → null. Use `nullish` so the
|
|
3986
|
+
// schema accepts both `null` (read from disk) and `undefined` (in-memory).
|
|
3987
|
+
expiresAt: z.number().nullish(),
|
|
3988
|
+
lastUsedAt: z.number().nullish(),
|
|
3989
|
+
createdAt: z.number()
|
|
3990
|
+
});
|
|
3633
3991
|
const SsoBridgeClaimsSchema = z.object({
|
|
3634
3992
|
userId: z.string(),
|
|
3635
3993
|
username: z.string(),
|
|
@@ -3645,7 +4003,18 @@ const SsoBridgeClaimsSchema = z.object({
|
|
|
3645
4003
|
* JWT WITHOUT verifying the signature — the hub re-verifies on every
|
|
3646
4004
|
* inbound call so trust still rests with the signing hub.
|
|
3647
4005
|
*/
|
|
3648
|
-
hubUrl: z.string().optional()
|
|
4006
|
+
hubUrl: z.string().optional(),
|
|
4007
|
+
/** Permission scopes baked into the token. Set by the OAuth
|
|
4008
|
+
* account-linking grant; absent on ordinary SSO-login tokens. */
|
|
4009
|
+
scopes: z.array(TokenScopeSchema).optional(),
|
|
4010
|
+
/** OAuth authorization-code binding — set only on `oauth-code` tokens. */
|
|
4011
|
+
redirectUri: z.string().optional(),
|
|
4012
|
+
integrationId: z.string().optional(),
|
|
4013
|
+
/** JWT ID — unique per issued code; consumed-set enforces single-use. */
|
|
4014
|
+
jti: z.string().optional(),
|
|
4015
|
+
/** OAuth session registry id — set on `oauth-access`/`oauth-refresh`
|
|
4016
|
+
* tokens so the verify path can check the session is not revoked. */
|
|
4017
|
+
sessionId: z.string().optional()
|
|
3649
4018
|
});
|
|
3650
4019
|
const ssoBridgeCapability = {
|
|
3651
4020
|
name: "sso-bridge",
|
|
@@ -3666,6 +4035,27 @@ const ssoBridgeCapability = {
|
|
|
3666
4035
|
)
|
|
3667
4036
|
}
|
|
3668
4037
|
};
|
|
4038
|
+
const OauthIntegrationDescriptorSchema = z.object({
|
|
4039
|
+
/** Stable id used as the `integration=` query param, e.g. 'export-alexa'. */
|
|
4040
|
+
integrationId: z.string(),
|
|
4041
|
+
/** Human label rendered on the consent page. */
|
|
4042
|
+
displayName: z.string(),
|
|
4043
|
+
/** Scopes baked into every token issued for this integration. */
|
|
4044
|
+
requestedScopes: z.array(TokenScopeSchema),
|
|
4045
|
+
/** Allowed redirect_uri prefixes. /api/oauth2/authorize rejects any
|
|
4046
|
+
* redirect_uri that does not start with one of these. Required —
|
|
4047
|
+
* an empty list means the integration can never complete linking. */
|
|
4048
|
+
allowedRedirectPrefixes: z.array(z.string()).min(1)
|
|
4049
|
+
});
|
|
4050
|
+
const oauthIntegrationCapability = {
|
|
4051
|
+
name: "oauth-integration",
|
|
4052
|
+
scope: "system",
|
|
4053
|
+
mode: "collection",
|
|
4054
|
+
internal: true,
|
|
4055
|
+
methods: {
|
|
4056
|
+
getDescriptor: method(z.void(), OauthIntegrationDescriptorSchema)
|
|
4057
|
+
}
|
|
4058
|
+
};
|
|
3669
4059
|
const PasskeySummarySchema = z.object({
|
|
3670
4060
|
credentialId: z.string(),
|
|
3671
4061
|
label: z.string(),
|
|
@@ -3981,21 +4371,30 @@ const addonPagesSourceCapability = {
|
|
|
3981
4371
|
};
|
|
3982
4372
|
const WidgetHostEnum = z.enum(["device-tab", "dashboard", "integration-detail"]);
|
|
3983
4373
|
const WidgetSizeEnum = z.enum(["xs", "sm", "md", "lg", "xl"]);
|
|
4374
|
+
const WidgetRemoteSchema = z.object({
|
|
4375
|
+
remoteName: z.string(),
|
|
4376
|
+
exposedModule: z.string(),
|
|
4377
|
+
componentKey: z.string().optional()
|
|
4378
|
+
});
|
|
3984
4379
|
const WidgetMetadataSchema = z.object({
|
|
3985
|
-
|
|
3986
|
-
|
|
4380
|
+
// ── UiContribution core (kind:'remote') ──────────────────────────
|
|
4381
|
+
/** Primary host tab — `'dashboard'`, `'device-tab'`, or a device-detail tab id. */
|
|
4382
|
+
tab: z.string(),
|
|
4383
|
+
/** Optional sub-tab within `tab`. */
|
|
4384
|
+
subTab: z.string().optional(),
|
|
3987
4385
|
/** Operator-facing label. */
|
|
3988
4386
|
label: z.string(),
|
|
4387
|
+
/** Ordering within `(tab, subTab)`, ascending. */
|
|
4388
|
+
order: z.number().optional(),
|
|
4389
|
+
/** Always `'remote'` — a widget is a Module Federation remote. */
|
|
4390
|
+
kind: z.literal("remote"),
|
|
4391
|
+
/** MF remote descriptor. */
|
|
4392
|
+
remote: WidgetRemoteSchema,
|
|
4393
|
+
// ── Widget-only metadata ─────────────────────────────────────────
|
|
4394
|
+
/** Stable id within the addon — kebab-case. Equals `remote.componentKey`. */
|
|
4395
|
+
stableId: z.string(),
|
|
3989
4396
|
description: z.string().optional(),
|
|
3990
4397
|
icon: z.string().optional(),
|
|
3991
|
-
/**
|
|
3992
|
-
* Module Federation remote name — must match the `name` field on the
|
|
3993
|
-
* widget addon's `federation()` plugin config. Used by the host's
|
|
3994
|
-
* `<WidgetRegistryProvider>` to call `loadRemote('<remoteName>/widgets')`.
|
|
3995
|
-
* Conventionally `addon_<addonid>_widgets` (snake_case; MF names
|
|
3996
|
-
* cannot contain hyphens).
|
|
3997
|
-
*/
|
|
3998
|
-
remoteName: z.string(),
|
|
3999
4398
|
/**
|
|
4000
4399
|
* Bundle filename inside the addon's `dist/` dir served at
|
|
4001
4400
|
* `/api/addon-widgets/<addonId>/<bundle>`. With Module Federation
|
|
@@ -4004,9 +4403,9 @@ const WidgetMetadataSchema = z.object({
|
|
|
4004
4403
|
* cache-buster URL without a separate filesystem stat.
|
|
4005
4404
|
*/
|
|
4006
4405
|
bundle: z.string(),
|
|
4007
|
-
/**
|
|
4406
|
+
/** Every host the widget supports. The picker filters on this set. */
|
|
4008
4407
|
hosts: z.array(WidgetHostEnum).readonly(),
|
|
4009
|
-
/** Required props the host must supply. Validated at
|
|
4408
|
+
/** Required props the host must supply. Validated at `<WidgetSlot>` mount. */
|
|
4010
4409
|
requires: z.object({
|
|
4011
4410
|
deviceContext: z.boolean().default(false),
|
|
4012
4411
|
integrationContext: z.boolean().default(false)
|
|
@@ -4106,6 +4505,16 @@ const DEFAULT_DECODER_HWACCEL_CONFIG = {
|
|
|
4106
4505
|
hwaccel: "auto",
|
|
4107
4506
|
probedBestHwaccel: ""
|
|
4108
4507
|
};
|
|
4508
|
+
const ShmRingStatsSchema = z.object({
|
|
4509
|
+
sessionId: z.string(),
|
|
4510
|
+
slotCount: z.number().int(),
|
|
4511
|
+
slotByteLength: z.number().int(),
|
|
4512
|
+
segmentBytes: z.number().int(),
|
|
4513
|
+
budgetMb: z.number().int(),
|
|
4514
|
+
framesWritten: z.number().int(),
|
|
4515
|
+
getFrameHits: z.number().int(),
|
|
4516
|
+
getFrameMisses: z.number().int()
|
|
4517
|
+
});
|
|
4109
4518
|
const decoderCapability = {
|
|
4110
4519
|
name: "decoder",
|
|
4111
4520
|
scope: "system",
|
|
@@ -4142,10 +4551,27 @@ const decoderCapability = {
|
|
|
4142
4551
|
url: z.string()
|
|
4143
4552
|
}), z.void()),
|
|
4144
4553
|
// ── Output — polling-based frame retrieval ────────────────────
|
|
4554
|
+
// `pullFrames` drains the pixel `DecodedFrame[]` of a `frameSink:
|
|
4555
|
+
// 'callback'` session. `pullHandles` (Phase 5 / D9) drains the
|
|
4556
|
+
// zero-pixel `FrameHandle[]` of a `frameSink: 'shm'` session — the
|
|
4557
|
+
// broker hands each handle to a `FrameRingReader` that opens the
|
|
4558
|
+
// named segment and reads the pixels back zero-copy. A session is
|
|
4559
|
+
// one mode or the other; the unmatched method returns an empty
|
|
4560
|
+
// array.
|
|
4145
4561
|
pullFrames: method(z.object({
|
|
4146
4562
|
sessionId: z.string(),
|
|
4147
4563
|
maxCount: z.number().default(1)
|
|
4148
4564
|
}), z.array(DecodedFrameSchema)),
|
|
4565
|
+
pullHandles: method(z.object({
|
|
4566
|
+
sessionId: z.string(),
|
|
4567
|
+
maxCount: z.number().default(1)
|
|
4568
|
+
}), z.array(FrameHandleSchema)),
|
|
4569
|
+
// ── Frame fetch (Phase 5 / D9 downstream access) ──────────────
|
|
4570
|
+
// Read the pixels a FrameHandle refers to from this node's shm ring.
|
|
4571
|
+
// Returns null when the slot was already recycled (latest-wins).
|
|
4572
|
+
getFrame: method(z.object({ handle: FrameHandleSchema }), DecodedFrameSchema.nullable()),
|
|
4573
|
+
// shm ring usage stats for a session.
|
|
4574
|
+
getShmStats: method(z.object({ sessionId: z.string() }), ShmRingStatsSchema.nullable()),
|
|
4149
4575
|
// ── Control ───────────────────────────────────────────────────
|
|
4150
4576
|
updateConfig: method(z.object({
|
|
4151
4577
|
sessionId: z.string(),
|
|
@@ -4298,6 +4724,8 @@ const webrtcSessionCapability = {
|
|
|
4298
4724
|
name: "webrtc-session",
|
|
4299
4725
|
scope: "device",
|
|
4300
4726
|
mode: "singleton",
|
|
4727
|
+
kind: "wrapper",
|
|
4728
|
+
defaultActive: true,
|
|
4301
4729
|
deviceTypes: [DeviceType.Camera],
|
|
4302
4730
|
methods: {
|
|
4303
4731
|
/**
|
|
@@ -4816,6 +5244,8 @@ const audioAnalysisCapability = {
|
|
|
4816
5244
|
name: "audio-analysis",
|
|
4817
5245
|
scope: "device",
|
|
4818
5246
|
mode: "singleton",
|
|
5247
|
+
kind: "wrapper",
|
|
5248
|
+
defaultActive: true,
|
|
4819
5249
|
deviceTypes: [DeviceType.Camera],
|
|
4820
5250
|
exposesDeviceSettings: true,
|
|
4821
5251
|
methods: {
|
|
@@ -5355,8 +5785,8 @@ const deviceManagerCapability = {
|
|
|
5355
5785
|
/**
|
|
5356
5786
|
* Return the addon ids that declared a wrapper provider for `capName`.
|
|
5357
5787
|
* Backs the device-bindings UI's wrapper-picker dropdown. Entries are
|
|
5358
|
-
* sourced from `CapabilityRegistry.wrapperProviders`, populated
|
|
5359
|
-
* `
|
|
5788
|
+
* sourced from `CapabilityRegistry.wrapperProviders`, populated when
|
|
5789
|
+
* the cap definition declares `kind: 'wrapper'`.
|
|
5360
5790
|
*/
|
|
5361
5791
|
listWrappersForCap: method(
|
|
5362
5792
|
z.object({ capName: z.string() }),
|
|
@@ -5669,54 +6099,6 @@ const authProviderCapability = {
|
|
|
5669
6099
|
validateToken: method(z.object({ token: z.string() }), AuthResultSchema.nullable())
|
|
5670
6100
|
}
|
|
5671
6101
|
};
|
|
5672
|
-
const AuthProviderInfoSchema = z.object({
|
|
5673
|
-
/** Stable id matching the addon id (used for `getLoginUrl({addonId,…})`). */
|
|
5674
|
-
addonId: z.string(),
|
|
5675
|
-
/**
|
|
5676
|
-
* Per-instance id when one addon registers multiple "logical"
|
|
5677
|
-
* providers (e.g. OIDC with Google + Microsoft + custom). The login
|
|
5678
|
-
* URL becomes `/addon/${addonId}/${instanceId}/start` — handler reads
|
|
5679
|
-
* `:instanceId` from the route. Empty/unset means the addon is a
|
|
5680
|
-
* single-instance provider; the URL is `/addon/${addonId}/start`.
|
|
5681
|
-
*/
|
|
5682
|
-
instanceId: z.string().optional(),
|
|
5683
|
-
/** Display label shown on the login button + admin row. */
|
|
5684
|
-
displayName: z.string(),
|
|
5685
|
-
/** Optional iconography hint (lucide-react icon name OR emoji). */
|
|
5686
|
-
icon: z.string().optional(),
|
|
5687
|
-
/** When true, the provider exposes a redirect-based login flow
|
|
5688
|
-
* (`getLoginUrl` returns a URL the browser navigates to). */
|
|
5689
|
-
hasRedirectFlow: z.boolean(),
|
|
5690
|
-
/** When true, the provider exposes a credential-form login flow
|
|
5691
|
-
* (`validateCredentials` accepts username + password). */
|
|
5692
|
-
hasCredentialFlow: z.boolean(),
|
|
5693
|
-
/** Provider kind, drives admin-UI hint dispatch (oidc / saml / totp / …). */
|
|
5694
|
-
kind: z.string().optional(),
|
|
5695
|
-
/** Operator-facing status string (e.g. "Connected to https://login.acme.com"). */
|
|
5696
|
-
status: z.string().optional(),
|
|
5697
|
-
/** When false, the provider is registered but disabled by config; the
|
|
5698
|
-
* UI surfaces it as inactive without enumerating it for login. */
|
|
5699
|
-
enabled: z.boolean()
|
|
5700
|
-
});
|
|
5701
|
-
const authenticationCapability = {
|
|
5702
|
-
name: "authentication",
|
|
5703
|
-
scope: "system",
|
|
5704
|
-
mode: "singleton",
|
|
5705
|
-
methods: {
|
|
5706
|
-
/** All registered auth providers, both enabled and disabled. */
|
|
5707
|
-
listProviders: method(z.void(), z.array(AuthProviderInfoSchema).readonly()),
|
|
5708
|
-
/**
|
|
5709
|
-
* Toggle a provider's enabled flag. Disabled providers stay
|
|
5710
|
-
* registered but aren't surfaced on the login page. The orchestrator
|
|
5711
|
-
* persists the state in `addon-settings` so it survives restarts.
|
|
5712
|
-
*/
|
|
5713
|
-
setProviderEnabled: method(
|
|
5714
|
-
z.object({ addonId: z.string(), enabled: z.boolean() }),
|
|
5715
|
-
z.object({ success: z.literal(true) }),
|
|
5716
|
-
{ kind: "mutation", auth: "admin" }
|
|
5717
|
-
)
|
|
5718
|
-
}
|
|
5719
|
-
};
|
|
5720
6102
|
const NetworkEndpointSchema = z.object({
|
|
5721
6103
|
url: z.string(),
|
|
5722
6104
|
hostname: z.string(),
|
|
@@ -5745,7 +6127,6 @@ const networkAccessCapability = {
|
|
|
5745
6127
|
name: "network-access",
|
|
5746
6128
|
scope: "system",
|
|
5747
6129
|
mode: "collection",
|
|
5748
|
-
internal: true,
|
|
5749
6130
|
providerKind: "ingress",
|
|
5750
6131
|
methods: {
|
|
5751
6132
|
start: method(z.void(), NetworkEndpointSchema, { kind: "mutation" }),
|
|
@@ -5753,58 +6134,13 @@ const networkAccessCapability = {
|
|
|
5753
6134
|
getEndpoint: method(z.void(), NetworkEndpointSchema.nullable()),
|
|
5754
6135
|
getStatus: method(z.void(), NetworkAccessStatusSchema),
|
|
5755
6136
|
/**
|
|
5756
|
-
* Enumerate every active ingress entry.
|
|
5757
|
-
*
|
|
5758
|
-
*
|
|
6137
|
+
* Enumerate every active ingress entry. Providers that expose only a
|
|
6138
|
+
* single endpoint may omit this method; callers fall back to
|
|
6139
|
+
* `getEndpoint()` in that case.
|
|
5759
6140
|
*/
|
|
5760
6141
|
listEndpoints: method(z.void(), z.array(NetworkEndpointEntrySchema).readonly())
|
|
5761
6142
|
}
|
|
5762
6143
|
};
|
|
5763
|
-
const RemoteAccessEndpointSchema = z.object({
|
|
5764
|
-
url: z.string(),
|
|
5765
|
-
hostname: z.string(),
|
|
5766
|
-
port: z.number(),
|
|
5767
|
-
protocol: z.enum(["http", "https"])
|
|
5768
|
-
});
|
|
5769
|
-
const RemoteAccessProviderInfoSchema = z.object({
|
|
5770
|
-
/** Stable id matching the addon id. */
|
|
5771
|
-
addonId: z.string(),
|
|
5772
|
-
/** Display label shown on the admin row — sourced from the addon manifest. */
|
|
5773
|
-
displayName: z.string(),
|
|
5774
|
-
/** When false, the provider is registered but disabled. */
|
|
5775
|
-
enabled: z.boolean(),
|
|
5776
|
-
/** True when the underlying tunnel/connection is up. */
|
|
5777
|
-
connected: z.boolean(),
|
|
5778
|
-
/** Public-facing endpoint, when connected. Null otherwise. */
|
|
5779
|
-
endpoint: RemoteAccessEndpointSchema.nullable(),
|
|
5780
|
-
/** Last error message (when connected=false), if available. */
|
|
5781
|
-
error: z.string().optional()
|
|
5782
|
-
});
|
|
5783
|
-
const remoteAccessCapability = {
|
|
5784
|
-
name: "remote-access",
|
|
5785
|
-
scope: "system",
|
|
5786
|
-
mode: "singleton",
|
|
5787
|
-
methods: {
|
|
5788
|
-
/** All registered remote-access providers + their live status. */
|
|
5789
|
-
listProviders: method(z.void(), z.array(RemoteAccessProviderInfoSchema).readonly()),
|
|
5790
|
-
/**
|
|
5791
|
-
* Start a specific provider's tunnel. Per-provider config still
|
|
5792
|
-
* lives on the addon's settings panel; this is just the on/off
|
|
5793
|
-
* trigger so the admin UI can manage the lifecycle from one place.
|
|
5794
|
-
*/
|
|
5795
|
-
startProvider: method(
|
|
5796
|
-
z.object({ addonId: z.string() }),
|
|
5797
|
-
RemoteAccessEndpointSchema,
|
|
5798
|
-
{ kind: "mutation", auth: "admin" }
|
|
5799
|
-
),
|
|
5800
|
-
/** Stop a specific provider's tunnel (idempotent on already-stopped). */
|
|
5801
|
-
stopProvider: method(
|
|
5802
|
-
z.object({ addonId: z.string() }),
|
|
5803
|
-
z.object({ success: z.literal(true) }),
|
|
5804
|
-
{ kind: "mutation", auth: "admin" }
|
|
5805
|
-
)
|
|
5806
|
-
}
|
|
5807
|
-
};
|
|
5808
6144
|
const TurnServerSchema = z.object({
|
|
5809
6145
|
/** Single URL or list of URLs (e.g. "turn:turn.example.com:3478?transport=udp"). */
|
|
5810
6146
|
urls: z.union([z.string(), z.array(z.string())]),
|
|
@@ -5827,48 +6163,6 @@ const turnProviderCapability = {
|
|
|
5827
6163
|
)
|
|
5828
6164
|
}
|
|
5829
6165
|
};
|
|
5830
|
-
const TurnProviderInfoSchema = z.object({
|
|
5831
|
-
/** Stable id matching the addon id. */
|
|
5832
|
-
addonId: z.string(),
|
|
5833
|
-
/** Display label shown on the admin row — sourced from the addon manifest. */
|
|
5834
|
-
displayName: z.string(),
|
|
5835
|
-
/** When false, the provider is registered but disabled. */
|
|
5836
|
-
enabled: z.boolean(),
|
|
5837
|
-
/** Number of servers this provider is currently exposing. */
|
|
5838
|
-
serverCount: z.number(),
|
|
5839
|
-
/**
|
|
5840
|
-
* Flat list of every TURN/STUN URL this provider currently exposes.
|
|
5841
|
-
* One row per URL (multi-URL ICE server entries are flattened). The
|
|
5842
|
-
* admin UI shows this in a compact per-provider list so operators
|
|
5843
|
-
* can verify what's actually being negotiated without having to dig
|
|
5844
|
-
* into the combined `getAllServers` output.
|
|
5845
|
-
*/
|
|
5846
|
-
urls: z.array(z.string()).readonly(),
|
|
5847
|
-
/** Last fetch error (when serverCount=0 due to API failure), if any. */
|
|
5848
|
-
error: z.string().optional()
|
|
5849
|
-
});
|
|
5850
|
-
const turnOrchestratorCapability = {
|
|
5851
|
-
name: "turn-orchestrator",
|
|
5852
|
-
scope: "system",
|
|
5853
|
-
mode: "singleton",
|
|
5854
|
-
methods: {
|
|
5855
|
-
/** All registered TURN providers + per-provider stats. */
|
|
5856
|
-
listProviders: method(z.void(), z.array(TurnProviderInfoSchema).readonly()),
|
|
5857
|
-
/**
|
|
5858
|
-
* Combined list of TURN/STUN servers from all ENABLED providers.
|
|
5859
|
-
* Consumed by the WebRTC layer at session-creation time —
|
|
5860
|
-
* implementations may fetch fresh short-lived credentials each
|
|
5861
|
-
* call (e.g. Cloudflare API), so consumers SHOULD call per-session.
|
|
5862
|
-
*/
|
|
5863
|
-
getAllServers: method(z.void(), z.array(TurnServerSchema).readonly()),
|
|
5864
|
-
/** Toggle a provider's enabled flag. */
|
|
5865
|
-
setProviderEnabled: method(
|
|
5866
|
-
z.object({ addonId: z.string(), enabled: z.boolean() }),
|
|
5867
|
-
z.object({ success: z.literal(true) }),
|
|
5868
|
-
{ kind: "mutation", auth: "admin" }
|
|
5869
|
-
)
|
|
5870
|
-
}
|
|
5871
|
-
};
|
|
5872
6166
|
const SnapshotImageSchema = z.object({
|
|
5873
6167
|
base64: z.string(),
|
|
5874
6168
|
contentType: z.string()
|
|
@@ -5887,6 +6181,8 @@ const snapshotCapability = {
|
|
|
5887
6181
|
name: "snapshot",
|
|
5888
6182
|
scope: "device",
|
|
5889
6183
|
mode: "singleton",
|
|
6184
|
+
kind: "wrapper",
|
|
6185
|
+
defaultActive: true,
|
|
5890
6186
|
deviceTypes: [DeviceType.Camera],
|
|
5891
6187
|
// Owns per-device snapshot settings (preferred stream, debug logging).
|
|
5892
6188
|
// The three DeviceSettingsContribution methods are auto-added to the
|
|
@@ -6236,6 +6532,8 @@ const detectionPipelineCapability = {
|
|
|
6236
6532
|
name: "detection-pipeline",
|
|
6237
6533
|
scope: "device",
|
|
6238
6534
|
mode: "singleton",
|
|
6535
|
+
kind: "wrapper",
|
|
6536
|
+
defaultActive: true,
|
|
6239
6537
|
deviceTypes: [DeviceType.Camera],
|
|
6240
6538
|
exposesDeviceSettings: true,
|
|
6241
6539
|
methods: {}
|
|
@@ -6344,6 +6642,8 @@ const pipelineAnalyticsCapability = {
|
|
|
6344
6642
|
name: "pipeline-analytics",
|
|
6345
6643
|
scope: "device",
|
|
6346
6644
|
mode: "singleton",
|
|
6645
|
+
kind: "wrapper",
|
|
6646
|
+
defaultActive: true,
|
|
6347
6647
|
deviceTypes: [DeviceType.Camera],
|
|
6348
6648
|
exposesDeviceSettings: true,
|
|
6349
6649
|
methods: {
|
|
@@ -6633,11 +6933,26 @@ const PtzMoveCommandSchema = z.object({
|
|
|
6633
6933
|
zoom: z.number().optional(),
|
|
6634
6934
|
speed: z.number().optional()
|
|
6635
6935
|
});
|
|
6936
|
+
const PtzStatusSchema = PtzPositionSchema.extend({ autofocus: z.boolean() });
|
|
6937
|
+
const PtzOptionsSchema = z.object({
|
|
6938
|
+
hasPan: z.boolean(),
|
|
6939
|
+
hasTilt: z.boolean(),
|
|
6940
|
+
hasZoom: z.boolean(),
|
|
6941
|
+
supportsPresets: z.boolean(),
|
|
6942
|
+
/** Max number of named presets the camera supports, when known. */
|
|
6943
|
+
maxPresets: z.number().optional(),
|
|
6944
|
+
/** Whether the camera exposes a controllable autofocus toggle
|
|
6945
|
+
* (boolean `hasX` per the getOptions availability convention). */
|
|
6946
|
+
hasAutofocus: z.boolean()
|
|
6947
|
+
});
|
|
6636
6948
|
const ptzCapability = {
|
|
6637
6949
|
name: "ptz",
|
|
6638
6950
|
scope: "device",
|
|
6639
6951
|
mode: "singleton",
|
|
6640
6952
|
deviceTypes: [DeviceType.Camera],
|
|
6953
|
+
deviceConfig: {
|
|
6954
|
+
ui: { kind: "widget", widgetId: "host/ptz-panel", tab: "ptz", topTab: true, label: "PTZ", order: 0 }
|
|
6955
|
+
},
|
|
6641
6956
|
methods: {
|
|
6642
6957
|
move: method(
|
|
6643
6958
|
PtzMoveCommandSchema.extend({ deviceId: z.number() }),
|
|
@@ -6663,6 +6978,20 @@ const ptzCapability = {
|
|
|
6663
6978
|
z.void(),
|
|
6664
6979
|
{ kind: "mutation" }
|
|
6665
6980
|
),
|
|
6981
|
+
savePreset: method(
|
|
6982
|
+
z.object({ deviceId: z.number(), presetId: z.string(), name: z.string() }),
|
|
6983
|
+
z.void(),
|
|
6984
|
+
{ kind: "mutation", auth: "admin" }
|
|
6985
|
+
),
|
|
6986
|
+
deletePreset: method(
|
|
6987
|
+
z.object({ deviceId: z.number(), presetId: z.string() }),
|
|
6988
|
+
z.void(),
|
|
6989
|
+
{ kind: "mutation", auth: "admin" }
|
|
6990
|
+
),
|
|
6991
|
+
getOptions: method(
|
|
6992
|
+
z.object({ deviceId: z.number() }),
|
|
6993
|
+
PtzOptionsSchema
|
|
6994
|
+
),
|
|
6666
6995
|
goHome: method(
|
|
6667
6996
|
z.object({ deviceId: z.number() }),
|
|
6668
6997
|
z.void(),
|
|
@@ -6677,10 +7006,17 @@ const ptzCapability = {
|
|
|
6677
7006
|
getPosition: method(
|
|
6678
7007
|
z.object({ deviceId: z.number() }),
|
|
6679
7008
|
PtzPositionSchema
|
|
7009
|
+
),
|
|
7010
|
+
/** Toggle the camera's autofocus. Only meaningful when
|
|
7011
|
+
* `getOptions().hasAutofocus` is true. */
|
|
7012
|
+
setAutofocus: method(
|
|
7013
|
+
z.object({ deviceId: z.number(), enabled: z.boolean() }),
|
|
7014
|
+
z.void(),
|
|
7015
|
+
{ kind: "mutation" }
|
|
6680
7016
|
)
|
|
6681
7017
|
},
|
|
6682
7018
|
status: {
|
|
6683
|
-
schema:
|
|
7019
|
+
schema: PtzStatusSchema,
|
|
6684
7020
|
kind: "command-driven"
|
|
6685
7021
|
}
|
|
6686
7022
|
};
|
|
@@ -7464,7 +7800,7 @@ const localNetworkCapability = {
|
|
|
7464
7800
|
)
|
|
7465
7801
|
}
|
|
7466
7802
|
};
|
|
7467
|
-
const MeshEndpointSchema
|
|
7803
|
+
const MeshEndpointSchema = z.object({
|
|
7468
7804
|
/** Stable identifier within the provider (e.g. `mesh-ipv4`, `magicdns`, `funnel`). */
|
|
7469
7805
|
id: z.string(),
|
|
7470
7806
|
/** Operator-facing label (e.g. "Mesh IPv4", "MagicDNS"). */
|
|
@@ -7537,7 +7873,7 @@ const MeshStatusSchema = z.object({
|
|
|
7537
7873
|
/** Number of peers visible to this host (excluding self). */
|
|
7538
7874
|
peerCount: z.number(),
|
|
7539
7875
|
/** Every endpoint this provider exposes for the current host. */
|
|
7540
|
-
endpoints: z.array(MeshEndpointSchema
|
|
7876
|
+
endpoints: z.array(MeshEndpointSchema).readonly(),
|
|
7541
7877
|
/** Last error from the daemon, when not joined. */
|
|
7542
7878
|
error: z.string().optional(),
|
|
7543
7879
|
// ── Account / tenant identity (generic across providers) ────────
|
|
@@ -7704,185 +8040,6 @@ const meshNetworkCapability = {
|
|
|
7704
8040
|
// tabs driven by this cap.
|
|
7705
8041
|
}
|
|
7706
8042
|
};
|
|
7707
|
-
const MeshEndpointSchema = z.object({
|
|
7708
|
-
id: z.string(),
|
|
7709
|
-
label: z.string(),
|
|
7710
|
-
scope: z.enum(["mesh", "public"]),
|
|
7711
|
-
url: z.string(),
|
|
7712
|
-
hostname: z.string(),
|
|
7713
|
-
port: z.number(),
|
|
7714
|
-
protocol: z.enum(["http", "https"])
|
|
7715
|
-
});
|
|
7716
|
-
const MeshProviderInfoSchema = z.object({
|
|
7717
|
-
/** Stable id matching the addon id. */
|
|
7718
|
-
addonId: z.string(),
|
|
7719
|
-
/** Display label shown on the admin row — sourced from the addon manifest. */
|
|
7720
|
-
displayName: z.string(),
|
|
7721
|
-
/** True when the host is joined to this provider's mesh. */
|
|
7722
|
-
joined: z.boolean(),
|
|
7723
|
-
/** Local mesh IP (empty when not joined). */
|
|
7724
|
-
meshIp: z.string(),
|
|
7725
|
-
/** MagicDNS / mesh hostname (empty when not configured). */
|
|
7726
|
-
magicDnsHostname: z.string(),
|
|
7727
|
-
/** Peer count (excluding self). */
|
|
7728
|
-
peerCount: z.number(),
|
|
7729
|
-
/** Active endpoints (mesh IP + MagicDNS + optional public Funnel). */
|
|
7730
|
-
endpoints: z.array(MeshEndpointSchema).readonly(),
|
|
7731
|
-
/** Last error reported by the provider. */
|
|
7732
|
-
error: z.string().optional(),
|
|
7733
|
-
// ── Generic identity fields mirrored from MeshStatus ─────────────
|
|
7734
|
-
/** Tenant / tailnet / network display name. Empty pre-join. */
|
|
7735
|
-
tenantName: z.string(),
|
|
7736
|
-
/** Mesh DNS suffix (e.g. tailXXXX.ts.net). Empty when not configured. */
|
|
7737
|
-
magicDnsSuffix: z.string(),
|
|
7738
|
-
/** Authenticated user / account login. Null for token-only providers. */
|
|
7739
|
-
userLogin: z.string().nullable(),
|
|
7740
|
-
/** Provider control-plane URL. */
|
|
7741
|
-
controlPlaneUrl: z.string(),
|
|
7742
|
-
/** Machine-key expiry (epoch ms). Null when keys don't rotate. */
|
|
7743
|
-
keyExpiry: z.number().nullable()
|
|
7744
|
-
});
|
|
7745
|
-
const meshOrchestratorCapability = {
|
|
7746
|
-
name: "mesh-orchestrator",
|
|
7747
|
-
scope: "system",
|
|
7748
|
-
mode: "singleton",
|
|
7749
|
-
methods: {
|
|
7750
|
-
/** All registered mesh-network providers + live status. */
|
|
7751
|
-
listProviders: method(z.void(), z.array(MeshProviderInfoSchema).readonly()),
|
|
7752
|
-
/**
|
|
7753
|
-
* Join the mesh of a specific provider. Per-provider config still
|
|
7754
|
-
* lives on its settings panel; the orchestrator forwards.
|
|
7755
|
-
*/
|
|
7756
|
-
joinProvider: method(
|
|
7757
|
-
z.object({
|
|
7758
|
-
addonId: z.string(),
|
|
7759
|
-
authKey: z.string().min(8),
|
|
7760
|
-
hostname: z.string().optional()
|
|
7761
|
-
}),
|
|
7762
|
-
z.object({ joined: z.literal(true) }),
|
|
7763
|
-
{ kind: "mutation" }
|
|
7764
|
-
),
|
|
7765
|
-
leaveProvider: method(
|
|
7766
|
-
z.object({ addonId: z.string() }),
|
|
7767
|
-
z.object({ success: z.literal(true) }),
|
|
7768
|
-
{ kind: "mutation" }
|
|
7769
|
-
),
|
|
7770
|
-
/**
|
|
7771
|
-
* Browser-redirect login flow. Forwards to the named provider's
|
|
7772
|
-
* `mesh-network.startLogin` and returns the URL the daemon
|
|
7773
|
-
* prints. UI opens it in a new tab, then polls `listProviders`
|
|
7774
|
-
* for `joined: true`.
|
|
7775
|
-
*/
|
|
7776
|
-
startLoginProvider: method(
|
|
7777
|
-
z.object({
|
|
7778
|
-
addonId: z.string(),
|
|
7779
|
-
hostname: z.string().optional()
|
|
7780
|
-
}),
|
|
7781
|
-
z.object({ loginUrl: z.string() }),
|
|
7782
|
-
{ kind: "mutation" }
|
|
7783
|
-
),
|
|
7784
|
-
/**
|
|
7785
|
-
* Sign out of the provider's account entirely (`mesh-network.logout`).
|
|
7786
|
-
* Distinct from `leaveProvider` which only takes the host off-mesh;
|
|
7787
|
-
* `logoutProvider` wipes credentials so the next start requires a
|
|
7788
|
-
* fresh login.
|
|
7789
|
-
*/
|
|
7790
|
-
logoutProvider: method(
|
|
7791
|
-
z.object({ addonId: z.string() }),
|
|
7792
|
-
z.object({ loggedOut: z.literal(true) }),
|
|
7793
|
-
{ kind: "mutation" }
|
|
7794
|
-
),
|
|
7795
|
-
/**
|
|
7796
|
-
* Per-provider peer list. Forwards to `mesh-network.listPeers` on
|
|
7797
|
-
* the addressed provider. Separate from `listProviders` because
|
|
7798
|
-
* peer payloads can be large on a heavily-populated tailnet —
|
|
7799
|
-
* fetch only when the operator opens the Peers tab.
|
|
7800
|
-
*/
|
|
7801
|
-
listProviderPeers: method(
|
|
7802
|
-
z.object({ addonId: z.string() }),
|
|
7803
|
-
z.object({
|
|
7804
|
-
peers: z.array(MeshPeerSchema).readonly()
|
|
7805
|
-
})
|
|
7806
|
-
)
|
|
7807
|
-
}
|
|
7808
|
-
};
|
|
7809
|
-
const MethodAccessSchema = z.enum(["view", "create", "delete"]);
|
|
7810
|
-
const AllowedProviderSchema = z.union([z.literal("*"), z.array(z.string())]);
|
|
7811
|
-
const AllowedDevicesSchema = z.record(z.string(), z.union([z.literal("*"), z.array(z.string())]));
|
|
7812
|
-
const CapScopeSchema = z.enum(["device", "system"]);
|
|
7813
|
-
const TokenScopeSchema = z.discriminatedUnion("type", [
|
|
7814
|
-
z.object({
|
|
7815
|
-
type: z.literal("category"),
|
|
7816
|
-
target: CapScopeSchema,
|
|
7817
|
-
access: z.array(MethodAccessSchema).min(1)
|
|
7818
|
-
}),
|
|
7819
|
-
z.object({
|
|
7820
|
-
type: z.literal("capability"),
|
|
7821
|
-
target: z.string(),
|
|
7822
|
-
access: z.array(MethodAccessSchema).min(1)
|
|
7823
|
-
}),
|
|
7824
|
-
z.object({
|
|
7825
|
-
type: z.literal("addon"),
|
|
7826
|
-
target: z.string(),
|
|
7827
|
-
access: z.array(MethodAccessSchema).min(1)
|
|
7828
|
-
}),
|
|
7829
|
-
z.object({
|
|
7830
|
-
type: z.literal("device"),
|
|
7831
|
-
/**
|
|
7832
|
-
* One or more deviceIds (serialised as strings for wire-format
|
|
7833
|
-
* consistency with the rest of the union). Matcher accepts if
|
|
7834
|
-
* `input.deviceId` ∈ `targets`. Array shape avoids the row-explosion
|
|
7835
|
-
* of one scope-per-device when granting access to a set of cameras.
|
|
7836
|
-
*/
|
|
7837
|
-
targets: z.array(z.string()).min(1),
|
|
7838
|
-
access: z.array(MethodAccessSchema).min(1)
|
|
7839
|
-
})
|
|
7840
|
-
]);
|
|
7841
|
-
const UserRecordSchema = z.object({
|
|
7842
|
-
id: z.string(),
|
|
7843
|
-
username: z.string(),
|
|
7844
|
-
passwordHash: z.string(),
|
|
7845
|
-
/**
|
|
7846
|
-
* Admin bypass. When true, the middleware skips the scope-access
|
|
7847
|
-
* check entirely. There is no other axis of privilege; the legacy
|
|
7848
|
-
* role enum collapsed onto this boolean in v2.
|
|
7849
|
-
*/
|
|
7850
|
-
isAdmin: z.boolean().default(false),
|
|
7851
|
-
allowedProviders: AllowedProviderSchema,
|
|
7852
|
-
allowedDevices: AllowedDevicesSchema,
|
|
7853
|
-
/**
|
|
7854
|
-
* Scopes granted to this user. Admins bypass; their `scopes` is
|
|
7855
|
-
* ignored. Non-admins without scopes are locked out of every
|
|
7856
|
-
* protected call.
|
|
7857
|
-
*/
|
|
7858
|
-
scopes: z.array(TokenScopeSchema).default([]),
|
|
7859
|
-
createdAt: z.number(),
|
|
7860
|
-
updatedAt: z.number()
|
|
7861
|
-
});
|
|
7862
|
-
const ApiKeyRecordSchema = z.object({
|
|
7863
|
-
id: z.string(),
|
|
7864
|
-
label: z.string(),
|
|
7865
|
-
isAdmin: z.boolean().default(false),
|
|
7866
|
-
allowedProviders: AllowedProviderSchema,
|
|
7867
|
-
allowedDevices: AllowedDevicesSchema,
|
|
7868
|
-
tokenHash: z.string(),
|
|
7869
|
-
tokenPrefix: z.string(),
|
|
7870
|
-
createdAt: z.number(),
|
|
7871
|
-
lastUsedAt: z.number().optional()
|
|
7872
|
-
});
|
|
7873
|
-
const ScopedTokenSchema = z.object({
|
|
7874
|
-
id: z.string(),
|
|
7875
|
-
userId: z.string(),
|
|
7876
|
-
name: z.string(),
|
|
7877
|
-
tokenHash: z.string(),
|
|
7878
|
-
tokenPrefix: z.string(),
|
|
7879
|
-
scopes: z.array(TokenScopeSchema),
|
|
7880
|
-
// SQLite/JSON storage round-trips undefined → null. Use `nullish` so the
|
|
7881
|
-
// schema accepts both `null` (read from disk) and `undefined` (in-memory).
|
|
7882
|
-
expiresAt: z.number().nullish(),
|
|
7883
|
-
lastUsedAt: z.number().nullish(),
|
|
7884
|
-
createdAt: z.number()
|
|
7885
|
-
});
|
|
7886
8043
|
const UserSummarySchema = z.object({
|
|
7887
8044
|
id: z.string(),
|
|
7888
8045
|
username: z.string(),
|
|
@@ -7955,6 +8112,16 @@ const CreateScopedTokenResultSchema = z.object({
|
|
|
7955
8112
|
token: z.string(),
|
|
7956
8113
|
record: ScopedTokenSummarySchema
|
|
7957
8114
|
});
|
|
8115
|
+
const OauthSessionSummarySchema = z.object({
|
|
8116
|
+
id: z.string(),
|
|
8117
|
+
userId: z.string(),
|
|
8118
|
+
username: z.string(),
|
|
8119
|
+
integrationId: z.string(),
|
|
8120
|
+
scopes: z.array(TokenScopeSchema),
|
|
8121
|
+
createdAt: z.number(),
|
|
8122
|
+
lastUsedAt: z.number(),
|
|
8123
|
+
revokedAt: z.number().nullable()
|
|
8124
|
+
});
|
|
7958
8125
|
const TotpSetupResultSchema = z.object({
|
|
7959
8126
|
secret: z.string(),
|
|
7960
8127
|
otpauthUrl: z.string()
|
|
@@ -8033,6 +8200,66 @@ const userManagementCapability = {
|
|
|
8033
8200
|
z.object({ userId: z.string(), code: z.string() }),
|
|
8034
8201
|
z.object({ valid: z.boolean() }),
|
|
8035
8202
|
{ kind: "mutation", access: "view" }
|
|
8203
|
+
),
|
|
8204
|
+
// ── OAuth account-linking grant ────────────────────────────────
|
|
8205
|
+
//
|
|
8206
|
+
// Core's /oauth2/* endpoints delegate here. Tokens are sso-bridge
|
|
8207
|
+
// JWTs (kinds oauth-code / oauth-access / oauth-refresh) and ALWAYS
|
|
8208
|
+
// carry isAdmin:false — the operator login proves hub control; the
|
|
8209
|
+
// issued token is minimal (device scope only).
|
|
8210
|
+
oauthIssueCode: method(
|
|
8211
|
+
z.object({
|
|
8212
|
+
integrationId: z.string(),
|
|
8213
|
+
userId: z.string(),
|
|
8214
|
+
username: z.string(),
|
|
8215
|
+
scopes: z.array(TokenScopeSchema),
|
|
8216
|
+
redirectUri: z.string(),
|
|
8217
|
+
hubUrl: z.string()
|
|
8218
|
+
}),
|
|
8219
|
+
z.object({ code: z.string() }),
|
|
8220
|
+
{ kind: "mutation", access: "create" }
|
|
8221
|
+
),
|
|
8222
|
+
oauthExchangeCode: method(
|
|
8223
|
+
z.object({ code: z.string(), redirectUri: z.string() }),
|
|
8224
|
+
z.object({
|
|
8225
|
+
accessToken: z.string(),
|
|
8226
|
+
refreshToken: z.string(),
|
|
8227
|
+
expiresIn: z.number()
|
|
8228
|
+
}).nullable(),
|
|
8229
|
+
{ kind: "mutation", access: "view" }
|
|
8230
|
+
),
|
|
8231
|
+
oauthRefresh: method(
|
|
8232
|
+
z.object({ refreshToken: z.string() }),
|
|
8233
|
+
z.object({
|
|
8234
|
+
accessToken: z.string(),
|
|
8235
|
+
refreshToken: z.string(),
|
|
8236
|
+
expiresIn: z.number()
|
|
8237
|
+
}).nullable(),
|
|
8238
|
+
{ kind: "mutation", access: "view" }
|
|
8239
|
+
),
|
|
8240
|
+
oauthVerifyAccessToken: method(
|
|
8241
|
+
z.object({ token: z.string() }),
|
|
8242
|
+
z.object({
|
|
8243
|
+
userId: z.string(),
|
|
8244
|
+
username: z.string(),
|
|
8245
|
+
scopes: z.array(TokenScopeSchema)
|
|
8246
|
+
}).nullable(),
|
|
8247
|
+
{ access: "view" }
|
|
8248
|
+
),
|
|
8249
|
+
// ── OAuth linked-session management (Phase D) ──────────────────
|
|
8250
|
+
//
|
|
8251
|
+
// The admin UI lists active account-linking sessions and revokes
|
|
8252
|
+
// them; revocation makes the linked integration's tokens fail
|
|
8253
|
+
// verification immediately.
|
|
8254
|
+
listOauthSessions: method(
|
|
8255
|
+
z.void(),
|
|
8256
|
+
z.array(OauthSessionSummarySchema),
|
|
8257
|
+
{ auth: "admin" }
|
|
8258
|
+
),
|
|
8259
|
+
revokeOauthSession: method(
|
|
8260
|
+
z.object({ id: z.string() }),
|
|
8261
|
+
z.object({ success: z.boolean() }),
|
|
8262
|
+
{ kind: "mutation", auth: "admin", access: "delete" }
|
|
8036
8263
|
)
|
|
8037
8264
|
}
|
|
8038
8265
|
};
|
|
@@ -8262,6 +8489,19 @@ const nodesCapability = {
|
|
|
8262
8489
|
z.record(z.string(), ClusterAddonStatusEntrySchema),
|
|
8263
8490
|
{ auth: "admin" }
|
|
8264
8491
|
),
|
|
8492
|
+
getCapUsageGraph: method(
|
|
8493
|
+
z.object({
|
|
8494
|
+
windowSeconds: z.number().int().positive().max(300).default(60)
|
|
8495
|
+
}),
|
|
8496
|
+
z.array(z.object({
|
|
8497
|
+
callerAddonId: z.string(),
|
|
8498
|
+
providerAddonId: z.string(),
|
|
8499
|
+
capName: z.string(),
|
|
8500
|
+
callsPerMin: z.number(),
|
|
8501
|
+
lastCallAtMs: z.number()
|
|
8502
|
+
})).readonly(),
|
|
8503
|
+
{ auth: "admin" }
|
|
8504
|
+
),
|
|
8265
8505
|
/**
|
|
8266
8506
|
* Direct per-node addon listing — calls `$agent.status` on the target
|
|
8267
8507
|
* node (or returns the hub registry for `nodeId === 'hub'`) and surfaces
|
|
@@ -8698,6 +8938,29 @@ const addonsCapability = {
|
|
|
8698
8938
|
isActive: z.boolean()
|
|
8699
8939
|
})).readonly()
|
|
8700
8940
|
),
|
|
8941
|
+
/**
|
|
8942
|
+
* Toggle a single collection-cap provider on/off. Generic write-side
|
|
8943
|
+
* counterpart of `listCapabilityProviders` — drives the per-provider
|
|
8944
|
+
* Enable/Disable affordance in admin pages (TURN servers, etc.)
|
|
8945
|
+
* without needing a bespoke orchestrator cap.
|
|
8946
|
+
*
|
|
8947
|
+
* Reaches the hub's `CapabilityRegistry` directly:
|
|
8948
|
+
* `enableCollectionProvider` / `disableCollectionProvider` flip the
|
|
8949
|
+
* registry-level `disabledProviders` set. `getCollectionEntries`
|
|
8950
|
+
* already filters disabled providers out, so a disabled provider
|
|
8951
|
+
* drops out of every collection aggregate immediately. Only valid
|
|
8952
|
+
* for `mode: 'collection'` caps — the registry no-ops + warns for
|
|
8953
|
+
* singletons.
|
|
8954
|
+
*/
|
|
8955
|
+
setCapabilityProviderEnabled: method(
|
|
8956
|
+
z.object({
|
|
8957
|
+
capName: z.string().min(1),
|
|
8958
|
+
addonId: z.string().min(1),
|
|
8959
|
+
enabled: z.boolean()
|
|
8960
|
+
}),
|
|
8961
|
+
z.object({ success: z.literal(true) }),
|
|
8962
|
+
{ kind: "mutation", auth: "admin" }
|
|
8963
|
+
),
|
|
8701
8964
|
/**
|
|
8702
8965
|
* Live-update one of the framework packages marked
|
|
8703
8966
|
* `camstack.system: true` (`@camstack/types|kernel|core|sdk|ui-library`).
|
|
@@ -8801,77 +9064,77 @@ const PIPELINE_OWNER_CAPABILITY_NAMES = [
|
|
|
8801
9064
|
];
|
|
8802
9065
|
export {
|
|
8803
9066
|
nativeObjectDetectionCapability as $,
|
|
8804
|
-
|
|
8805
|
-
|
|
8806
|
-
|
|
8807
|
-
|
|
8808
|
-
|
|
8809
|
-
|
|
8810
|
-
|
|
8811
|
-
|
|
8812
|
-
|
|
8813
|
-
|
|
8814
|
-
|
|
8815
|
-
|
|
8816
|
-
|
|
8817
|
-
|
|
8818
|
-
|
|
8819
|
-
|
|
8820
|
-
|
|
8821
|
-
|
|
8822
|
-
|
|
8823
|
-
|
|
8824
|
-
|
|
8825
|
-
|
|
8826
|
-
|
|
8827
|
-
|
|
9067
|
+
addonWidgetsSourceCapability as A,
|
|
9068
|
+
addonsCapability as B,
|
|
9069
|
+
adminUiCapability as C,
|
|
9070
|
+
advancedNotifierCapability as D,
|
|
9071
|
+
alertsCapability as E,
|
|
9072
|
+
audioAnalysisCapability as F,
|
|
9073
|
+
audioAnalyzerCapability as G,
|
|
9074
|
+
audioCodecCapability as H,
|
|
9075
|
+
authProviderCapability as I,
|
|
9076
|
+
backupCapability as J,
|
|
9077
|
+
cameraCredentialsCapability as K,
|
|
9078
|
+
decoderCapability as L,
|
|
9079
|
+
detectionPipelineCapability as M,
|
|
9080
|
+
deviceExportCapability as N,
|
|
9081
|
+
deviceManagerCapability as O,
|
|
9082
|
+
deviceOpsCapability as P,
|
|
9083
|
+
deviceStateCapability as Q,
|
|
9084
|
+
embeddingEncoderCapability as R,
|
|
9085
|
+
eventsCapability as S,
|
|
9086
|
+
integrationsCapability as T,
|
|
9087
|
+
intercomCapability as U,
|
|
9088
|
+
localNetworkCapability as V,
|
|
9089
|
+
logDestinationCapability as W,
|
|
9090
|
+
meshNetworkCapability as X,
|
|
8828
9091
|
metricsProviderCapability as Y,
|
|
8829
9092
|
motionDetectionCapability as Z,
|
|
8830
9093
|
mqttBrokerCapability as _,
|
|
8831
9094
|
zoneRulesCapability as a,
|
|
8832
|
-
|
|
9095
|
+
AudioLevelSchema as a$,
|
|
8833
9096
|
networkAccessCapability as a0,
|
|
8834
9097
|
networkQualityCapability as a1,
|
|
8835
9098
|
nodesCapability as a2,
|
|
8836
9099
|
notificationOutputCapability as a3,
|
|
8837
|
-
|
|
8838
|
-
|
|
8839
|
-
|
|
8840
|
-
|
|
8841
|
-
|
|
8842
|
-
|
|
8843
|
-
|
|
8844
|
-
|
|
8845
|
-
|
|
8846
|
-
|
|
8847
|
-
|
|
8848
|
-
|
|
8849
|
-
|
|
8850
|
-
|
|
8851
|
-
|
|
8852
|
-
|
|
8853
|
-
|
|
8854
|
-
|
|
8855
|
-
|
|
8856
|
-
|
|
8857
|
-
|
|
8858
|
-
|
|
8859
|
-
|
|
8860
|
-
|
|
8861
|
-
|
|
8862
|
-
|
|
8863
|
-
|
|
8864
|
-
|
|
8865
|
-
|
|
8866
|
-
|
|
8867
|
-
|
|
8868
|
-
|
|
8869
|
-
|
|
8870
|
-
|
|
8871
|
-
|
|
8872
|
-
|
|
8873
|
-
|
|
8874
|
-
|
|
9100
|
+
oauthIntegrationCapability as a4,
|
|
9101
|
+
osdCapability as a5,
|
|
9102
|
+
pipelineAnalyticsCapability as a6,
|
|
9103
|
+
pipelineExecutorCapability as a7,
|
|
9104
|
+
pipelineOrchestratorCapability as a8,
|
|
9105
|
+
pipelineRunnerCapability as a9,
|
|
9106
|
+
AccessoriesStatusSchema as aA,
|
|
9107
|
+
AccessoryKind as aB,
|
|
9108
|
+
AddBrokerInputSchema as aC,
|
|
9109
|
+
AddonAutoUpdateSchema as aD,
|
|
9110
|
+
AddonListItemSchema as aE,
|
|
9111
|
+
AddonPageDeclarationSchema as aF,
|
|
9112
|
+
AddonPageInfoSchema as aG,
|
|
9113
|
+
AgentLoadSummarySchema as aH,
|
|
9114
|
+
AlertSchema as aI,
|
|
9115
|
+
AlertSeveritySchema as aJ,
|
|
9116
|
+
AlertSourceSchema as aK,
|
|
9117
|
+
AlertStatusSchema as aL,
|
|
9118
|
+
ApiKeyRecordSchema as aM,
|
|
9119
|
+
ApiKeySummarySchema as aN,
|
|
9120
|
+
ArchiveEntrySchema as aO,
|
|
9121
|
+
ArchiveManifestSchema as aP,
|
|
9122
|
+
AudioAnalysisResultSchema as aQ,
|
|
9123
|
+
AudioAnalysisSettingsSchema as aR,
|
|
9124
|
+
AudioChunkInputSchema as aS,
|
|
9125
|
+
AudioClassSummarySchema as aT,
|
|
9126
|
+
AudioClassificationLabelSchema as aU,
|
|
9127
|
+
AudioClassificationResultSchema as aV,
|
|
9128
|
+
AudioCodecInfoSchema as aW,
|
|
9129
|
+
AudioDecodeSessionConfigSchema as aX,
|
|
9130
|
+
AudioEncodeSessionConfigSchema as aY,
|
|
9131
|
+
AudioEncodedChunkSchema as aZ,
|
|
9132
|
+
AudioEventSchema as a_,
|
|
9133
|
+
platformProbeCapability as aa,
|
|
9134
|
+
ptzCapability as ab,
|
|
9135
|
+
rebootCapability as ac,
|
|
9136
|
+
recordingCapability as ad,
|
|
9137
|
+
recordingEngineCapability as ae,
|
|
8875
9138
|
restreamerCapability as af,
|
|
8876
9139
|
settingsStoreCapability as ag,
|
|
8877
9140
|
smtpProviderCapability as ah,
|
|
@@ -8884,283 +9147,301 @@ export {
|
|
|
8884
9147
|
streamingEngineCapability as ao,
|
|
8885
9148
|
systemCapability as ap,
|
|
8886
9149
|
toastCapability as aq,
|
|
8887
|
-
|
|
8888
|
-
|
|
8889
|
-
|
|
8890
|
-
|
|
8891
|
-
|
|
8892
|
-
|
|
8893
|
-
|
|
8894
|
-
|
|
8895
|
-
|
|
9150
|
+
turnProviderCapability as ar,
|
|
9151
|
+
userManagementCapability as as,
|
|
9152
|
+
userPasskeysCapability as at,
|
|
9153
|
+
webrtcCapability as au,
|
|
9154
|
+
webrtcSessionCapability as av,
|
|
9155
|
+
ACCESSORY_LABEL as aw,
|
|
9156
|
+
APPLE_SA_TO_MACRO as ax,
|
|
9157
|
+
AUDIO_BACKEND_CHOICES as ay,
|
|
9158
|
+
AUDIO_MACRO_LABELS as az,
|
|
8896
9159
|
zoneAnalyticsCapability as b,
|
|
8897
|
-
|
|
8898
|
-
|
|
8899
|
-
|
|
8900
|
-
|
|
8901
|
-
|
|
8902
|
-
|
|
8903
|
-
|
|
8904
|
-
|
|
8905
|
-
|
|
8906
|
-
|
|
8907
|
-
|
|
8908
|
-
|
|
8909
|
-
|
|
8910
|
-
|
|
8911
|
-
|
|
8912
|
-
|
|
8913
|
-
|
|
8914
|
-
|
|
8915
|
-
|
|
8916
|
-
|
|
8917
|
-
|
|
8918
|
-
|
|
8919
|
-
|
|
8920
|
-
|
|
8921
|
-
|
|
8922
|
-
|
|
8923
|
-
|
|
8924
|
-
|
|
8925
|
-
|
|
8926
|
-
|
|
8927
|
-
|
|
8928
|
-
|
|
8929
|
-
|
|
8930
|
-
|
|
8931
|
-
|
|
8932
|
-
|
|
8933
|
-
|
|
8934
|
-
|
|
8935
|
-
|
|
8936
|
-
|
|
8937
|
-
|
|
8938
|
-
|
|
8939
|
-
|
|
8940
|
-
|
|
8941
|
-
|
|
8942
|
-
|
|
8943
|
-
|
|
8944
|
-
|
|
8945
|
-
|
|
8946
|
-
|
|
8947
|
-
|
|
8948
|
-
|
|
8949
|
-
|
|
8950
|
-
|
|
8951
|
-
|
|
8952
|
-
|
|
8953
|
-
|
|
8954
|
-
|
|
8955
|
-
|
|
8956
|
-
|
|
8957
|
-
|
|
8958
|
-
|
|
8959
|
-
|
|
8960
|
-
|
|
8961
|
-
|
|
8962
|
-
|
|
8963
|
-
|
|
8964
|
-
|
|
8965
|
-
|
|
8966
|
-
|
|
8967
|
-
|
|
8968
|
-
|
|
8969
|
-
|
|
8970
|
-
|
|
8971
|
-
|
|
8972
|
-
|
|
8973
|
-
|
|
8974
|
-
|
|
8975
|
-
|
|
8976
|
-
|
|
8977
|
-
|
|
8978
|
-
|
|
8979
|
-
|
|
8980
|
-
|
|
8981
|
-
|
|
8982
|
-
|
|
8983
|
-
|
|
8984
|
-
|
|
8985
|
-
|
|
8986
|
-
|
|
8987
|
-
|
|
8988
|
-
|
|
8989
|
-
|
|
8990
|
-
|
|
8991
|
-
|
|
8992
|
-
|
|
8993
|
-
|
|
8994
|
-
|
|
8995
|
-
|
|
8996
|
-
|
|
8997
|
-
|
|
8998
|
-
|
|
8999
|
-
|
|
9000
|
-
|
|
9001
|
-
|
|
9002
|
-
|
|
9003
|
-
|
|
9004
|
-
|
|
9005
|
-
|
|
9006
|
-
|
|
9007
|
-
|
|
9008
|
-
|
|
9009
|
-
|
|
9010
|
-
|
|
9011
|
-
|
|
9012
|
-
|
|
9013
|
-
|
|
9014
|
-
|
|
9015
|
-
|
|
9016
|
-
|
|
9017
|
-
|
|
9018
|
-
|
|
9019
|
-
|
|
9020
|
-
|
|
9021
|
-
|
|
9022
|
-
|
|
9023
|
-
|
|
9024
|
-
|
|
9025
|
-
|
|
9026
|
-
|
|
9027
|
-
|
|
9028
|
-
|
|
9029
|
-
|
|
9030
|
-
|
|
9031
|
-
|
|
9032
|
-
|
|
9033
|
-
|
|
9034
|
-
|
|
9035
|
-
|
|
9036
|
-
|
|
9037
|
-
|
|
9038
|
-
|
|
9039
|
-
|
|
9040
|
-
|
|
9041
|
-
|
|
9042
|
-
|
|
9043
|
-
|
|
9044
|
-
|
|
9045
|
-
|
|
9046
|
-
|
|
9047
|
-
|
|
9048
|
-
|
|
9049
|
-
|
|
9050
|
-
|
|
9051
|
-
|
|
9052
|
-
|
|
9053
|
-
|
|
9054
|
-
|
|
9055
|
-
|
|
9056
|
-
|
|
9057
|
-
|
|
9058
|
-
|
|
9059
|
-
|
|
9060
|
-
|
|
9061
|
-
|
|
9062
|
-
|
|
9063
|
-
|
|
9064
|
-
|
|
9065
|
-
|
|
9066
|
-
|
|
9067
|
-
|
|
9068
|
-
|
|
9069
|
-
|
|
9070
|
-
|
|
9071
|
-
|
|
9072
|
-
|
|
9073
|
-
|
|
9074
|
-
|
|
9075
|
-
|
|
9076
|
-
|
|
9077
|
-
|
|
9078
|
-
|
|
9079
|
-
|
|
9080
|
-
|
|
9081
|
-
|
|
9082
|
-
|
|
9083
|
-
|
|
9084
|
-
|
|
9085
|
-
|
|
9086
|
-
|
|
9087
|
-
|
|
9088
|
-
|
|
9089
|
-
|
|
9160
|
+
UnexposeInputSchema as b$,
|
|
9161
|
+
AudioMetricsHistoryPointSchema as b0,
|
|
9162
|
+
AudioMetricsHistorySchema as b1,
|
|
9163
|
+
AudioMetricsSnapshotSchema as b2,
|
|
9164
|
+
AudioPcmChunkSchema as b3,
|
|
9165
|
+
AuthResultSchema as b4,
|
|
9166
|
+
AutoUpdateSettingsSchema as b5,
|
|
9167
|
+
AvailableIntegrationTypeSchema as b6,
|
|
9168
|
+
BATTERY_DEVICE_PROFILE as b7,
|
|
9169
|
+
BackupDestinationInfoSchema as b8,
|
|
9170
|
+
BackupEntrySchema as b9,
|
|
9171
|
+
CollectionColumnSchema as bA,
|
|
9172
|
+
CollectionIndexSchema as bB,
|
|
9173
|
+
ConfigEntrySchema$1 as bC,
|
|
9174
|
+
ConfigSectionWithValuesSchema as bD,
|
|
9175
|
+
ConfigTabDeclarationSchema as bE,
|
|
9176
|
+
CreateApiKeyInputSchema as bF,
|
|
9177
|
+
CreateApiKeyResultSchema as bG,
|
|
9178
|
+
CreateIntegrationInputSchema as bH,
|
|
9179
|
+
CreateScopedTokenInputSchema as bI,
|
|
9180
|
+
CreateScopedTokenResultSchema as bJ,
|
|
9181
|
+
CreateUserInputSchema as bK,
|
|
9182
|
+
CustomActionInputSchema as bL,
|
|
9183
|
+
DEFAULT_AUDIO_ANALYZER_CONFIG as bM,
|
|
9184
|
+
DEFAULT_DECODER_HWACCEL_CONFIG as bN,
|
|
9185
|
+
DEVICE_PROFILES as bO,
|
|
9186
|
+
DEVICE_SETTINGS_CONTRIBUTION_METHODS as bP,
|
|
9187
|
+
DEVICE_STATUS_METHOD as bQ,
|
|
9188
|
+
DecodedAudioChunkSchema as bR,
|
|
9189
|
+
DecodedFrameSchema as bS,
|
|
9190
|
+
DecoderAssignmentSchema as bT,
|
|
9191
|
+
DecoderSessionConfigSchema as bU,
|
|
9192
|
+
DecoderStatsSchema as bV,
|
|
9193
|
+
DeleteIntegrationResultSchema as bW,
|
|
9194
|
+
DetectorOutputSchema as bX,
|
|
9195
|
+
DeviceDiscoveryStatusSchema as bY,
|
|
9196
|
+
ExposeInputSchema as bZ,
|
|
9197
|
+
DeviceExportStatusSchema as b_,
|
|
9198
|
+
BatteryStatusSchema as ba,
|
|
9199
|
+
BoundingBoxSchema as bb,
|
|
9200
|
+
BrightnessStatusSchema as bc,
|
|
9201
|
+
BrokerAudioClientSchema as bd,
|
|
9202
|
+
BrokerClientsSchema as be,
|
|
9203
|
+
BrokerConnectionDetailsSchema as bf,
|
|
9204
|
+
BrokerDecodedClientSchema as bg,
|
|
9205
|
+
BrokerInfoSchema as bh,
|
|
9206
|
+
BrokerRtspClientSchema as bi,
|
|
9207
|
+
BrokerStatsSchema as bj,
|
|
9208
|
+
BrokerStatusSchema$1 as bk,
|
|
9209
|
+
CAM_PROFILE_ORDER as bl,
|
|
9210
|
+
CamProfileSchema as bm,
|
|
9211
|
+
CamStreamKindSchema as bn,
|
|
9212
|
+
CamStreamResolutionSchema as bo,
|
|
9213
|
+
CameraCredentialsSchema as bp,
|
|
9214
|
+
CameraCredentialsStatusSchema as bq,
|
|
9215
|
+
CameraMetricsSchema as br,
|
|
9216
|
+
CameraMetricsWithDeviceIdSchema as bs,
|
|
9217
|
+
CameraStreamSchema as bt,
|
|
9218
|
+
CapScopeSchema as bu,
|
|
9219
|
+
CapabilityBindingsSchema as bv,
|
|
9220
|
+
ChargingStatus as bw,
|
|
9221
|
+
ClientNetworkStatsSchema as bx,
|
|
9222
|
+
ClusterAddonNodeDeploymentSchema as by,
|
|
9223
|
+
ClusterAddonStatusEntrySchema as bz,
|
|
9224
|
+
streamParamsCapability as c,
|
|
9225
|
+
NetworkAddressSchema as c$,
|
|
9226
|
+
DeviceFeature as c0,
|
|
9227
|
+
DeviceInfoSchema as c1,
|
|
9228
|
+
DeviceNetworkStatsSchema as c2,
|
|
9229
|
+
DeviceRole as c3,
|
|
9230
|
+
DeviceStatusSchema as c4,
|
|
9231
|
+
DeviceType as c5,
|
|
9232
|
+
DiscoveredChildDeviceSchema as c6,
|
|
9233
|
+
DiscoveredChildStatusSchema as c7,
|
|
9234
|
+
DiscoveredDeviceSchema as c8,
|
|
9235
|
+
DoorbellPressEventSchema as c9,
|
|
9236
|
+
IntercomStatusSchema as cA,
|
|
9237
|
+
LocationStatSchema as cB,
|
|
9238
|
+
LogEntrySchema as cC,
|
|
9239
|
+
LogLevelSchema$1 as cD,
|
|
9240
|
+
LogStreamEntrySchema as cE,
|
|
9241
|
+
MODEL_FORMATS as cF,
|
|
9242
|
+
MediaFileSchema as cG,
|
|
9243
|
+
MeshPeerSchema as cH,
|
|
9244
|
+
MeshStatusSchema as cI,
|
|
9245
|
+
MethodAccessSchema as cJ,
|
|
9246
|
+
MotionAnalysisResultSchema as cK,
|
|
9247
|
+
MotionEventSchema as cL,
|
|
9248
|
+
MotionOnMotionChangedDataSchema as cM,
|
|
9249
|
+
MotionRegionSchema as cN,
|
|
9250
|
+
MotionSourceEnum as cO,
|
|
9251
|
+
MotionSourcesSchema as cP,
|
|
9252
|
+
MotionStatusSchema as cQ,
|
|
9253
|
+
MotionTriggerRuntimeStateSchema as cR,
|
|
9254
|
+
MotionTriggerStatusSchema as cS,
|
|
9255
|
+
MotionZoneOptionsSchema as cT,
|
|
9256
|
+
MotionZonePatchSchema as cU,
|
|
9257
|
+
MotionZoneStatusSchema as cV,
|
|
9258
|
+
StatusSchema as cW,
|
|
9259
|
+
NativeDetectionSchema as cX,
|
|
9260
|
+
NativeObjectClassEnum as cY,
|
|
9261
|
+
NativeObjectDetectionStatusSchema as cZ,
|
|
9262
|
+
NetworkAccessStatusSchema as c_,
|
|
9263
|
+
DoorbellStatusSchema as ca,
|
|
9264
|
+
EmbeddingInfoSchema as cb,
|
|
9265
|
+
EmbeddingResultSchema as cc,
|
|
9266
|
+
EncodedPacketSchema as cd,
|
|
9267
|
+
EnrichedWidgetMetadataSchema as ce,
|
|
9268
|
+
EventItemSchema as cf,
|
|
9269
|
+
EventKindSchema as cg,
|
|
9270
|
+
ExportSetupFieldSchema as ch,
|
|
9271
|
+
ExportSetupSchema as ci,
|
|
9272
|
+
ExposedDeviceSchema as cj,
|
|
9273
|
+
ExposedResourceSchema as ck,
|
|
9274
|
+
FeatureManifestSchema as cl,
|
|
9275
|
+
FeatureProbeStatusSchema as cm,
|
|
9276
|
+
FrameHandleFormatSchema as cn,
|
|
9277
|
+
FrameHandleSchema as co,
|
|
9278
|
+
FrameInputSchema as cp,
|
|
9279
|
+
GetStreamWithCodecInputSchema as cq,
|
|
9280
|
+
GlobalMetricsSchema as cr,
|
|
9281
|
+
HWACCEL_OPTIONS as cs,
|
|
9282
|
+
HealthStatusSchema as ct,
|
|
9283
|
+
HistoryPointSchema as cu,
|
|
9284
|
+
HistoryResolutionEnum as cv,
|
|
9285
|
+
InstalledPackageSchema as cw,
|
|
9286
|
+
IntegrationLiteSchema as cx,
|
|
9287
|
+
IntegrationWithStateSchema as cy,
|
|
9288
|
+
IntercomAbilitySchema as cz,
|
|
9289
|
+
motionTriggerCapability as d,
|
|
9290
|
+
StartEmbeddedInputSchema as d$,
|
|
9291
|
+
NetworkEndpointSchema as d0,
|
|
9292
|
+
NotificationHistoryEntrySchema as d1,
|
|
9293
|
+
NotificationRuleSchema as d2,
|
|
9294
|
+
NotificationSchema as d3,
|
|
9295
|
+
OauthIntegrationDescriptorSchema as d4,
|
|
9296
|
+
ObjectEventSchema as d5,
|
|
9297
|
+
OrchestratorMetricsSchema as d6,
|
|
9298
|
+
OsdOverlayKindEnum as d7,
|
|
9299
|
+
OsdOverlayPatchSchema as d8,
|
|
9300
|
+
OsdOverlaySchema as d9,
|
|
9301
|
+
PtzPresetSchema as dA,
|
|
9302
|
+
PtzStatusSchema as dB,
|
|
9303
|
+
QueryFilterSchema as dC,
|
|
9304
|
+
RegisteredStreamSchema as dD,
|
|
9305
|
+
ReportMotionInputSchema as dE,
|
|
9306
|
+
RtpSourceSchema as dF,
|
|
9307
|
+
RtspRestreamEntrySchema as dG,
|
|
9308
|
+
RunnerCameraConfigSchema as dH,
|
|
9309
|
+
RunnerCameraDeviceUIFields as dI,
|
|
9310
|
+
RunnerLocalLoadSchema as dJ,
|
|
9311
|
+
RunnerLocalMetricsSchema as dK,
|
|
9312
|
+
STORAGE_LOCATION_CARDINALITY as dL,
|
|
9313
|
+
ScopedTokenSchema as dM,
|
|
9314
|
+
ScopedTokenSummarySchema as dN,
|
|
9315
|
+
SearchResultSchema as dO,
|
|
9316
|
+
SegmentSchema as dP,
|
|
9317
|
+
SendEmailInputSchema as dQ,
|
|
9318
|
+
SendEmailResultSchema as dR,
|
|
9319
|
+
SettingsPatchSchema as dS,
|
|
9320
|
+
SettingsRecordSchema as dT,
|
|
9321
|
+
SettingsSchemaWithValuesSchema as dU,
|
|
9322
|
+
SettingsUpdateResultSchema as dV,
|
|
9323
|
+
ShmRingStatsSchema as dW,
|
|
9324
|
+
SmtpStatusSchema as dX,
|
|
9325
|
+
SnapshotImageSchema as dY,
|
|
9326
|
+
SpatialDetectionSchema as dZ,
|
|
9327
|
+
SsoBridgeClaimsSchema as d_,
|
|
9328
|
+
OsdPositionEnum as da,
|
|
9329
|
+
OsdStatusSchema as db,
|
|
9330
|
+
PIPELINE_FLOW_CAPABILITY_NAMES as dc,
|
|
9331
|
+
PIPELINE_OWNER_CAPABILITY_NAMES as dd,
|
|
9332
|
+
PackageUpdateSchema as de,
|
|
9333
|
+
PackageVersionInfoSchema as df,
|
|
9334
|
+
PasskeySummarySchema as dg,
|
|
9335
|
+
PcmSampleFormatSchema as dh,
|
|
9336
|
+
PerScopeBreakdownSchema as di,
|
|
9337
|
+
PipelineAssignmentSchema as dj,
|
|
9338
|
+
PipelineDefaultStepSchema as dk,
|
|
9339
|
+
PipelineEngineChoiceSchema as dl,
|
|
9340
|
+
PipelineRunResultBridge as dm,
|
|
9341
|
+
PipelineStepInputSchema as dn,
|
|
9342
|
+
PlaceholderReasonSchema as dp,
|
|
9343
|
+
PolygonPointSchema as dq,
|
|
9344
|
+
ProfileSlotSchema as dr,
|
|
9345
|
+
ProfileSlotStatusSchema as ds,
|
|
9346
|
+
ProviderStatusSchema as dt,
|
|
9347
|
+
PtzAutotrackRuntimeStateSchema as du,
|
|
9348
|
+
PtzAutotrackSettingsSchema as dv,
|
|
9349
|
+
PtzAutotrackStatusSchema as dw,
|
|
9350
|
+
PtzAutotrackTargetOptionSchema as dx,
|
|
9351
|
+
PtzMoveCommandSchema as dy,
|
|
9352
|
+
PtzPositionSchema as dz,
|
|
9090
9353
|
errMsg as e,
|
|
9091
|
-
|
|
9092
|
-
|
|
9093
|
-
|
|
9094
|
-
|
|
9095
|
-
|
|
9096
|
-
|
|
9097
|
-
|
|
9098
|
-
|
|
9099
|
-
|
|
9100
|
-
|
|
9101
|
-
|
|
9102
|
-
|
|
9103
|
-
|
|
9104
|
-
|
|
9105
|
-
|
|
9106
|
-
|
|
9107
|
-
|
|
9108
|
-
|
|
9109
|
-
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
|
|
9114
|
-
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
9122
|
-
|
|
9123
|
-
|
|
9124
|
-
|
|
9125
|
-
|
|
9126
|
-
|
|
9127
|
-
|
|
9128
|
-
|
|
9129
|
-
|
|
9130
|
-
|
|
9131
|
-
|
|
9132
|
-
|
|
9133
|
-
|
|
9134
|
-
|
|
9135
|
-
|
|
9136
|
-
|
|
9137
|
-
|
|
9138
|
-
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
|
|
9142
|
-
|
|
9143
|
-
|
|
9144
|
-
|
|
9145
|
-
|
|
9354
|
+
event as e$,
|
|
9355
|
+
AbortUploadInputSchema as e0,
|
|
9356
|
+
BeginDownloadInputSchema as e1,
|
|
9357
|
+
BeginDownloadResultSchema as e2,
|
|
9358
|
+
BeginUploadInputSchema as e3,
|
|
9359
|
+
BeginUploadResultSchema as e4,
|
|
9360
|
+
EndDownloadInputSchema as e5,
|
|
9361
|
+
FinalizeUploadInputSchema as e6,
|
|
9362
|
+
StorageLocationRefSchema as e7,
|
|
9363
|
+
StorageLocationSchema as e8,
|
|
9364
|
+
StorageLocationTypeSchema as e9,
|
|
9365
|
+
TopologyServiceSchema as eA,
|
|
9366
|
+
TrackSchema as eB,
|
|
9367
|
+
TrackStateSchema as eC,
|
|
9368
|
+
TrackedDetectionSchema as eD,
|
|
9369
|
+
TurnServerSchema as eE,
|
|
9370
|
+
UpdateIntegrationInputSchema as eF,
|
|
9371
|
+
UpdateUserInputSchema as eG,
|
|
9372
|
+
UserRecordSchema as eH,
|
|
9373
|
+
UserSummarySchema as eI,
|
|
9374
|
+
WELL_KNOWN_TABS as eJ,
|
|
9375
|
+
WELL_KNOWN_TAB_MAP as eK,
|
|
9376
|
+
WebrtcStreamChoiceSchema as eL,
|
|
9377
|
+
WebrtcStreamTargetSchema as eM,
|
|
9378
|
+
WidgetHostEnum as eN,
|
|
9379
|
+
WidgetMetadataSchema as eO,
|
|
9380
|
+
WidgetRemoteSchema as eP,
|
|
9381
|
+
WidgetSizeEnum as eQ,
|
|
9382
|
+
YAMNET_TO_MACRO as eR,
|
|
9383
|
+
ZoneKindEnum as eS,
|
|
9384
|
+
ZoneRuleModeEnum as eT,
|
|
9385
|
+
ZoneRuleSchema as eU,
|
|
9386
|
+
ZoneRuleStageEnum as eV,
|
|
9387
|
+
ZoneRulesArraySchema as eW,
|
|
9388
|
+
ZoneSchema as eX,
|
|
9389
|
+
ZoneScopeBreakdownSchema as eY,
|
|
9390
|
+
accessoryStableId as eZ,
|
|
9391
|
+
deviceMatchesProfile as e_,
|
|
9392
|
+
ProviderInfoSchema as ea,
|
|
9393
|
+
ReadChunkInputSchema as eb,
|
|
9394
|
+
TestLocationResultSchema as ec,
|
|
9395
|
+
WriteChunkInputSchema as ed,
|
|
9396
|
+
StreamFormatSchema as ee,
|
|
9397
|
+
StreamInfoSchema as ef,
|
|
9398
|
+
StreamNetworkStatsSchema as eg,
|
|
9399
|
+
StreamParamsOptionsSchema as eh,
|
|
9400
|
+
StreamParamsStatusSchema as ei,
|
|
9401
|
+
StreamProfileConfigSchema as ej,
|
|
9402
|
+
StreamProfileOptionsSchema as ek,
|
|
9403
|
+
StreamProfilePatchSchema as el,
|
|
9404
|
+
StreamProfileSchema as em,
|
|
9405
|
+
StreamSourceEntrySchema$1 as en,
|
|
9406
|
+
StreamSourceSchema as eo,
|
|
9407
|
+
SubscribeAudioChunksInputSchema as ep,
|
|
9408
|
+
SubscribeAudioChunksResultSchema as eq,
|
|
9409
|
+
SubscribeFramesInputSchema as er,
|
|
9410
|
+
SubscribeFramesResultSchema as es,
|
|
9411
|
+
SwitchStatusSchema as et,
|
|
9412
|
+
SystemMetricsSchema as eu,
|
|
9413
|
+
TestConnectionResultSchema as ev,
|
|
9414
|
+
ToastSchema as ew,
|
|
9415
|
+
TokenScopeSchema as ex,
|
|
9416
|
+
TopologyNodeSchema as ey,
|
|
9417
|
+
TopologyProcessSchema as ez,
|
|
9418
|
+
motionCapability as f,
|
|
9419
|
+
expandCapMethods as f0,
|
|
9420
|
+
getAudioMacroClassIds as f1,
|
|
9421
|
+
isDeviceConfigCap as f2,
|
|
9422
|
+
mapAudioLabelToMacro as f3,
|
|
9423
|
+
method as f4,
|
|
9424
|
+
resolveDeviceProfile as f5,
|
|
9425
|
+
webrtcClientHintsSchema as f6,
|
|
9426
|
+
featureProbeCapability as g,
|
|
9146
9427
|
hydrateSchema as h,
|
|
9147
|
-
|
|
9148
|
-
|
|
9149
|
-
|
|
9150
|
-
|
|
9151
|
-
|
|
9152
|
-
|
|
9153
|
-
|
|
9428
|
+
doorbellCapability as i,
|
|
9429
|
+
deviceStatusCapability as j,
|
|
9430
|
+
deviceDiscoveryCapability as k,
|
|
9431
|
+
cameraStreamsCapability as l,
|
|
9432
|
+
motionZonesCapability as m,
|
|
9433
|
+
brightnessCapability as n,
|
|
9434
|
+
batteryCapability as o,
|
|
9154
9435
|
ptzAutotrackCapability as p,
|
|
9155
|
-
|
|
9156
|
-
|
|
9436
|
+
audioMetricsCapability as q,
|
|
9437
|
+
deviceProviderCapability as r,
|
|
9157
9438
|
switchCapability as s,
|
|
9158
|
-
|
|
9159
|
-
|
|
9160
|
-
|
|
9161
|
-
|
|
9162
|
-
|
|
9163
|
-
|
|
9439
|
+
accessoriesCapability as t,
|
|
9440
|
+
addonPagesCapability as u,
|
|
9441
|
+
addonPagesSourceCapability as v,
|
|
9442
|
+
addonRoutesCapability as w,
|
|
9443
|
+
addonSettingsCapability as x,
|
|
9444
|
+
addonWidgetsCapability as y,
|
|
9164
9445
|
zonesCapability as z
|
|
9165
9446
|
};
|
|
9166
|
-
//# sourceMappingURL=index-
|
|
9447
|
+
//# sourceMappingURL=index-CgPd35k5.mjs.map
|