@camstack/addon-model-studio 1.0.15 → 1.0.17

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.
@@ -4661,7 +4661,7 @@ function _instanceof(cls, params = {}) {
4661
4661
  return inst;
4662
4662
  }
4663
4663
  //#endregion
4664
- //#region ../types/dist/sleep-BiDFW0E7.mjs
4664
+ //#region ../types/dist/sleep-CZDdRBua.mjs
4665
4665
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4666
4666
  EventCategory["SystemBoot"] = "system.boot";
4667
4667
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -7257,7 +7257,16 @@ var DecoderStatsSchema = object({
7257
7257
  inputFps: number(),
7258
7258
  outputFps: number(),
7259
7259
  avgDecodeTimeMs: number(),
7260
- droppedFrames: number()
7260
+ droppedFrames: number(),
7261
+ /**
7262
+ * Pull-mode adaptive-fps telemetry (optional — only pull sessions run the
7263
+ * lag-driven controller; push sessions omit these). `lagMs` is the EWMA of
7264
+ * the decoder's real-time drift (rising = falling behind live); `adaptiveFps`
7265
+ * is the current lag-throttled emit rate (≤ `effectiveFps` ceiling).
7266
+ */
7267
+ lagMs: number().optional(),
7268
+ effectiveFps: number().optional(),
7269
+ adaptiveFps: number().optional()
7261
7270
  });
7262
7271
  var DecoderSessionConfigSchema = object({
7263
7272
  codec: string(),
@@ -7298,7 +7307,15 @@ var DecoderSessionConfigSchema = object({
7298
7307
  * other — `pullFrames` returns nothing for an `'shm'` session and
7299
7308
  * `pullHandles` returns nothing for a `'callback'` session.
7300
7309
  */
7301
- frameSink: _enum(["callback", "shm"]).default("callback")
7310
+ frameSink: _enum(["callback", "shm"]).default("callback"),
7311
+ /**
7312
+ * Per-camera decoder DEBUG facility. When `true`, a pull-mode session emits
7313
+ * a throttled (~1Hz) structured `decoder debug` line (effective/adaptive fps,
7314
+ * real-time lag, dropped-frame delta, avg decode time, hwaccel). Mirrors the
7315
+ * stream-broker's `streamingDebug` gate — off by default so production logs
7316
+ * stay quiet and the emit path pays zero per-frame cost when disabled.
7317
+ */
7318
+ debug: boolean().optional()
7302
7319
  });
7303
7320
  var EncodeProfileSchema = object({
7304
7321
  video: object({
@@ -9486,6 +9503,75 @@ DeviceType.Cover, method(object({ deviceId: number().int().nonnegative() }), _vo
9486
9503
  auth: "admin"
9487
9504
  });
9488
9505
  /**
9506
+ * Vendor-neutral day/night (IR-cut) control — the per-camera config cap
9507
+ * shared by reolink / hikvision / amcrest. Models the common firmware
9508
+ * surface: the IR-cut switching MODE plus the two knobs that gate it
9509
+ * (photocell `sensitivity` + `switchDelaySec`). Each vendor maps these
9510
+ * onto its own ISAPI / Baichuan / Dahua-CGI fields; the cap standardises
9511
+ * the shape so ONE derived-form renders every camera.
9512
+ *
9513
+ * Follows the D14 `deviceConfig` archetype (see `stream-params.cap.ts`):
9514
+ * `getOptions` advertises per-camera availability, `getStatus` (auto-
9515
+ * injected from `status`) reports the live values, and a single
9516
+ * `setSettings` mutation applies a partial change. No hand-written
9517
+ * settings-contribution methods — the framework derives the UI + save
9518
+ * routing from this surface.
9519
+ */
9520
+ /** IR-cut switching mode. `schedule` = time-of-day table configured on the camera. */
9521
+ var DayNightModeSchema = _enum([
9522
+ "auto",
9523
+ "day",
9524
+ "night",
9525
+ "schedule"
9526
+ ]);
9527
+ /** Normalized numeric range descriptor — `{ min, max, step }` per the
9528
+ * getOptions availability convention. Normalized values are 0–100. */
9529
+ var NormalizedRangeSchema$1 = object({
9530
+ min: number(),
9531
+ max: number(),
9532
+ step: number()
9533
+ });
9534
+ object({
9535
+ mode: DayNightModeSchema,
9536
+ /** IR-cut trigger sensitivity, NORMALIZED 0–100 (higher = switches to night sooner). */
9537
+ sensitivity: number().optional(),
9538
+ /** Delay before the IR-cut filter flips, in seconds. */
9539
+ switchDelaySec: number().optional(),
9540
+ lastFetchedAt: number()
9541
+ });
9542
+ /**
9543
+ * Per-camera availability descriptor — drives which controls the admin UI
9544
+ * renders. Booleans as `supportsX`; numeric ranges as `{ min, max, step }`
9545
+ * (normalized 0–100); the mode choice-set as an array. A provider returns
9546
+ * honest, camera-probed values — never hardcoded.
9547
+ */
9548
+ var DayNightOptionsSchema = object({
9549
+ /** Modes this camera accepts. Empty → the camera has no configurable day/night mode. */
9550
+ modes: array(DayNightModeSchema),
9551
+ supportsSensitivity: boolean(),
9552
+ /** Present when `supportsSensitivity` — the normalized 0–100 range. */
9553
+ sensitivity: NormalizedRangeSchema$1.optional(),
9554
+ supportsSwitchDelay: boolean(),
9555
+ /** Present when `supportsSwitchDelay` — the allowed delay range in seconds. */
9556
+ switchDelaySec: NormalizedRangeSchema$1.optional()
9557
+ });
9558
+ /**
9559
+ * Partial change to the day/night config — every field optional. A
9560
+ * provider ignores fields it does not support.
9561
+ */
9562
+ var DayNightSettingsPatchSchema = object({
9563
+ mode: DayNightModeSchema.optional(),
9564
+ sensitivity: number().optional(),
9565
+ switchDelaySec: number().optional()
9566
+ });
9567
+ DeviceType.Camera, method(object({ deviceId: number() }), DayNightOptionsSchema), method(object({
9568
+ deviceId: number(),
9569
+ settings: DayNightSettingsPatchSchema
9570
+ }), _void(), {
9571
+ kind: "mutation",
9572
+ auth: "admin"
9573
+ });
9574
+ /**
9489
9575
  * Identity envelope for a device's upstream-system metadata.
9490
9576
  *
9491
9577
  * Two jobs:
@@ -9841,6 +9927,130 @@ object({
9841
9927
  });
9842
9928
  DeviceType.Image;
9843
9929
  /**
9930
+ * Vendor-neutral image / picture-adjustment cap — the per-camera config
9931
+ * cap shared by reolink / hikvision / amcrest. Models the common ISP
9932
+ * surface: the four picture sliders (brightness / contrast / saturation /
9933
+ * sharpness), orientation (mirror / flip / rotate), white-balance,
9934
+ * exposure and backlight-compensation modes.
9935
+ *
9936
+ * NORMALIZATION: every slider is a normalized int 0–100. Vendors expose
9937
+ * these natively as 0–100 or 0–255 (or other ranges); each provider maps
9938
+ * its native range to/from this normalized 0–100 space so the cap surface
9939
+ * (and the derived form) is identical across cameras. `warmth` (manual
9940
+ * white-balance) is likewise normalized 0–100.
9941
+ *
9942
+ * Follows the D14 `deviceConfig` archetype (see `stream-params.cap.ts`):
9943
+ * `getOptions` advertises per-camera availability, `getStatus` (auto-
9944
+ * injected from `status`) reports the live values, and a single
9945
+ * `setSettings` mutation applies a partial change. No hand-written
9946
+ * settings-contribution methods — the framework derives the UI + save
9947
+ * routing from this surface.
9948
+ */
9949
+ /** Sensor/image rotation, degrees clockwise. */
9950
+ var ImageRotateSchema = _enum([
9951
+ "0",
9952
+ "90",
9953
+ "180",
9954
+ "270"
9955
+ ]);
9956
+ /** White-balance mode. `manual` unlocks the normalized `warmth` knob. */
9957
+ var WhiteBalanceModeSchema = _enum(["auto", "manual"]);
9958
+ /** Exposure mode. */
9959
+ var ExposureModeSchema = _enum(["auto", "manual"]);
9960
+ /**
9961
+ * Backlight-compensation mode:
9962
+ * - `off` — disabled
9963
+ * - `blc` — backlight compensation
9964
+ * - `wdr` — wide dynamic range
9965
+ * - `hlc` — highlight compensation
9966
+ */
9967
+ var BacklightModeSchema = _enum([
9968
+ "off",
9969
+ "blc",
9970
+ "wdr",
9971
+ "hlc"
9972
+ ]);
9973
+ /** Normalized numeric range descriptor — `{ min, max, step }` per the
9974
+ * getOptions availability convention. Slider values are normalized 0–100. */
9975
+ var NormalizedRangeSchema = object({
9976
+ min: number(),
9977
+ max: number(),
9978
+ step: number()
9979
+ });
9980
+ object({
9981
+ /** Normalized 0–100. */
9982
+ brightness: number().optional(),
9983
+ /** Normalized 0–100. */
9984
+ contrast: number().optional(),
9985
+ /** Normalized 0–100. */
9986
+ saturation: number().optional(),
9987
+ /** Normalized 0–100. */
9988
+ sharpness: number().optional(),
9989
+ mirror: boolean().optional(),
9990
+ flip: boolean().optional(),
9991
+ rotate: ImageRotateSchema.optional(),
9992
+ whiteBalance: WhiteBalanceModeSchema.optional(),
9993
+ /** Manual white-balance warmth, NORMALIZED 0–100. Meaningful only when `whiteBalance === 'manual'`. */
9994
+ warmth: number().optional(),
9995
+ exposureMode: ExposureModeSchema.optional(),
9996
+ backlightMode: BacklightModeSchema.optional(),
9997
+ lastFetchedAt: number()
9998
+ });
9999
+ /**
10000
+ * Per-camera availability descriptor — drives which controls the admin UI
10001
+ * renders. Booleans as `supportsX`; numeric ranges as `{ min, max, step }`
10002
+ * (the normalized 0–100 range); enums as arrays of supported values (empty
10003
+ * array → control hidden). A provider returns honest, camera-probed values
10004
+ * — never hardcoded.
10005
+ */
10006
+ var ImageSettingsOptionsSchema = object({
10007
+ supportsBrightness: boolean(),
10008
+ brightness: NormalizedRangeSchema.optional(),
10009
+ supportsContrast: boolean(),
10010
+ contrast: NormalizedRangeSchema.optional(),
10011
+ supportsSaturation: boolean(),
10012
+ saturation: NormalizedRangeSchema.optional(),
10013
+ supportsSharpness: boolean(),
10014
+ sharpness: NormalizedRangeSchema.optional(),
10015
+ supportsMirror: boolean(),
10016
+ supportsFlip: boolean(),
10017
+ /** Supported rotation values. Empty → rotation not configurable. */
10018
+ rotateOptions: array(ImageRotateSchema),
10019
+ /** Supported white-balance modes. Empty → white-balance not configurable. */
10020
+ whiteBalanceModes: array(WhiteBalanceModeSchema),
10021
+ supportsWarmth: boolean(),
10022
+ /** Present when `supportsWarmth` — the normalized 0–100 range. */
10023
+ warmth: NormalizedRangeSchema.optional(),
10024
+ /** Supported exposure modes. Empty → exposure not configurable. */
10025
+ exposureModes: array(ExposureModeSchema),
10026
+ /** Supported backlight modes. Empty → backlight-compensation not configurable. */
10027
+ backlightModes: array(BacklightModeSchema)
10028
+ });
10029
+ /**
10030
+ * Partial change to the image config — every field optional. Slider values
10031
+ * are normalized 0–100. A provider ignores fields it does not support.
10032
+ */
10033
+ var ImageSettingsPatchSchema = object({
10034
+ brightness: number().optional(),
10035
+ contrast: number().optional(),
10036
+ saturation: number().optional(),
10037
+ sharpness: number().optional(),
10038
+ mirror: boolean().optional(),
10039
+ flip: boolean().optional(),
10040
+ rotate: ImageRotateSchema.optional(),
10041
+ whiteBalance: WhiteBalanceModeSchema.optional(),
10042
+ warmth: number().optional(),
10043
+ exposureMode: ExposureModeSchema.optional(),
10044
+ backlightMode: BacklightModeSchema.optional()
10045
+ });
10046
+ DeviceType.Camera, method(object({ deviceId: number() }), ImageSettingsOptionsSchema), method(object({
10047
+ deviceId: number(),
10048
+ settings: ImageSettingsPatchSchema
10049
+ }), _void(), {
10050
+ kind: "mutation",
10051
+ auth: "admin"
10052
+ });
10053
+ /**
9844
10054
  * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
9845
10055
  * with a mowing lifecycle plus a dock action.
9846
10056
  *
@@ -10735,6 +10945,16 @@ var RunnerCameraConfigSchema = object({
10735
10945
  * this gate is bypassed.
10736
10946
  */
10737
10947
  onboardMotionDrivesAnalyzer: boolean().default(true),
10948
+ /**
10949
+ * Master toggle for the occupancy re-check. When `false` (DEFAULT) the runner
10950
+ * never arms the periodic recheck timer, regardless of `occupancyRecheckSec` —
10951
+ * this is off by default because the recheck re-subscribes a detection session
10952
+ * every N seconds while `watching`, a major source of pull-decoder re-dial
10953
+ * churn (each cycle creates+tears a session → RTSP re-dial → latency). The
10954
+ * `occupancyRecheckSec` / `occupancyRecheckFrames` sliders only take effect
10955
+ * (and only render) when this is enabled.
10956
+ */
10957
+ occupancyRecheckEnabled: boolean().default(false),
10738
10958
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
10739
10959
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
10740
10960
  /**
@@ -13064,7 +13284,9 @@ method(object({ codec: string() }), boolean()), method(_void(), object({
13064
13284
  id: string(),
13065
13285
  name: string(),
13066
13286
  isPullMode: boolean().optional(),
13067
- priority: number().optional()
13287
+ priority: number().optional(),
13288
+ hwaccel: string().optional(),
13289
+ probedBestHwaccel: string().optional()
13068
13290
  })), method(DecoderSessionConfigSchema, object({
13069
13291
  sessionId: string(),
13070
13292
  nodeId: string()
@@ -14984,7 +15206,17 @@ var AgentAddonConfigSchema = object({
14984
15206
  });
14985
15207
  var AgentPipelineSettingsSchema = object({
14986
15208
  addonDefaults: record(string(), AgentAddonConfigSchema).readonly(),
14987
- maxCameras: number().int().nonnegative().nullable().default(null)
15209
+ maxCameras: number().int().nonnegative().nullable().default(null),
15210
+ /** Per-node detection weight (relative share for the quota balancer). */
15211
+ detectWeight: number().positive().optional(),
15212
+ /** Node is eligible to run the detection pipeline (decode + inference). */
15213
+ detect: boolean().optional(),
15214
+ /** Node is eligible to host decoder sessions. */
15215
+ decode: boolean().optional(),
15216
+ /** Node is eligible to run audio-analyzer sessions. */
15217
+ audio: boolean().optional(),
15218
+ /** Node is eligible to be the ingest / source-owner (serve the restream). */
15219
+ ingest: boolean().optional()
14988
15220
  });
14989
15221
  var CameraPipelineForAgentSchema = object({
14990
15222
  steps: array(PipelineStepInputSchema).readonly(),
@@ -15290,6 +15522,21 @@ method(object({
15290
15522
  }), object({ success: literal(true) }), {
15291
15523
  kind: "mutation",
15292
15524
  auth: "admin"
15525
+ }), method(object({
15526
+ agentNodeId: string(),
15527
+ detectWeight: number().positive().nullable()
15528
+ }), object({ success: literal(true) }), {
15529
+ kind: "mutation",
15530
+ auth: "admin"
15531
+ }), method(object({
15532
+ agentNodeId: string(),
15533
+ detect: boolean().nullable().optional(),
15534
+ decode: boolean().nullable().optional(),
15535
+ audio: boolean().nullable().optional(),
15536
+ ingest: boolean().nullable().optional()
15537
+ }), object({ success: literal(true) }), {
15538
+ kind: "mutation",
15539
+ auth: "admin"
15293
15540
  }), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
15294
15541
  deviceId: number(),
15295
15542
  addonId: string(),
@@ -19037,6 +19284,18 @@ Object.freeze({
19037
19284
  addonId: null,
19038
19285
  access: "view"
19039
19286
  },
19287
+ "dayNight.getOptions": {
19288
+ capName: "day-night",
19289
+ capScope: "device",
19290
+ addonId: null,
19291
+ access: "view"
19292
+ },
19293
+ "dayNight.setSettings": {
19294
+ capName: "day-night",
19295
+ capScope: "device",
19296
+ addonId: null,
19297
+ access: "create"
19298
+ },
19040
19299
  "decoder.createSession": {
19041
19300
  capName: "decoder",
19042
19301
  capScope: "system",
@@ -19967,6 +20226,18 @@ Object.freeze({
19967
20226
  addonId: null,
19968
20227
  access: "create"
19969
20228
  },
20229
+ "imageSettings.getOptions": {
20230
+ capName: "image-settings",
20231
+ capScope: "device",
20232
+ addonId: null,
20233
+ access: "view"
20234
+ },
20235
+ "imageSettings.setSettings": {
20236
+ capName: "image-settings",
20237
+ capScope: "device",
20238
+ addonId: null,
20239
+ access: "create"
20240
+ },
19970
20241
  "integrations.create": {
19971
20242
  capName: "integrations",
19972
20243
  capScope: "system",
@@ -21149,6 +21420,18 @@ Object.freeze({
21149
21420
  addonId: null,
21150
21421
  access: "create"
21151
21422
  },
21423
+ "pipelineOrchestrator.setAgentCapabilities": {
21424
+ capName: "pipeline-orchestrator",
21425
+ capScope: "system",
21426
+ addonId: null,
21427
+ access: "create"
21428
+ },
21429
+ "pipelineOrchestrator.setAgentDetectWeight": {
21430
+ capName: "pipeline-orchestrator",
21431
+ capScope: "system",
21432
+ addonId: null,
21433
+ access: "create"
21434
+ },
21152
21435
  "pipelineOrchestrator.setAgentMaxCameras": {
21153
21436
  capName: "pipeline-orchestrator",
21154
21437
  capScope: "system",