@camstack/types 1.2.356 → 1.2.358
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +5 -1
- package/dist/addon.mjs +5 -1
- package/dist/capabilities/battery.cap.d.ts +4 -0
- package/dist/capabilities/index.d.ts +4 -4
- package/dist/capabilities/nodes.cap.d.ts +2 -0
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts +49 -0
- package/dist/capabilities/stream-broker.cap.d.ts +32 -0
- package/dist/client.js +11 -1
- package/dist/client.mjs +11 -1
- package/dist/generated/addon-api.d.ts +21 -0
- package/dist/generated/addon-cap-facts.d.ts +1 -1
- package/dist/generated/device-proxy.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +2 -2
- package/dist/generated/system-proxy.d.ts +1 -1
- package/dist/index.js +122 -15
- package/dist/index.mjs +121 -16
- package/dist/interfaces/event-bus.d.ts +6 -0
- package/dist/{sleep-vWTnHq9G.mjs → sleep-B_3F_YwS.mjs} +2 -0
- package/dist/{sleep-BFVY4_xY.js → sleep-CEqsJkV5.js} +2 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sleep = require("./sleep-
|
|
2
|
+
const require_sleep = require("./sleep-CEqsJkV5.js");
|
|
3
3
|
const require_event_category = require("./event-category-T43rdQWR.js");
|
|
4
4
|
const require_composition = require("./composition-DCYnv4I6.js");
|
|
5
5
|
const require_node_color = require("./node-color.js");
|
|
@@ -9260,6 +9260,16 @@ var BrokerClientsSchema = zod.z.object({
|
|
|
9260
9260
|
/** Total encoded + raw-RTP callback subscriber count (sum of `encoded[].length`). */
|
|
9261
9261
|
encodedSubscribers: zod.z.number()
|
|
9262
9262
|
});
|
|
9263
|
+
/**
|
|
9264
|
+
* How many people are watching one camera LIVE right now — see
|
|
9265
|
+
* `getLiveViewerCounts`. A camera with nobody watching is absent from the list
|
|
9266
|
+
* (so `viewers` is always at least 1): the listing carries the cameras that
|
|
9267
|
+
* have viewers, never a row of zeros.
|
|
9268
|
+
*/
|
|
9269
|
+
var LiveViewerCountSchema = zod.z.object({
|
|
9270
|
+
deviceId: zod.z.number().int().nonnegative(),
|
|
9271
|
+
viewers: zod.z.number().int().positive()
|
|
9272
|
+
});
|
|
9263
9273
|
var PlaceholderReasonSchema = zod.z.enum([
|
|
9264
9274
|
"reconnecting",
|
|
9265
9275
|
"sleeping",
|
|
@@ -9743,6 +9753,24 @@ var streamBrokerCapability = {
|
|
|
9743
9753
|
auth: "admin"
|
|
9744
9754
|
}),
|
|
9745
9755
|
listClients: require_sleep.method(zod.z.object({ brokerId: zod.z.string() }), BrokerClientsSchema),
|
|
9756
|
+
/**
|
|
9757
|
+
* People watching each camera LIVE right now, for every camera at once —
|
|
9758
|
+
* cheap enough to poll (a walk of the live session maps, no I/O).
|
|
9759
|
+
*
|
|
9760
|
+
* Counts EXTERNAL viewers only: WebRTC sessions of a viewer kind
|
|
9761
|
+
* (`webrtc-browser` / `-mobile` / `-whep`, `alexa`, `homekit`) that are on
|
|
9762
|
+
* the live edge, plus RTSP restream clients from outside that are playing.
|
|
9763
|
+
* The system's own consumers are never counted: the detection decoder, the
|
|
9764
|
+
* recorder, snapshots, the prebuffer hold, audio analysis, and the RTSP
|
|
9765
|
+
* dials an agent's derived broker makes. One WebRTC session or RTSP
|
|
9766
|
+
* connection is one viewer, so two tabs on one camera read 2.
|
|
9767
|
+
*
|
|
9768
|
+
* The count is read off the live session maps at call time, so a session
|
|
9769
|
+
* that ends — cleanly or by the peer vanishing — stops counting with no
|
|
9770
|
+
* counter to leak. It covers the sessions THIS provider serves; a node
|
|
9771
|
+
* with its own stream-broker is asked with a `nodeId` pin.
|
|
9772
|
+
*/
|
|
9773
|
+
getLiveViewerCounts: require_sleep.method(zod.z.void(), zod.z.array(LiveViewerCountSchema).readonly()),
|
|
9746
9774
|
killClient: require_sleep.method(zod.z.object({
|
|
9747
9775
|
brokerId: zod.z.string(),
|
|
9748
9776
|
channel: zod.z.enum(["rtsp", "audio"]),
|
|
@@ -30249,19 +30277,6 @@ var RunnerCameraDeviceUIFields = [
|
|
|
30249
30277
|
label: MOTION_SOURCE_LABELS[value]
|
|
30250
30278
|
})
|
|
30251
30279
|
},
|
|
30252
|
-
{
|
|
30253
|
-
key: "detectionSources",
|
|
30254
|
-
type: "multiselect",
|
|
30255
|
-
label: "Detection Sources",
|
|
30256
|
-
default: ["pipeline"],
|
|
30257
|
-
options: [{
|
|
30258
|
-
value: "pipeline",
|
|
30259
|
-
label: "This node (ML root step on decoded frames)"
|
|
30260
|
-
}, {
|
|
30261
|
-
value: "onboard",
|
|
30262
|
-
label: "Camera onboard AI (replaces the root step when picked alone)"
|
|
30263
|
-
}]
|
|
30264
|
-
},
|
|
30265
30280
|
{
|
|
30266
30281
|
key: "motionFps",
|
|
30267
30282
|
type: "slider",
|
|
@@ -30952,6 +30967,12 @@ var CameraStepOverridePatchSchema = zod.z.object({
|
|
|
30952
30967
|
settings: zod.z.record(zod.z.string(), zod.z.unknown()).readonly().optional()
|
|
30953
30968
|
});
|
|
30954
30969
|
var CameraStepSettingsSchema = zod.z.record(zod.z.string(), zod.z.record(zod.z.string(), zod.z.unknown()).readonly());
|
|
30970
|
+
/** The three root-detector choices a camera has (D507: at most one root). */
|
|
30971
|
+
var CameraDetectionSourceSchema = zod.z.enum([
|
|
30972
|
+
"pipeline",
|
|
30973
|
+
"onboard",
|
|
30974
|
+
"none"
|
|
30975
|
+
]);
|
|
30955
30976
|
var CameraPipelineSettingsSchema = zod.z.object({
|
|
30956
30977
|
stepToggles: zod.z.record(zod.z.string(), zod.z.boolean()).optional(),
|
|
30957
30978
|
stepSettings: CameraStepSettingsSchema.optional(),
|
|
@@ -31896,6 +31917,41 @@ var pipelineOrchestratorCapability = {
|
|
|
31896
31917
|
kind: "mutation",
|
|
31897
31918
|
auth: "admin"
|
|
31898
31919
|
}),
|
|
31920
|
+
/**
|
|
31921
|
+
* Where this camera's first-level detections come from: this node's own
|
|
31922
|
+
* root step (`pipeline`), the camera's onboard detector alone (`onboard`),
|
|
31923
|
+
* or no root detector (`none`). A camera runs at most one root detector
|
|
31924
|
+
* (D507), so there is no "both". Read from the camera's stored
|
|
31925
|
+
* `detectionSources` — the one authority; `explicit` is false while the
|
|
31926
|
+
* operator has never picked and the default stands.
|
|
31927
|
+
*/
|
|
31928
|
+
getCameraDetectionSource: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), zod.z.object({
|
|
31929
|
+
source: CameraDetectionSourceSchema,
|
|
31930
|
+
explicit: zod.z.boolean(),
|
|
31931
|
+
onboard: zod.z.object({
|
|
31932
|
+
/** The camera has an onboard detector this system can read. */
|
|
31933
|
+
available: zod.z.boolean(),
|
|
31934
|
+
/** What its detections carry — a camera with no box cannot be a root step. */
|
|
31935
|
+
geometry: zod.z.enum([
|
|
31936
|
+
"boxed",
|
|
31937
|
+
"while-streaming",
|
|
31938
|
+
"flag-only",
|
|
31939
|
+
"unknown"
|
|
31940
|
+
])
|
|
31941
|
+
})
|
|
31942
|
+
})),
|
|
31943
|
+
/**
|
|
31944
|
+
* Pick where this camera's detections come from. Writes `detectionSources`
|
|
31945
|
+
* and arms (or disarms) the vendor's boxed sub-stream that the choice
|
|
31946
|
+
* drives. Refuses `onboard` on a camera with no onboard detector.
|
|
31947
|
+
*/
|
|
31948
|
+
setCameraDetectionSource: require_sleep.method(zod.z.object({
|
|
31949
|
+
deviceId: zod.z.number(),
|
|
31950
|
+
source: CameraDetectionSourceSchema
|
|
31951
|
+
}), zod.z.object({ success: zod.z.literal(true) }), {
|
|
31952
|
+
kind: "mutation",
|
|
31953
|
+
auth: "admin"
|
|
31954
|
+
}),
|
|
31899
31955
|
/** Read every per-(node,device) override map for a device. Null when device has no overrides. */
|
|
31900
31956
|
getCameraStepOverrides: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), zod.z.record(zod.z.string(), zod.z.record(zod.z.string(), zod.z.record(zod.z.string(), CameraStepOverridePatchSchema))).nullable()),
|
|
31901
31957
|
/**
|
|
@@ -37086,6 +37142,17 @@ var BatteryStatusSchema = zod.z.object({
|
|
|
37086
37142
|
*/
|
|
37087
37143
|
lastContactAt: zod.z.number().optional(),
|
|
37088
37144
|
/**
|
|
37145
|
+
* Ms epoch of the last COMPLETE scheduled refresh — every fact the provider
|
|
37146
|
+
* holds for the device (level, charging, link, device info, state slices) and
|
|
37147
|
+
* its cached snapshot, read together. Absent = never since this slice was
|
|
37148
|
+
* born. Unlike `lastUpdated` (any write, even a push of one field) this is
|
|
37149
|
+
* the staleness an operator can trust: the provider owns the device fact and
|
|
37150
|
+
* so owns the window on its age (D224, D847). Not a clock in the
|
|
37151
|
+
* runtime-state-durability sense: it moves once per window and must survive
|
|
37152
|
+
* a restart, or every restart would owe the camera a wake.
|
|
37153
|
+
*/
|
|
37154
|
+
lastFullRefreshAt: zod.z.number().optional(),
|
|
37155
|
+
/**
|
|
37089
37156
|
* True when the source is a BINARY low-battery indicator (HA
|
|
37090
37157
|
* `binary_sensor` device_class=battery / `LOW_BAT`) that has no real
|
|
37091
37158
|
* charge level — `percentage` is then a coarse stand-in (100 = normal,
|
|
@@ -42494,7 +42561,14 @@ var TopologyNodeSchema = zod.z.object({
|
|
|
42494
42561
|
* completed a mutual-TLS handshake, `clear` otherwise. Absent for the hub,
|
|
42495
42562
|
* for offline rows and when the hub cannot tell.
|
|
42496
42563
|
*/
|
|
42497
|
-
meshTransport: zod.z.enum(["tls", "clear"]).optional()
|
|
42564
|
+
meshTransport: zod.z.enum(["tls", "clear"]).optional(),
|
|
42565
|
+
/**
|
|
42566
|
+
* Whether the hub holds this online AGENT's capability registration (its
|
|
42567
|
+
* `registerNode` manifest). `false` = online in the mesh but not ready: the
|
|
42568
|
+
* hub dropped the registration on a disconnect only it saw and the agent has
|
|
42569
|
+
* not re-sent it. Absent for the hub and offline rows.
|
|
42570
|
+
*/
|
|
42571
|
+
capabilitiesRegistered: zod.z.boolean().optional()
|
|
42498
42572
|
});
|
|
42499
42573
|
var CapUsageEdgeSchema = zod.z.object({
|
|
42500
42574
|
callerAddonId: zod.z.string(),
|
|
@@ -59183,6 +59257,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
59183
59257
|
addonId: null,
|
|
59184
59258
|
access: "view"
|
|
59185
59259
|
},
|
|
59260
|
+
"pipelineOrchestrator.getCameraDetectionSource": {
|
|
59261
|
+
capName: "pipeline-orchestrator",
|
|
59262
|
+
capScope: "system",
|
|
59263
|
+
addonId: null,
|
|
59264
|
+
access: "view"
|
|
59265
|
+
},
|
|
59186
59266
|
"pipelineOrchestrator.getCameraMetrics": {
|
|
59187
59267
|
capName: "pipeline-orchestrator",
|
|
59188
59268
|
capScope: "system",
|
|
@@ -59411,6 +59491,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
59411
59491
|
addonId: null,
|
|
59412
59492
|
access: "create"
|
|
59413
59493
|
},
|
|
59494
|
+
"pipelineOrchestrator.setCameraDetectionSource": {
|
|
59495
|
+
capName: "pipeline-orchestrator",
|
|
59496
|
+
capScope: "system",
|
|
59497
|
+
addonId: null,
|
|
59498
|
+
access: "create"
|
|
59499
|
+
},
|
|
59414
59500
|
"pipelineOrchestrator.setCameraPipelineForAgent": {
|
|
59415
59501
|
capName: "pipeline-orchestrator",
|
|
59416
59502
|
capScope: "system",
|
|
@@ -60863,6 +60949,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
60863
60949
|
addonId: null,
|
|
60864
60950
|
access: "view"
|
|
60865
60951
|
},
|
|
60952
|
+
"streamBroker.getLiveViewerCounts": {
|
|
60953
|
+
capName: "stream-broker",
|
|
60954
|
+
capScope: "system",
|
|
60955
|
+
addonId: null,
|
|
60956
|
+
access: "view"
|
|
60957
|
+
},
|
|
60866
60958
|
"streamBroker.getPreBufferInfo": {
|
|
60867
60959
|
capName: "stream-broker",
|
|
60868
60960
|
capScope: "system",
|
|
@@ -68418,6 +68510,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
|
|
|
68418
68510
|
form: "single",
|
|
68419
68511
|
optional: false
|
|
68420
68512
|
}],
|
|
68513
|
+
"pipelineOrchestrator.getCameraDetectionSource": [{
|
|
68514
|
+
name: "deviceId",
|
|
68515
|
+
form: "single",
|
|
68516
|
+
optional: false
|
|
68517
|
+
}],
|
|
68421
68518
|
"pipelineOrchestrator.getCameraMetrics": [{
|
|
68422
68519
|
name: "deviceId",
|
|
68423
68520
|
form: "single",
|
|
@@ -68478,6 +68575,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
|
|
|
68478
68575
|
form: "single",
|
|
68479
68576
|
optional: false
|
|
68480
68577
|
}],
|
|
68578
|
+
"pipelineOrchestrator.setCameraDetectionSource": [{
|
|
68579
|
+
name: "deviceId",
|
|
68580
|
+
form: "single",
|
|
68581
|
+
optional: false
|
|
68582
|
+
}],
|
|
68481
68583
|
"pipelineOrchestrator.setCameraPipelineForAgent": [{
|
|
68482
68584
|
name: "deviceId",
|
|
68483
68585
|
form: "single",
|
|
@@ -69472,6 +69574,7 @@ var SYSTEM_SCOPE_DEVICE_METHODS = [
|
|
|
69472
69574
|
"pipelineOrchestrator.assignAudio",
|
|
69473
69575
|
"pipelineOrchestrator.assignPipeline",
|
|
69474
69576
|
"pipelineOrchestrator.getAudioAssignment",
|
|
69577
|
+
"pipelineOrchestrator.getCameraDetectionSource",
|
|
69475
69578
|
"pipelineOrchestrator.getCameraMetrics",
|
|
69476
69579
|
"pipelineOrchestrator.getCameraSettings",
|
|
69477
69580
|
"pipelineOrchestrator.getCameraStatus",
|
|
@@ -69484,6 +69587,7 @@ var SYSTEM_SCOPE_DEVICE_METHODS = [
|
|
|
69484
69587
|
"pipelineOrchestrator.getPipelineDevicePin",
|
|
69485
69588
|
"pipelineOrchestrator.requestOccupancyLook",
|
|
69486
69589
|
"pipelineOrchestrator.resolvePipeline",
|
|
69590
|
+
"pipelineOrchestrator.setCameraDetectionSource",
|
|
69487
69591
|
"pipelineOrchestrator.setCameraPipelineForAgent",
|
|
69488
69592
|
"pipelineOrchestrator.setCameraSensors",
|
|
69489
69593
|
"pipelineOrchestrator.setCameraStepOverride",
|
|
@@ -70665,6 +70769,7 @@ function createSystemProxy(api) {
|
|
|
70665
70769
|
getBrokerStats: (input) => dispatch("streamBroker", "getBrokerStats", "query", input),
|
|
70666
70770
|
probeStream: (input) => dispatch("streamBroker", "probeStream", "mutation", input),
|
|
70667
70771
|
listClients: (input) => dispatch("streamBroker", "listClients", "query", input),
|
|
70772
|
+
getLiveViewerCounts: (input) => dispatch("streamBroker", "getLiveViewerCounts", "query", input),
|
|
70668
70773
|
killClient: (input) => dispatch("streamBroker", "killClient", "mutation", input),
|
|
70669
70774
|
getStreamUrl: (input) => dispatch("streamBroker", "getStreamUrl", "query", input),
|
|
70670
70775
|
getStreamWithCodec: (input) => dispatch("streamBroker", "getStreamWithCodec", "mutation", input),
|
|
@@ -79442,6 +79547,7 @@ exports.CameraDecoderStatusSchema = CameraDecoderStatusSchema;
|
|
|
79442
79547
|
exports.CameraDetectionPhaseSchema = CameraDetectionPhaseSchema;
|
|
79443
79548
|
exports.CameraDetectionProvisioningSchema = CameraDetectionProvisioningSchema;
|
|
79444
79549
|
exports.CameraDetectionProvisioningStateSchema = CameraDetectionProvisioningStateSchema;
|
|
79550
|
+
exports.CameraDetectionSourceSchema = CameraDetectionSourceSchema;
|
|
79445
79551
|
exports.CameraDetectionStatusSchema = CameraDetectionStatusSchema;
|
|
79446
79552
|
exports.CameraMetricsSchema = CameraMetricsSchema;
|
|
79447
79553
|
exports.CameraMetricsWithDeviceIdSchema = CameraMetricsWithDeviceIdSchema;
|
|
@@ -79920,6 +80026,7 @@ exports.LinkedDevicesSlotValueSchema = LinkedDevicesSlotValueSchema;
|
|
|
79920
80026
|
exports.ListNodeBenchmarkResultsInputSchema = ListNodeBenchmarkResultsInputSchema;
|
|
79921
80027
|
exports.ListTrackRelationsInputSchema = ListTrackRelationsInputSchema;
|
|
79922
80028
|
exports.ListTrackRelationsResultSchema = ListTrackRelationsResultSchema;
|
|
80029
|
+
exports.LiveViewerCountSchema = LiveViewerCountSchema;
|
|
79923
80030
|
exports.LlmDefaultSchema = LlmDefaultSchema;
|
|
79924
80031
|
exports.LlmDefaultSelectorSchema = LlmDefaultSelectorSchema;
|
|
79925
80032
|
exports.LlmDownloadProgressSchema = LlmDownloadProgressSchema;
|