@camstack/addon-provider-reolink 1.2.176 → 1.2.178

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/addon.js +1231 -546
  2. package/dist/addon.mjs +1231 -546
  3. package/package.json +1 -1
package/dist/addon.mjs CHANGED
@@ -27,7 +27,7 @@ import { URL as URL$1 } from "url";
27
27
  import { spawn as spawn$1 } from "node:child_process";
28
28
  import os, { tmpdir } from "node:os";
29
29
  import { createReadStream } from "node:fs";
30
- //#region ../types/dist/event-category-BGmz_oxW.mjs
30
+ //#region ../types/dist/event-category-B_0XEcLF.mjs
31
31
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
32
32
  EventCategory["SystemBoot"] = "system.boot";
33
33
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -528,15 +528,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
528
528
  EventCategory["AgentWsDisconnected"] = "agent.ws.disconnected";
529
529
  EventCategory["AgentBackupActivated"] = "agent.backup.activated";
530
530
  EventCategory["OrchestrationSettingsUpdated"] = "orchestration.settings-updated";
531
- /**
532
- * Per-agent hwaccel preference changed (user override set, cleared, or
533
- * re-probed). Observability event — decoders pull the current pref at
534
- * `createSession`, so running sessions keep their current backend until
535
- * they rotate naturally (camera add/remove, stream restart). Future
536
- * work can wire a listener in stream-broker that force-rotates live
537
- * sessions; for now this event powers logs + admin-UI toast feedback.
538
- */
539
- EventCategory["PipelineAgentHwaccelChanged"] = "pipeline.agent-hwaccel-changed";
540
531
  EventCategory["MotionAnalysis"] = "detection.motion-analysis";
541
532
  /** All raw motion zones from CCL before minArea filter — for UI debug overlay. */
542
533
  EventCategory["MotionZonesRaw"] = "detection.motion-zones-raw";
@@ -5407,7 +5398,7 @@ var ZodIssueCode = {
5407
5398
  var ZodFirstPartyTypeKind;
5408
5399
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5409
5400
  //#endregion
5410
- //#region ../types/dist/sleep-DXKLNFvA.mjs
5401
+ //#region ../types/dist/sleep-B0JG7-_F.mjs
5411
5402
  /**
5412
5403
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5413
5404
  * window to float samples (D455).
@@ -6773,32 +6764,12 @@ object({
6773
6764
  audioCodec: string().optional(),
6774
6765
  metadata: record(string(), unknown()).readonly().optional()
6775
6766
  });
6776
- var EncodedPacketSchema = object({
6777
- type: _enum(["video", "audio"]),
6778
- data: _instanceof(Uint8Array),
6779
- pts: number(),
6780
- dts: number(),
6781
- keyframe: boolean(),
6782
- codec: string()
6783
- });
6784
- var DecodedFrameSchema = object({
6785
- data: _instanceof(Uint8Array),
6786
- width: number(),
6787
- height: number(),
6788
- format: _enum([
6789
- "jpeg",
6790
- "rgb",
6791
- "bgr",
6792
- "yuv420",
6793
- "gray"
6794
- ]),
6795
- timestamp: number()
6796
- });
6797
6767
  /**
6798
6768
  * Wire schema for `FrameHandle` — a zero-pixel, serialisable reference to a
6799
6769
  * frame in a shared-memory ring (Phase 5 / D9). Mirrors the `FrameHandle` TS
6800
- * interface in `interfaces/frame-handle.ts` field-for-field so a decoder cap
6801
- * method (`pullHandles`) can carry handles over tRPC / Moleculer.
6770
+ * interface in `interfaces/frame-handle.ts` field-for-field so a cap method
6771
+ * (the runner's native-crop and pipeline-executor inputs) can carry handles
6772
+ * over tRPC / Moleculer.
6802
6773
  *
6803
6774
  * The `satisfies` assertion below pins this schema to the interface: if a
6804
6775
  * field is added to / removed from `FrameHandle` without a matching schema
@@ -6824,50 +6795,6 @@ var FrameHandleSchema = object({
6824
6795
  slotCount: number().int().positive()
6825
6796
  });
6826
6797
  /**
6827
- * Pixel format a frame-handle subscriber can request from the broker
6828
- * (Phase 5 / D9). The packed, raster subset of `FrameFormat` — the formats a
6829
- * `frameSink: 'shm'` decoder session can write into a `FrameRing` slot.
6830
- * `jpeg` is excluded: a variable-length stream is not a fixed-stride ring
6831
- * payload, and no decoded-frame consumer requests it over the shm plane.
6832
- */
6833
- var FrameHandleFormatSchema = _enum([
6834
- "rgb",
6835
- "bgr",
6836
- "yuv420",
6837
- "gray"
6838
- ]);
6839
- /**
6840
- * Input for `stream-broker.subscribeFrames` (Phase 5 / D9). A consumer asks the
6841
- * broker for a `FrameHandle` stream of one `format`; the broker maintains one
6842
- * shared-memory ring per `(brokerId, format)` actually requested, so a `gray`
6843
- * subscriber (motion) and an `rgb` subscriber (detection) each read the format
6844
- * they asked for with no broker-side conversion.
6845
- */
6846
- var SubscribeFramesInputSchema = object({
6847
- brokerId: string(),
6848
- format: FrameHandleFormatSchema,
6849
- /**
6850
- * Optional reader-side cadence hint in frames per second. The broker does
6851
- * NOT throttle — latest-wins ring reads drop frames implicitly for a slow
6852
- * consumer. The value is echoed back in `SubscribeFramesResult.maxFps` so
6853
- * the consumer can pace its own `pullFrameHandles` polling.
6854
- */
6855
- maxFps: number().positive().optional(),
6856
- /** Short caller-identity tag (`motion`, `detection`, …) for diagnostics. */
6857
- tag: string().optional()
6858
- });
6859
- /**
6860
- * Result of `stream-broker.subscribeFrames`. The consumer then polls
6861
- * `pullFrameHandles({ subscriptionId, maxCount })` and feeds each returned
6862
- * `FrameHandle` to a `FrameRingReader`.
6863
- */
6864
- var SubscribeFramesResultSchema = object({
6865
- /** Opaque id the consumer passes to `pullFrameHandles` / `unsubscribeFrames`. */
6866
- subscriptionId: string(),
6867
- /** Reader-side cadence hint (frames/s) — echoes `SubscribeFramesInput.maxFps`. */
6868
- maxFps: number().nonnegative()
6869
- });
6870
- /**
6871
6798
  * Wire schema for a decoded audio chunk (Phase 5 / D9). Mirrors the
6872
6799
  * `DecodedAudioChunk` TS interface in `interfaces/stream-broker.ts`: PCM
6873
6800
  * sample bytes plus the track parameters a consumer needs to interpret them.
@@ -6875,8 +6802,8 @@ var SubscribeFramesResultSchema = object({
6875
6802
  * Audio chunks are tiny (a ~500ms AudioCodecSession window is a few KB of
6876
6803
  * Float32 PCM), so unlike video frames they ship their bytes INLINE over
6877
6804
  * tRPC / Moleculer — no shared-memory plane. `data` is typed `Uint8Array`
6878
- * (the wire-serialisable supertype of `Buffer`) to match `DecodedFrameSchema`
6879
- * / `EncodedPacketSchema`'s precedent; a `Buffer` is assignable to it.
6805
+ * (the wire-serialisable supertype of `Buffer`); a `Buffer` is assignable to
6806
+ * it.
6880
6807
  */
6881
6808
  var AudioChunkFormatSchema = _enum(AUDIO_CHUNK_FORMATS);
6882
6809
  var DecodedAudioChunkSchema = object({
@@ -6894,11 +6821,10 @@ var DecodedAudioChunkSchema = object({
6894
6821
  format: AudioChunkFormatSchema.optional()
6895
6822
  });
6896
6823
  /**
6897
- * Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9). The
6898
- * handle-free, ship-bytes-inline analogue of `subscribeFrames`: a consumer
6899
- * asks the broker for the decoded audio-chunk stream of one broker; the
6900
- * broker keeps a per-subscription bounded FIFO queue the consumer drains via
6901
- * `pullAudioChunks`.
6824
+ * Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9). Audio ships
6825
+ * its bytes inline: a consumer asks the broker for the decoded audio-chunk
6826
+ * stream of one broker; the broker keeps a per-subscription bounded FIFO queue
6827
+ * the consumer drains via `pullAudioChunks`.
6902
6828
  */
6903
6829
  var SubscribeAudioChunksInputSchema = object({
6904
6830
  brokerId: string(),
@@ -6929,9 +6855,7 @@ var BrokerStatsSchema = object({
6929
6855
  "stopped"
6930
6856
  ]),
6931
6857
  inputFps: number(),
6932
- decodeFps: number(),
6933
6858
  encodedSubscribers: number(),
6934
- decodedSubscribers: number(),
6935
6859
  uptimeMs: number(),
6936
6860
  bitrateKbps: number(),
6937
6861
  idrIntervalMs: number(),
@@ -6944,14 +6868,6 @@ var BrokerStatsSchema = object({
6944
6868
  preBufferMs: number(),
6945
6869
  preBufferPackets: number(),
6946
6870
  /**
6947
- * Moleculer node id of the decoder provider currently servicing this
6948
- * stream's decoded subscribers. `null` until the deferred decoder is
6949
- * created (no decoded clients yet, or codec not detected). Surfaces the
6950
- * runtime decoder placement so the UI can show "Decoder: <agent>" without
6951
- * a separate cap call per broker.
6952
- */
6953
- decoderNodeId: string().nullable(),
6954
- /**
6955
6871
  * Detected audio track parameters from the RTSP DESCRIBE / SDP. `null`
6956
6872
  * when the stream has no audio track or the broker is in cold start.
6957
6873
  * `supported = false` means the codec was detected but the local
@@ -10355,70 +10271,6 @@ var StorageLocationDeclarationSchema = object({
10355
10271
  "backup"
10356
10272
  ]).optional()
10357
10273
  });
10358
- var DecoderStatsSchema = object({
10359
- inputFps: number(),
10360
- outputFps: number(),
10361
- avgDecodeTimeMs: number(),
10362
- droppedFrames: number(),
10363
- /**
10364
- * Pull-mode adaptive-fps telemetry (optional — only pull sessions run the
10365
- * lag-driven controller; push sessions omit these). `lagMs` is the EWMA of
10366
- * the decoder's real-time drift (rising = falling behind live); `adaptiveFps`
10367
- * is the current lag-throttled emit rate (≤ `effectiveFps` ceiling).
10368
- */
10369
- lagMs: number().optional(),
10370
- effectiveFps: number().optional(),
10371
- adaptiveFps: number().optional()
10372
- });
10373
- var DecoderSessionConfigSchema = object({
10374
- codec: string(),
10375
- maxFps: number().default(0),
10376
- outputFormat: _enum([
10377
- "jpeg",
10378
- "rgb",
10379
- "bgr",
10380
- "yuv420",
10381
- "gray"
10382
- ]).default("jpeg"),
10383
- scale: number().default(1),
10384
- width: number().optional(),
10385
- height: number().optional(),
10386
- /**
10387
- * Identifier of the camera this decoder session serves. Optional
10388
- * because the cap is generic (any caller could request decode), but
10389
- * stream-broker passes it so decoder logs include `deviceId` for
10390
- * per-camera filtering when diagnosing failures (e.g. node-av
10391
- * sendPacket errors on a single hung camera).
10392
- */
10393
- deviceId: number().int().nonnegative().optional(),
10394
- /**
10395
- * Free-form tag for log scoping. Stream-broker uses
10396
- * `broker:<deviceId>/<profile>`. Decoder session logger surfaces it
10397
- * on every line so `grep tag=broker:5/high` filters one camera
10398
- * profile cleanly.
10399
- */
10400
- tag: string().optional(),
10401
- /**
10402
- * Where the session delivers decoded frames (Phase 5 / D9):
10403
- *
10404
- * - `'callback'` (default) — the legacy pixel path: decoded frames are
10405
- * buffered as `DecodedFrame`s and drained via `pullFrames`.
10406
- * - `'shm'` — the shared-memory frame plane: decoded frames are written
10407
- * into an OS shared-memory ring and drained as zero-pixel
10408
- * `FrameHandle`s via `pullHandles`. A session is one mode or the
10409
- * other — `pullFrames` returns nothing for an `'shm'` session and
10410
- * `pullHandles` returns nothing for a `'callback'` session.
10411
- */
10412
- frameSink: _enum(["callback", "shm"]).default("callback"),
10413
- /**
10414
- * Per-camera decoder DEBUG facility. When `true`, a pull-mode session emits
10415
- * a throttled (~1Hz) structured `decoder debug` line (effective/adaptive fps,
10416
- * real-time lag, dropped-frame delta, avg decode time, hwaccel). Mirrors the
10417
- * stream-broker's `streamingDebug` gate — off by default so production logs
10418
- * stay quiet and the emit path pays zero per-frame cost when disabled.
10419
- */
10420
- debug: boolean().optional()
10421
- });
10422
10274
  var EU_DST = {
10423
10275
  offsetHours: 1,
10424
10276
  startMonth: 3,
@@ -11093,57 +10945,26 @@ var ClipSearchStrictnessSchema = _enum([
11093
10945
  "balanced",
11094
10946
  "strict"
11095
10947
  ]);
11096
- new Set([
11097
- {
11098
- id: "person",
11099
- name: "Person"
11100
- },
11101
- {
11102
- id: "vehicle",
11103
- name: "Vehicle"
11104
- },
11105
- {
11106
- id: "animal",
11107
- name: "Animal"
11108
- },
11109
- {
11110
- id: "package",
11111
- name: "Package"
11112
- }
11113
- ].map((l) => l.id));
11114
- var COCO_TO_MACRO = {
11115
- mapping: {
11116
- person: "person",
11117
- bicycle: "vehicle",
11118
- car: "vehicle",
11119
- motorcycle: "vehicle",
11120
- airplane: "vehicle",
11121
- bus: "vehicle",
11122
- train: "vehicle",
11123
- truck: "vehicle",
11124
- boat: "vehicle",
11125
- bird: "animal",
11126
- cat: "animal",
11127
- dog: "animal",
11128
- horse: "animal",
11129
- sheep: "animal",
11130
- cow: "animal",
11131
- elephant: "animal",
11132
- bear: "animal",
11133
- zebra: "animal",
11134
- giraffe: "animal",
11135
- suitcase: "package",
11136
- backpack: "package",
11137
- handbag: "package"
11138
- },
11139
- preserveOriginal: false
11140
- };
11141
- /** Steps a root detector may declare it fills. */
11142
- var FILLABLE_STEP_IDS = [
10948
+ /** Steps whose effect a root label can BE. */
10949
+ var LABEL_SUPPLY_STEP_IDS = [
11143
10950
  "animal-classifier",
11144
10951
  "vehicle-classifier",
11145
10952
  "package-detection"
11146
10953
  ];
10954
+ /** Steps whose box a root detection can BE. */
10955
+ var CROP_SUPPLY_STEP_IDS = ["plate-detection", "face-detection"];
10956
+ /**
10957
+ * Steps whose per-detection MASK a root detection can carry (D737). The live
10958
+ * mask step is `segmentation` — a frame-plane refiner that runs its own model
10959
+ * once per detection crop. (`instance-segmentation` is a dormant step id that
10960
+ * no camera tree carries.)
10961
+ */
10962
+ var MASK_SUPPLY_STEP_IDS = ["segmentation"];
10963
+ [
10964
+ ...LABEL_SUPPLY_STEP_IDS,
10965
+ ...CROP_SUPPLY_STEP_IDS,
10966
+ ...MASK_SUPPLY_STEP_IDS
10967
+ ];
11147
10968
  var MODEL_FORMATS = [
11148
10969
  "onnx",
11149
10970
  "coreml",
@@ -11172,7 +10993,53 @@ var ModelFormatEntrySchema = object({
11172
10993
  /** Multi-file payload (directory members or sibling files). */
11173
10994
  files: array(string()).readonly().optional(),
11174
10995
  /** Runtime(s) that can use this format. If omitted, inferred from ModelFormat key */
11175
- runtimes: array(_enum(["python"])).readonly().optional()
10996
+ runtimes: array(_enum(["python"])).readonly().optional(),
10997
+ /**
10998
+ * Content revision of the artefact, for one hosted OFF the CamStack mirror.
10999
+ * A format on the mirror leaves it unset: its revision (the sha256 of its
11000
+ * weight file) comes from the downloader's generated table, kept in step
11001
+ * with the mirror by `scripts/check-hosted-model-revisions.ts` (D744). A
11002
+ * node records the revision it downloaded next to the file
11003
+ * (`<file>.revision`); a copy with no record or a different one is stale
11004
+ * unless its weight file hashes to the revision, and a stale copy is
11005
+ * downloaded again, the old one serving until the new one is complete. No
11006
+ * revision at all ⇒ a file on disk is current, whatever it holds (D743).
11007
+ */
11008
+ revision: string().min(1).optional()
11009
+ });
11010
+ /**
11011
+ * What a node holds for one (model, format) (D746). `current` is a complete
11012
+ * copy at its catalog revision — exactly what `downloaded: true` means.
11013
+ * `stale` is bytes on disk that are not (yet) proven current under D743/D744:
11014
+ * no or a different revision record, or a missing sibling. `missing` is no
11015
+ * copy. `downloaded` alone folds `stale` into "not downloaded", which hid
11016
+ * reclaimable bytes and a copy about to be replaced.
11017
+ */
11018
+ var ModelOnDiskStateSchema = _enum([
11019
+ "current",
11020
+ "stale",
11021
+ "missing"
11022
+ ]);
11023
+ /**
11024
+ * The numeric precision of one format's BUILD (D746) — reported only when the
11025
+ * build states it (file-name token, an INT8 variant, an EdgeTPU compile, a
11026
+ * CamStack Core ML export). Absent means "not stated", never "fp32".
11027
+ */
11028
+ var ModelFormatPrecisionSchema = _enum([
11029
+ "fp32",
11030
+ "fp16",
11031
+ "int8"
11032
+ ]);
11033
+ /**
11034
+ * One format of one model as a node's `pipelineExecutor.getSchema` reports it.
11035
+ * `onDisk` / `precision` are optional for version skew: a runner that predates
11036
+ * them omits them, and a reader falls back to `downloaded`.
11037
+ */
11038
+ var PipelineModelFormatStatusSchema = object({
11039
+ downloaded: boolean(),
11040
+ sizeMB: number(),
11041
+ onDisk: ModelOnDiskStateSchema.optional(),
11042
+ precision: ModelFormatPrecisionSchema.optional()
11176
11043
  });
11177
11044
  /**
11178
11045
  * Extra file that must be downloaded alongside the model (e.g., labels JSON, dict.txt).
@@ -11276,12 +11143,46 @@ var ModelLicenseSchema = preprocess((value) => typeof value === "string" ? { wei
11276
11143
  /** True when the weights or their data forbid commercial use. */
11277
11144
  nonCommercial: boolean().optional()
11278
11145
  }));
11279
- /** One `fillsClassifierEffects` entry — see `ModelCatalogEntry.fillsClassifierEffects`. */
11280
- var FillsClassifierEffectSchema = object({
11281
- stepId: _enum(FILLABLE_STEP_IDS),
11282
- labelToEffect: record(string(), string()),
11283
- uncovered: array(string()).readonly()
11284
- });
11146
+ /**
11147
+ * One step a ROOT detector can supply from its own output (D730) — see
11148
+ * `ModelCatalogEntry.suppliesSteps`.
11149
+ *
11150
+ * - `label`: the root's raw class IS the step's answer. `labelToEffect` maps
11151
+ * the root's label to the step's vocabulary; `uncovered` is the vocabulary
11152
+ * the root cannot produce (shown as unavailable, never a blocker).
11153
+ * - `crop`: the root draws the box the step would have found (`license_plate`
11154
+ * for plate-detection, `face` for face-detection). The box becomes a detail
11155
+ * child of the `parentMacro` detection that contains it — never a track.
11156
+ * - `mask`: the root's decode emits an instance mask with every detection (a
11157
+ * YOLO26-seg root, D737) — the `segmentation` step's result, carried on the
11158
+ * detection in the shape that step produces. Derived from the model's
11159
+ * postprocessor on read, never stored by an import.
11160
+ */
11161
+ var RootStepSupplySchema = discriminatedUnion("kind", [
11162
+ object({
11163
+ kind: literal("label"),
11164
+ stepId: _enum(LABEL_SUPPLY_STEP_IDS),
11165
+ labelToEffect: record(string(), string()),
11166
+ uncovered: array(string()).readonly()
11167
+ }),
11168
+ object({
11169
+ kind: literal("crop"),
11170
+ stepId: _enum(CROP_SUPPLY_STEP_IDS),
11171
+ rootLabels: array(string()).readonly(),
11172
+ parentMacro: _enum(["vehicle", "person"]),
11173
+ childClass: _enum(["plate", "face"]),
11174
+ /**
11175
+ * The root's smaller input side, stamped on read by `rootSuppliesOf` from
11176
+ * the model entry — what a step's `minRootInputPx` gate judges. Never
11177
+ * stored by an import.
11178
+ */
11179
+ rootInputPx: number().int().positive().optional()
11180
+ }),
11181
+ object({
11182
+ kind: literal("mask"),
11183
+ stepId: _enum(MASK_SUPPLY_STEP_IDS)
11184
+ })
11185
+ ]);
11285
11186
  var ModelCatalogEntrySchema = object({
11286
11187
  id: string(),
11287
11188
  name: string(),
@@ -11347,6 +11248,35 @@ var ModelCatalogEntrySchema = object({
11347
11248
  */
11348
11249
  defaultConfidence: number().min(0).max(1).optional(),
11349
11250
  /**
11251
+ * Per-MODEL default of the per-class confidence floors (`minConfidence<Macro>`
11252
+ * on a detector step), keyed by macro class: `{ person: 0.45 }`. A class
11253
+ * absent here runs at the step slider's global default. The same row shape
11254
+ * the floor measurement produces (`model-floors.json`: modelId → floors), so
11255
+ * a measured table is copied in as-is. An operator override is bound to the
11256
+ * model it was made for and does not survive a model change (D738). A custom
11257
+ * / imported model may declare it; without it, the global defaults apply.
11258
+ */
11259
+ defaultClassFloors: record(string(), number().min(0).max(1)).optional(),
11260
+ /**
11261
+ * The inference precision this model's OpenVINO IR needs on an Intel GPU.
11262
+ * Absent ⇒ the device default (f16 on a GPU). Set to `'f32'` for an FP32 IR
11263
+ * that produces invalid output at f16 — measured 2026-10-07 for YOLO26
11264
+ * base IRs (`yolo26s`: 0 true / 146 false positives; `yolo26m*`: NaN
11265
+ * scores) on the Core Ultra iGPU and the N100. Threaded to the pool as
11266
+ * `PoolModelConfig.gpuInferencePrecision`; the pool sets
11267
+ * INFERENCE_PRECISION_HINT on a GPU only. Costs ~60% latency on the GPU.
11268
+ */
11269
+ gpuInferencePrecision: _enum(["f32", "f16"]).optional(),
11270
+ /**
11271
+ * ROOT detectors only: per supplied step (`animal-classifier`, …), the
11272
+ * minimum DETECTION score from which this root's own fine label (species,
11273
+ * vehicle type — D736 root supply) is taken (D741). Below it the detection
11274
+ * keeps its macro class without the fine label. `1` = never take it from
11275
+ * this root. Absent ⇒ no floor beyond the macro floor. The supplied step's
11276
+ * `minConfidence` slider, bound to the ROOT model, overrides it.
11277
+ */
11278
+ suppliedLabelFloors: record(string(), number().min(0).max(1)).optional(),
11279
+ /**
11350
11280
  * When true, the executor produces a landmark-aligned crop (similarity warp
11351
11281
  * onto the canonical template) before this step runs, instead of a plain
11352
11282
  * axis-aligned bbox crop. Required for face-recognition embedders (ArcFace):
@@ -11408,15 +11338,15 @@ var ModelCatalogEntrySchema = object({
11408
11338
  */
11409
11339
  classMap: DetectionCatalogClassMapSchema.optional(),
11410
11340
  /**
11411
- * The pipeline steps this ROOT detector already does the work of (D715):
11412
- * its labels name the effect the step exists to produce (`deer` for
11413
- * `animal-classifier`, `package` for `package-detection`). Derived from the
11414
- * labelmap by `deriveClassifierFills`, never hand-written; a COCO model
11415
- * declares none. Whether a declaration is honoured is the step's own
11416
- * `labelLink` policy (`resolveLabelLink`). `labelToEffect` values are in
11417
- * `FILLABLE_STEP_VOCABULARIES` (guard `check-label-link-vocabulary`).
11341
+ * The pipeline steps this ROOT detector can supply from its own output
11342
+ * (D730): its labels name a step's effect (`deer` for `animal-classifier`)
11343
+ * or draw a step's box (`license_plate` for `plate-detection`). Computed at
11344
+ * import from THIS model's labelmap by `deriveRootSupplies`, never written
11345
+ * by hand and never assumed per family; a row without it is derived on read
11346
+ * (`rootSuppliesOf`). Whether a camera uses it is the step's own
11347
+ * `useRootModel` flag (`resolveRootSupply`).
11418
11348
  */
11419
- fillsClassifierEffects: array(FillsClassifierEffectSchema).readonly().optional(),
11349
+ suppliesSteps: array(RootStepSupplySchema).readonly().optional(),
11420
11350
  /**
11421
11351
  * The model's CLIP feature-space contract (text encoder, dimension, vector
11422
11352
  * index, token window, search floor) — see `clip-model.ts`. Present ONLY on a
@@ -13019,13 +12949,6 @@ var BrokerRtspClientSchema = object({
13019
12949
  lastRtpAt: number(),
13020
12950
  bytesSent: number()
13021
12951
  });
13022
- var BrokerDecodedClientSchema = object({
13023
- tag: string(),
13024
- subscribedAt: number(),
13025
- maxFps: number(),
13026
- framesDelivered: number(),
13027
- framesDropped: number()
13028
- });
13029
12952
  var BrokerAudioClientSchema = object({
13030
12953
  tag: string(),
13031
12954
  subscribedAt: number(),
@@ -13117,7 +13040,6 @@ var BrokerEncodedClientSchema = object({
13117
13040
  });
13118
13041
  var BrokerClientsSchema = object({
13119
13042
  rtsp: array(BrokerRtspClientSchema).readonly(),
13120
- decoded: array(BrokerDecodedClientSchema).readonly(),
13121
13043
  audio: array(BrokerAudioClientSchema).readonly(),
13122
13044
  encoded: array(BrokerEncodedClientSchema).readonly(),
13123
13045
  pipeClients: number(),
@@ -13486,11 +13408,7 @@ method(object({
13486
13408
  auth: "admin"
13487
13409
  }), method(object({ brokerId: string() }), BrokerClientsSchema), method(object({
13488
13410
  brokerId: string(),
13489
- channel: _enum([
13490
- "rtsp",
13491
- "decoded",
13492
- "audio"
13493
- ]),
13411
+ channel: _enum(["rtsp", "audio"]),
13494
13412
  handle: string()
13495
13413
  }), object({ killed: boolean() }), {
13496
13414
  kind: "mutation",
@@ -13525,10 +13443,7 @@ method(object({
13525
13443
  }), method(SubscribeAudioChunksInputSchema, SubscribeAudioChunksResultSchema, { kind: "mutation" }), method(object({
13526
13444
  subscriptionId: string(),
13527
13445
  maxCount: number().int().positive().default(8)
13528
- }), array(DecodedAudioChunkSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(SubscribeFramesInputSchema, SubscribeFramesResultSchema, { kind: "mutation" }), method(object({
13529
- subscriptionId: string(),
13530
- maxCount: number().int().positive().default(4)
13531
- }), array(FrameHandleSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(object({
13446
+ }), array(DecodedAudioChunkSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(object({
13532
13447
  brokerId: string(),
13533
13448
  seconds: number().min(0).max(30)
13534
13449
  }), _void(), {
@@ -14787,54 +14702,12 @@ id: union([string(), number()]) }), {
14787
14702
  kind: "mutation",
14788
14703
  auth: "admin"
14789
14704
  });
14790
- /**
14791
- * shm ring usage stats for a `frameSink: 'shm'` decoder session —
14792
- * exposed via `decoder.getShmStats` so downstream consumers can
14793
- * observe ring pressure (slot count, byte budget, hit/miss ratio).
14794
- */
14795
- var ShmRingStatsSchema = object({
14796
- sessionId: string(),
14797
- slotCount: number().int(),
14798
- slotByteLength: number().int(),
14799
- segmentBytes: number().int(),
14800
- budgetMb: number().int(),
14801
- framesWritten: number().int(),
14802
- getFrameHits: number().int(),
14803
- getFrameMisses: number().int()
14804
- });
14805
- method(object({ codec: string() }), boolean()), method(_void(), object({
14705
+ method(_void(), object({
14806
14706
  id: string(),
14807
14707
  name: string(),
14808
- isPullMode: boolean().optional(),
14809
- priority: number().optional(),
14810
14708
  hwaccel: string().optional(),
14811
14709
  probedBestHwaccel: string().optional()
14812
- })), method(DecoderSessionConfigSchema, object({
14813
- sessionId: string(),
14814
- nodeId: string()
14815
- })), method(object({ sessionId: string() }), _void()), method(object({
14816
- sessionId: string(),
14817
- packet: EncodedPacketSchema
14818
- }), _void()), method(object({
14819
- sessionId: string(),
14820
- url: string()
14821
- }), _void()), method(object({
14822
- sessionId: string(),
14823
- maxCount: number().default(1),
14824
- waitMs: number().optional()
14825
- }), array(DecodedFrameSchema)), method(object({
14826
- sessionId: string(),
14827
- maxCount: number().default(1),
14828
- waitMs: number().optional()
14829
- }), array(FrameHandleSchema)), method(object({ handle: FrameHandleSchema }), DecodedFrameSchema.nullable()), method(object({ sessionId: string() }), ShmRingStatsSchema.nullable()), method(object({
14830
- sessionId: string(),
14831
- config: DecoderSessionConfigSchema.partial()
14832
- }), _void()), method(object({ sessionId: string() }), DecoderStatsSchema), method(_void(), array(object({
14833
- sessionId: string(),
14834
- codec: string(),
14835
- outputFormat: string(),
14836
- createdAtMs: number()
14837
- })).readonly()), method(_void(), object({ backend: string() }), {
14710
+ })), method(_void(), object({ backend: string() }), {
14838
14711
  kind: "mutation",
14839
14712
  auth: "admin"
14840
14713
  });
@@ -15947,6 +15820,10 @@ var DeviceInfoSchema = object({
15947
15820
  isCamera: boolean(),
15948
15821
  /** Current config values — serializable snapshot */
15949
15822
  config: record(string(), unknown()),
15823
+ /** Paths inside `config` the device's schema declares secret (D783) —
15824
+ * what the non-admin redaction withholds. Paths, never values. Absent
15825
+ * when the owning runner has not reported them. */
15826
+ secretConfigPaths: array(string()).optional(),
15950
15827
  /** Hardware + identity blob (manufacturer / model / firmware / sn /
15951
15828
  * uid / mac / …). Populated by drivers; editable via setMetadata. */
15952
15829
  metadata: record(string(), unknown()).nullable().optional(),
@@ -16152,7 +16029,13 @@ var DeviceRegisterPayloadSchema = object({
16152
16029
  * call (workers re-register on init), so probe-driven updates
16153
16030
  * (e.g. PTZ flag flipping after the abilities probe) propagate. */
16154
16031
  features: array(string()).optional(),
16155
- config: record(string(), unknown())
16032
+ config: record(string(), unknown()),
16033
+ /** Config paths the device's own schema DECLARES secret
16034
+ * (`.meta({ secret: true })` — dotted, `[]` for array items, e.g.
16035
+ * `connection.password`). Re-published on every register; the non-admin
16036
+ * redaction withholds them at any depth (D783). Optional: an older runner
16037
+ * omits it and the keyword backstop applies. */
16038
+ secretConfigPaths: array(string()).optional()
16156
16039
  });
16157
16040
  var DeviceRemovePayloadSchema = object({ deviceId: number() });
16158
16041
  var DevicePersistConfigPayloadSchema = object({
@@ -16998,6 +16881,12 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
16998
16881
  kind: "mutation",
16999
16882
  auth: "admin"
17000
16883
  });
16884
+ var HUB_ADDRESS_ROLES = [
16885
+ "appConnections",
16886
+ "notificationTaps",
16887
+ "internal",
16888
+ "publicEndpoint"
16889
+ ];
17001
16890
  /**
17002
16891
  * Transport bounds for AI capability methods.
17003
16892
  *
@@ -17845,7 +17734,14 @@ var LoginMethodContributionSchema = discriminatedUnion("kind", [
17845
17734
  icon: string().optional(),
17846
17735
  /** Addon-owned HTTP route the button navigates to (GET). */
17847
17736
  startUrl: string(),
17848
- stage: LoginStageEnum
17737
+ stage: LoginStageEnum,
17738
+ /**
17739
+ * The provider names an external identity a signed-in user can link to
17740
+ * their own account (D782): `auth.listLinkableProviders` /
17741
+ * `beginExternalLink` offer exactly the redirect methods that set this,
17742
+ * whatever their id. Absent / false — a login button only (magic-link).
17743
+ */
17744
+ linkable: boolean().optional()
17849
17745
  }),
17850
17746
  object({
17851
17747
  kind: literal("widget"),
@@ -18781,6 +18677,51 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
18781
18677
  kind: "mutation",
18782
18678
  auth: "admin"
18783
18679
  });
18680
+ new Set([
18681
+ {
18682
+ id: "person",
18683
+ name: "Person"
18684
+ },
18685
+ {
18686
+ id: "vehicle",
18687
+ name: "Vehicle"
18688
+ },
18689
+ {
18690
+ id: "animal",
18691
+ name: "Animal"
18692
+ },
18693
+ {
18694
+ id: "package",
18695
+ name: "Package"
18696
+ }
18697
+ ].map((l) => l.id));
18698
+ var COCO_TO_MACRO = {
18699
+ mapping: {
18700
+ person: "person",
18701
+ bicycle: "vehicle",
18702
+ car: "vehicle",
18703
+ motorcycle: "vehicle",
18704
+ airplane: "vehicle",
18705
+ bus: "vehicle",
18706
+ train: "vehicle",
18707
+ truck: "vehicle",
18708
+ boat: "vehicle",
18709
+ bird: "animal",
18710
+ cat: "animal",
18711
+ dog: "animal",
18712
+ horse: "animal",
18713
+ sheep: "animal",
18714
+ cow: "animal",
18715
+ elephant: "animal",
18716
+ bear: "animal",
18717
+ zebra: "animal",
18718
+ giraffe: "animal",
18719
+ suitcase: "package",
18720
+ backpack: "package",
18721
+ handbag: "package"
18722
+ },
18723
+ preserveOriginal: false
18724
+ };
18784
18725
  var AUDIO_MACRO_LABELS = [
18785
18726
  {
18786
18727
  id: "speech",
@@ -19576,6 +19517,8 @@ var NcSystemEventKindSchema = _enum([
19576
19517
  "stream-offline",
19577
19518
  "node-online",
19578
19519
  "node-offline",
19520
+ "node-restarting",
19521
+ "node-updating",
19579
19522
  "node-inference-unavailable",
19580
19523
  "detection-blind",
19581
19524
  "addon-crash-loop",
@@ -21181,7 +21124,13 @@ var NcAlarmModeDelaysListSchema = array(object({
21181
21124
  * Absent = false (logged, not sent). Even when true it is not sent when that same sensor
21182
21125
  * is the one that starts the entry delay — the entry-delay notification already names it.
21183
21126
  */
21184
- notifySensorRewatched: boolean().optional()
21127
+ notifySensorRewatched: boolean().optional(),
21128
+ /**
21129
+ * D735: notify "ignored" when a sensor this arm bypassed really MOVED while armed (its own
21130
+ * change time is after the arm) and set nothing off. Absent = false (logged, not sent). A
21131
+ * re-sync, a recovery from `unavailable` or a duplicate is never announced, switch or not.
21132
+ */
21133
+ notifySensorIgnored: boolean().optional()
21185
21134
  })).max(8).refine(uniqueModes, { message: "modeDelays: at most one entry per arm mode" });
21186
21135
  var NcAlarmModeDelaysEditListSchema = array(object({
21187
21136
  mode: AlarmArmModeSchema,
@@ -21194,7 +21143,9 @@ var NcAlarmModeDelaysEditListSchema = array(object({
21194
21143
  /** D706: set the switch, or `null` to clear it (back to the default, false). */
21195
21144
  notifyDuringEntryDelay: boolean().nullable().optional(),
21196
21145
  /** D706: set the switch, or `null` to clear it (back to the default, false). */
21197
- notifySensorRewatched: boolean().nullable().optional()
21146
+ notifySensorRewatched: boolean().nullable().optional(),
21147
+ /** D735: set the switch, or `null` to clear it (back to the default, false). */
21148
+ notifySensorIgnored: boolean().nullable().optional()
21198
21149
  })).max(8).refine(uniqueModes, { message: "modeDelays: at most one edit per arm mode" });
21199
21150
  /** One switch of the alarm table: put ONE device on, or take it off, ONE mode's list. */
21200
21151
  var NcAlarmNonBlockingEditSchema = object({
@@ -22172,8 +22123,8 @@ Object.freeze(Object.fromEntries([{
22172
22123
  var CLUSTER_STEP_SETTING_FIELDS = [{
22173
22124
  stepId: "face-embedding",
22174
22125
  key: "minLandmarkFaceSize",
22175
- label: "Min face size for recognition (detection px)",
22176
- description: "Refuse to embed a face smaller than this IN THE DETECTION FRAME. Applies to every node — the enrolled gallery is one index, and two admission floors would fill it from two policies. 0 disables the gate.",
22126
+ label: "Min face size to embed (detection-frame px)",
22127
+ description: "Faces smaller than this in the small frame the detector sees are not embedded, so they can never be recognised. Below it the face cannot be aligned reliably and a bad embedding matches everyone. Same value on every node. 0 = no limit.",
22177
22128
  type: "slider",
22178
22129
  min: 0,
22179
22130
  max: 64,
@@ -23225,7 +23176,13 @@ var RetrainFrameSchema = object({
23225
23176
  sizeBytes: number().int(),
23226
23177
  width: number().int(),
23227
23178
  height: number().int(),
23228
- copiedAt: number()
23179
+ copiedAt: number(),
23180
+ /** When the CAMERA captured the frame. Absent on a copy taken before D785. */
23181
+ capturedAt: number().optional(),
23182
+ /** The operator's "every subject in this frame is boxed". Detector
23183
+ * evaluation keeps only complete frames: an unboxed subject would count as
23184
+ * a false positive. */
23185
+ complete: boolean()
23229
23186
  });
23230
23187
  /** Why a copy-on-select could not be honoured — named, never a silent skip. */
23231
23188
  var RetrainCopyRefusalSchema = _enum([
@@ -23246,6 +23203,51 @@ var RetrainFrameListSchema = object({
23246
23203
  /** What the page pre-selects — the native key frame when one survives. */
23247
23204
  autoPickMediaId: number().int().optional()
23248
23205
  });
23206
+ /**
23207
+ * Which frames an annotated export carries. Every field narrows; an empty
23208
+ * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
23209
+ * list owned by whoever trains (the training orchestrator), so `frameIds` is
23210
+ * the primitive a version export uses; `batchId` re-selects what an earlier
23211
+ * export carried (`exportedInBatch`).
23212
+ */
23213
+ var RetrainExportFilterSchema = object({
23214
+ deviceIds: array(number()).optional(),
23215
+ frameIds: array(string()).max(2e4).optional(),
23216
+ batchId: string().optional(),
23217
+ /** Only frames the operator marked complete (all subjects boxed). */
23218
+ completeOnly: boolean().optional()
23219
+ });
23220
+ /**
23221
+ * `frames`: the full frame copies, boxes in `annotations.json`.
23222
+ * `crops`: additionally one JPEG per subject, cut with the runtime detail-crop
23223
+ * convention — the classifier layout.
23224
+ */
23225
+ var RetrainExportLayoutSchema = _enum(["frames", "crops"]);
23226
+ /**
23227
+ * Where `writeRetrainArchive` streams the tar: one HTTP request whose body is
23228
+ * the archive, sent chunk by chunk. Covers a presigned PUT and a provider
23229
+ * addon's data-plane upload route alike. Headers are sent verbatim and never
23230
+ * logged.
23231
+ */
23232
+ var RetrainArchiveTargetSchema = object({
23233
+ kind: literal("http"),
23234
+ method: _enum(["PUT", "POST"]),
23235
+ url: string().url(),
23236
+ headers: record(string(), string()).optional()
23237
+ });
23238
+ var RetrainArchiveResultSchema = object({
23239
+ batchId: string(),
23240
+ frames: number().int(),
23241
+ crops: number().int(),
23242
+ annotations: number().int(),
23243
+ /** Frames planned but not shipped (unreadable copy, path too long). */
23244
+ missing: number().int(),
23245
+ bytes: number().int(),
23246
+ /** sha256 of the exact bytes sent. */
23247
+ sha256: string(),
23248
+ /** The target's HTTP status. */
23249
+ status: number().int()
23250
+ });
23249
23251
  /** What the operator asked the assist to look for. */
23250
23252
  var RetrainAssistSubjectSchema = discriminatedUnion("kind", [object({
23251
23253
  kind: literal("package"),
@@ -24040,9 +24042,25 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
24040
24042
  }), RetrainTransitionResultSchema, {
24041
24043
  kind: "mutation",
24042
24044
  auth: "admin"
24043
- }), method(object({ deviceIds: array(number()).optional() }), object({ url: string() }), {
24045
+ }), method(RetrainExportFilterSchema.extend({ layout: RetrainExportLayoutSchema.optional() }), object({ url: string() }), {
24044
24046
  kind: "query",
24045
24047
  auth: "admin"
24048
+ }), method(object({
24049
+ deviceId: number(),
24050
+ trackId: string(),
24051
+ frameId: string(),
24052
+ complete: boolean()
24053
+ }), RetrainFrameSchema, {
24054
+ kind: "mutation",
24055
+ auth: "admin"
24056
+ }), method(object({
24057
+ filter: RetrainExportFilterSchema,
24058
+ layout: RetrainExportLayoutSchema,
24059
+ target: RetrainArchiveTargetSchema
24060
+ }), RetrainArchiveResultSchema, {
24061
+ kind: "mutation",
24062
+ auth: "admin",
24063
+ timeoutMs: 60 * 6e4
24046
24064
  }), method(object({
24047
24065
  /** Which of the three event tables owns the row. */
24048
24066
  ownerType: EventOwnerTypeSchema,
@@ -24093,6 +24111,34 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
24093
24111
  timestamp: number()
24094
24112
  });
24095
24113
  /**
24114
+ * A root model's boxes standing in for one crop-kind step's own inference
24115
+ * (D730) — see `runPipeline.suppliedRoot`.
24116
+ */
24117
+ var SuppliedRootOutputSchema = object({
24118
+ stepId: string(),
24119
+ /** The root model that drew the boxes — stamped on the result. */
24120
+ modelId: string(),
24121
+ detections: array(object({
24122
+ /** `[x1, y1, x2, y2]` in the pixels of the call's image. */
24123
+ bbox: tuple([
24124
+ number(),
24125
+ number(),
24126
+ number(),
24127
+ number()
24128
+ ]),
24129
+ score: number(),
24130
+ /**
24131
+ * Five facial landmarks in the same pixels — a face the step's own
24132
+ * detector already re-found inside a root face box (D730), so its
24133
+ * embedder child aligns it exactly as it aligns any detected face.
24134
+ */
24135
+ landmarks: array(object({
24136
+ x: number(),
24137
+ y: number()
24138
+ })).optional()
24139
+ })).min(1)
24140
+ });
24141
+ /**
24096
24142
  * Reference to the frame's retained NATIVE surface + the parent crop's placement
24097
24143
  * within the frame, so the executor can re-cut a leaf child ROI at native
24098
24144
  * resolution on the detail plane. See the `runPipeline` `nativeCropRef` field.
@@ -24140,7 +24186,7 @@ var FrameRefSchema = object({
24140
24186
  timestamp: number(),
24141
24187
  capturedAt: number().optional()
24142
24188
  });
24143
- var ModelFormatSchema$1 = _enum([
24189
+ var ModelFormatSchema$2 = _enum([
24144
24190
  "onnx",
24145
24191
  "coreml",
24146
24192
  "openvino",
@@ -24158,7 +24204,7 @@ var PipelineSlotSchema = _enum([
24158
24204
  var PipelineEngineChoiceSchema = object({
24159
24205
  runtime: literal("python"),
24160
24206
  backend: string(),
24161
- format: ModelFormatSchema$1,
24207
+ format: ModelFormatSchema$2,
24162
24208
  device: string().optional()
24163
24209
  });
24164
24210
  /**
@@ -24197,33 +24243,15 @@ var PipelineDefaultStepSchema = lazy(() => object({
24197
24243
  group: string().optional(),
24198
24244
  settings: record(string(), unknown()).optional()
24199
24245
  }));
24200
- var PipelineTemplateStepSchema = lazy(() => object({
24201
- addonId: string(),
24202
- enabled: boolean(),
24203
- modelId: string(),
24204
- children: array(PipelineTemplateStepSchema).readonly(),
24205
- settings: record(string(), unknown()).optional()
24206
- }));
24207
- var PipelineTemplateSchema$1 = object({
24208
- id: string(),
24209
- name: string(),
24210
- createdAt: string(),
24211
- updatedAt: string(),
24212
- engine: PipelineEngineChoiceSchema,
24213
- steps: array(PipelineTemplateStepSchema).readonly()
24214
- });
24215
24246
  var PipelineModelOptionSchema = object({
24216
24247
  id: string(),
24217
24248
  name: string(),
24218
- formats: record(string(), object({
24219
- downloaded: boolean(),
24220
- sizeMB: number()
24221
- })),
24249
+ formats: record(string(), PipelineModelFormatStatusSchema),
24222
24250
  group: ModelVariantGroupSchema.optional(),
24223
24251
  legacy: boolean().optional(),
24224
24252
  provider: ModelProviderIdSchema.optional(),
24225
24253
  defaultConfidence: number().optional(),
24226
- fillsClassifierEffects: array(FillsClassifierEffectSchema).readonly().optional()
24254
+ suppliesSteps: array(RootStepSupplySchema).readonly().optional()
24227
24255
  });
24228
24256
  var ConfigFieldBridge = custom();
24229
24257
  var PipelineAddonSchemaSchema = object({
@@ -24385,6 +24413,22 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
24385
24413
  }), {
24386
24414
  kind: "mutation",
24387
24415
  auth: "admin"
24416
+ }), method(object({
24417
+ nodeId: string(),
24418
+ deviceIds: array(number()).readonly().optional(),
24419
+ dryRun: boolean()
24420
+ }), object({
24421
+ entries: array(object({
24422
+ deviceId: number(),
24423
+ keys: array(string()).readonly()
24424
+ })).readonly(),
24425
+ refused: array(object({
24426
+ deviceId: number(),
24427
+ reason: string()
24428
+ })).readonly()
24429
+ }), {
24430
+ kind: "mutation",
24431
+ auth: "admin"
24388
24432
  }), method(object({ nodeId: string() }), object({ unhealthy: array(object({
24389
24433
  /** `<backend>:<device>`, e.g. `openvino:gpu`. */
24390
24434
  deviceKey: string(),
@@ -24410,22 +24454,14 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
24410
24454
  }), method(_void(), PipelineSchemaSchema), method(_void(), array(PipelineDefaultStepSchema).readonly().nullable()), method(_void(), PipelineConfigBridge), method(_void(), ConfigUISchemaBridge), method(object({
24411
24455
  steps: array(PipelineStepInputSchema),
24412
24456
  deviceKey: string().optional()
24413
- }), PipelineValidationResultSchema), method(_void(), array(PipelineTemplateSchema$1).readonly()), method(object({
24414
- name: string(),
24415
- steps: array(PipelineTemplateStepSchema).readonly(),
24416
- engine: PipelineEngineChoiceSchema
24417
- }), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({
24418
- id: string(),
24419
- name: string().optional(),
24420
- steps: array(PipelineTemplateStepSchema).readonly().optional()
24421
- }), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({ id: string() }), _void(), { kind: "mutation" }), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
24457
+ }), PipelineValidationResultSchema), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
24422
24458
  addonId: string(),
24423
24459
  modelId: string(),
24424
- format: ModelFormatSchema$1
24460
+ format: ModelFormatSchema$2
24425
24461
  }), DownloadModelResultSchema, { kind: "mutation" }), method(object({
24426
24462
  addonId: string(),
24427
24463
  modelId: string(),
24428
- format: ModelFormatSchema$1
24464
+ format: ModelFormatSchema$2
24429
24465
  }), object({ success: literal(true) }), { kind: "mutation" }), method(object({
24430
24466
  steps: array(PipelineStepInputSchema).min(1),
24431
24467
  frame: FrameInputSchema.optional(),
@@ -24491,7 +24527,16 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
24491
24527
  * `device-not-servable`), and nothing reaches the camera's live
24492
24528
  * trace stream. Absent ⇒ unchanged behaviour.
24493
24529
  */
24494
- replay: literal(true).optional()
24530
+ replay: literal(true).optional(),
24531
+ /**
24532
+ * Root-supplied detections for the tree's ROOT step (D730). Set by
24533
+ * `runDetailSubtree` when the camera's root model supplies a crop-kind
24534
+ * step (a Frigate+ `license_plate` for `plate-detection`): the step is
24535
+ * NOT inferred, these boxes are its output, and its children (the plate
24536
+ * reader) run on them through their own crop policy. Boxes are in the
24537
+ * PIXELS of the image this call carries. Absent ⇒ the root step runs.
24538
+ */
24539
+ suppliedRoot: SuppliedRootOutputSchema.optional()
24495
24540
  }), PipelineRunResultBridge, { kind: "mutation" }), method(object({
24496
24541
  steps: array(PipelineStepInputSchema).min(1),
24497
24542
  frames: array(FrameInputSchema).min(1).max(255),
@@ -24573,6 +24618,375 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
24573
24618
  filename: string().optional(),
24574
24619
  settings: record(string(), unknown()).optional()
24575
24620
  }), AudioTestResultSchema, { kind: "mutation" }), method(_void(), ConfigUISchemaNullableBridge);
24621
+ /**
24622
+ * The wire shapes of the Auto tune plan and apply (D745), used by the
24623
+ * `pipeline-orchestrator` cap. The recommender's own types
24624
+ * (`recommend.ts`) are the TS face of the same data; these
24625
+ * schemas are what crosses the cap boundary.
24626
+ */
24627
+ var ModelFormatSchema$1 = _enum(MODEL_FORMATS);
24628
+ /** The operator's range for it. */
24629
+ var MIN_SESSIONS_PER_DEVICE_RANGE = {
24630
+ min: 1,
24631
+ max: 8
24632
+ };
24633
+ var HardwareClassIdSchema = _enum([
24634
+ "intel-core-ultra",
24635
+ "intel-n-series",
24636
+ "apple-m-base",
24637
+ "apple-m-pro",
24638
+ "unknown"
24639
+ ]);
24640
+ var AcceleratorKindSchema = _enum([
24641
+ "intel-npu",
24642
+ "intel-igpu",
24643
+ "x86-cpu",
24644
+ "arm-cpu",
24645
+ "apple-ane",
24646
+ "coral"
24647
+ ]);
24648
+ var RecommendationReasonSchema = discriminatedUnion("kind", [
24649
+ object({
24650
+ kind: literal("capacity"),
24651
+ sessions: number(),
24652
+ minSessions: number()
24653
+ }),
24654
+ object({
24655
+ kind: literal("tie-faster"),
24656
+ over: string(),
24657
+ recallDelta: number()
24658
+ }),
24659
+ object({
24660
+ kind: literal("stepped-down"),
24661
+ from: string(),
24662
+ to: string(),
24663
+ limitedBy: string()
24664
+ }),
24665
+ object({
24666
+ kind: literal("no-fit-lightest"),
24667
+ sessions: number(),
24668
+ minSessions: number()
24669
+ }),
24670
+ object({
24671
+ kind: literal("derived-latency"),
24672
+ modelId: string()
24673
+ }),
24674
+ object({ kind: literal("cpu-device") }),
24675
+ object({ kind: literal("coral-untouched") }),
24676
+ object({ kind: literal("device-disabled") }),
24677
+ object({ kind: literal("device-unavailable") }),
24678
+ object({ kind: literal("node-offline") }),
24679
+ object({ kind: literal("no-hardware-facts") }),
24680
+ object({
24681
+ kind: literal("no-measured-data"),
24682
+ hardwareClass: HardwareClassIdSchema
24683
+ }),
24684
+ object({
24685
+ kind: literal("no-family-build"),
24686
+ format: ModelFormatSchema$1
24687
+ })
24688
+ ]);
24689
+ var DeviceModelChoiceSchema = object({
24690
+ modelId: string(),
24691
+ p50Ms: number(),
24692
+ fps: number(),
24693
+ measured: boolean(),
24694
+ /** Parallel sessions at the camera rate with the headroom kept free: ⌊fps × (1 − headroom) / camera fps⌋. */
24695
+ capacitySessions: number(),
24696
+ personRecall: number()
24697
+ });
24698
+ var DeviceRecommendationSchema = object({
24699
+ deviceKey: string(),
24700
+ accelerator: AcceleratorKindSchema.nullable(),
24701
+ enabled: boolean(),
24702
+ available: boolean(),
24703
+ chosen: DeviceModelChoiceSchema.nullable(),
24704
+ reasons: array(RecommendationReasonSchema).readonly()
24705
+ });
24706
+ var NodeRecommendationSchema = object({
24707
+ nodeId: string(),
24708
+ reachable: boolean(),
24709
+ hardwareClass: HardwareClassIdSchema.nullable(),
24710
+ cpuModel: string().nullable(),
24711
+ skipped: boolean(),
24712
+ acceleratorModelId: string().nullable(),
24713
+ devices: array(DeviceRecommendationSchema).readonly(),
24714
+ reasons: array(RecommendationReasonSchema).readonly()
24715
+ });
24716
+ var ModelPinChangeSchema = object({
24717
+ stepId: string(),
24718
+ before: string().nullable(),
24719
+ after: string().nullable()
24720
+ });
24721
+ var NodeDeviceChangeSchema = object({
24722
+ nodeId: string(),
24723
+ deviceKey: string(),
24724
+ madeExplicit: boolean(),
24725
+ modelPins: array(ModelPinChangeSchema).readonly(),
24726
+ thresholds: array(object({
24727
+ stepId: string(),
24728
+ keys: array(string()).readonly()
24729
+ })).readonly()
24730
+ });
24731
+ var CameraOverrideClearSchema = object({
24732
+ deviceId: number(),
24733
+ source: _enum(["step-override", "wholesale"]),
24734
+ nodeId: string(),
24735
+ deviceKey: string().nullable(),
24736
+ stepId: string(),
24737
+ modelIdBefore: string().nullable(),
24738
+ keys: array(string()).readonly()
24739
+ });
24740
+ var DetectorStoreClearSchema = object({
24741
+ deviceId: number(),
24742
+ keys: array(string()).readonly()
24743
+ });
24744
+ var AutoTuneWarningSchema = discriminatedUnion("kind", [
24745
+ object({
24746
+ kind: literal("detector-store-cluster-wide"),
24747
+ skippedNodes: array(string()).readonly()
24748
+ }),
24749
+ object({
24750
+ kind: literal("detector-store-unreadable"),
24751
+ error: string()
24752
+ }),
24753
+ object({
24754
+ kind: literal("coral-enabled"),
24755
+ nodeId: string(),
24756
+ deviceKey: string()
24757
+ })
24758
+ ]);
24759
+ var AutoTuneOptionsSchema = object({
24760
+ /** Share of each accelerator's throughput kept free (0.3–0.5). */
24761
+ headroom: number().min(.3).max(.5).default(.4),
24762
+ /**
24763
+ * The least number of parallel sessions every device must sustain at the
24764
+ * camera rate with the headroom kept free (D755). The most accurate model
24765
+ * that reaches it wins.
24766
+ */
24767
+ minSessionsPerDevice: number().int().min(MIN_SESSIONS_PER_DEVICE_RANGE.min).max(MIN_SESSIONS_PER_DEVICE_RANGE.max).default(2)
24768
+ });
24769
+ var AutoTunePlanSchema = object({
24770
+ /** Hash of everything the apply will write — the apply refuses a different one. */
24771
+ planHash: string(),
24772
+ family: literal("yolov9"),
24773
+ headroom: number(),
24774
+ minSessionsPerDevice: number(),
24775
+ /** The detection rate a session is counted at (the fastest camera running the pipeline root). */
24776
+ cameraFps: number(),
24777
+ generatedAt: number(),
24778
+ nodes: array(NodeRecommendationSchema).readonly(),
24779
+ nodeChanges: array(NodeDeviceChangeSchema).readonly(),
24780
+ cameraClears: array(CameraOverrideClearSchema).readonly(),
24781
+ detectorStoreClears: array(DetectorStoreClearSchema).readonly(),
24782
+ warnings: array(AutoTuneWarningSchema).readonly()
24783
+ });
24784
+ var AutoTuneApplyInputSchema = object({
24785
+ planHash: string(),
24786
+ headroom: number().min(.3).max(.5).default(.4),
24787
+ minSessionsPerDevice: number().int().min(MIN_SESSIONS_PER_DEVICE_RANGE.min).max(MIN_SESSIONS_PER_DEVICE_RANGE.max).default(2)
24788
+ });
24789
+ var AutoTunePhaseResultSchema = object({
24790
+ phase: _enum([
24791
+ "download",
24792
+ "camera-overrides",
24793
+ "detector-thresholds",
24794
+ "node-models",
24795
+ "redispatch"
24796
+ ]),
24797
+ ok: boolean(),
24798
+ detail: string()
24799
+ });
24800
+ var AutoTuneApplyResultSchema = discriminatedUnion("kind", [
24801
+ object({
24802
+ kind: literal("applied"),
24803
+ planHash: string(),
24804
+ phases: array(AutoTunePhaseResultSchema).readonly()
24805
+ }),
24806
+ object({
24807
+ kind: literal("aborted"),
24808
+ phases: array(AutoTunePhaseResultSchema).readonly()
24809
+ }),
24810
+ object({
24811
+ kind: literal("stale"),
24812
+ plan: AutoTunePlanSchema
24813
+ }),
24814
+ object({
24815
+ kind: literal("refused"),
24816
+ reason: _enum(["apply-in-progress"])
24817
+ })
24818
+ ]);
24819
+ /**
24820
+ * Wire shapes of the Load balancing surface (D748): the session placement
24821
+ * policy, the atomic share write, the observed placement statistics, the
24822
+ * hardware share suggestion and the stale device pins.
24823
+ */
24824
+ /**
24825
+ * How a new detection session picks its node and device.
24826
+ * - `least-loaded` — the historical rule: lowest `attached / weight`, a
24827
+ * constant node order at a tie (D37). An idle node always ties at 0, so a
24828
+ * weight only bites once a node already holds a session.
24829
+ * - `share` — the share of PARALLEL sessions is held to the weights, and a
24830
+ * full or drowning node yields to a free one (D748).
24831
+ */
24832
+ var SessionPlacementPolicySchema = _enum(["least-loaded", "share"]);
24833
+ var LoadBalancingSharesInputSchema = object({
24834
+ /** nodeId → share (> 0). A node left out keeps its weight. */
24835
+ nodes: record(string(), number().positive()).default({}),
24836
+ /** nodeId → deviceKey → share (> 0). A device left out keeps its weight. */
24837
+ devices: record(string(), record(string(), number().positive())).default({})
24838
+ });
24839
+ var PlacementStatsInputSchema = object({
24840
+ /** Window the observed shares are averaged over (default 1 h, max 24 h). */
24841
+ windowMs: number().int().min(6e4).max(1440 * 60 * 1e3).default(3600 * 1e3) });
24842
+ var PlacementDeviceStatsSchema = object({
24843
+ deviceKey: string(),
24844
+ /** Sessions running on this device now. */
24845
+ sessionsNow: number(),
24846
+ /** Sessions started on this device inside the window. */
24847
+ sessionsStarted: number(),
24848
+ /** Time-weighted share of the node's parallel sessions over the window (0–1); null = no session ran. */
24849
+ observedShare: number().nullable()
24850
+ });
24851
+ var PlacementNodeStatsSchema = object({
24852
+ nodeId: string(),
24853
+ sessionsNow: number(),
24854
+ sessionsStarted: number(),
24855
+ /** Time-weighted share of the cluster's parallel sessions over the window (0–1); null = none ran. */
24856
+ observedShare: number().nullable(),
24857
+ /** Most sessions this node ran at once inside the window. */
24858
+ peakSessions: number(),
24859
+ /** Sessions a share election handed elsewhere because this node was full or drowning. */
24860
+ yieldsAway: number(),
24861
+ devices: array(PlacementDeviceStatsSchema).readonly()
24862
+ });
24863
+ /** A camera's device pin that the session path cannot honour. */
24864
+ var StaleDevicePinSchema = object({
24865
+ deviceId: number(),
24866
+ deviceKey: string(),
24867
+ /** `disabled` — the key exists on some node but is not enabled anywhere; `absent` — no node has it. */
24868
+ reason: _enum(["disabled", "absent"])
24869
+ });
24870
+ var PlacementStatsSchema = object({
24871
+ policy: SessionPlacementPolicySchema,
24872
+ windowMs: number(),
24873
+ /** How much of the window was actually observed (the hub keeps it in memory). */
24874
+ observedForMs: number(),
24875
+ sessionsNow: number(),
24876
+ /** Most parallel sessions across the cluster inside the window. */
24877
+ clusterPeakSessions: number(),
24878
+ nodes: array(PlacementNodeStatsSchema).readonly(),
24879
+ stalePins: array(StaleDevicePinSchema).readonly()
24880
+ });
24881
+ /**
24882
+ * Where an automatic share's capacity comes from (D755).
24883
+ * - `hardware` — the static capacity of each device at its Auto tune model:
24884
+ * the measured latency table for the node's hardware class.
24885
+ * - `benchmark` — the node's own measured capacity (node benchmark results).
24886
+ * A node with no results falls back to `hardware`, and says so.
24887
+ */
24888
+ var CapacitySourceSchema = _enum(["hardware", "benchmark"]);
24889
+ /** Why a node under the `benchmark` source was sized from hardware instead. */
24890
+ var CapacityFallbackSchema = _enum(["no-benchmark-results", "partial-benchmark-results"]);
24891
+ var SuggestSharesInputSchema = object({
24892
+ headroom: number().min(.3).max(.5).default(.4),
24893
+ /** Default `hardware`. */
24894
+ source: CapacitySourceSchema.default("hardware")
24895
+ });
24896
+ var SuggestedDeviceShareSchema = object({
24897
+ deviceKey: string(),
24898
+ /** Share of the node (0–100, rounded). */
24899
+ share: number(),
24900
+ modelId: string().nullable(),
24901
+ /** Inferences per second at that model, from the measured table; null when sized by a benchmark. */
24902
+ fps: number().nullable(),
24903
+ /** False for a table cell derived from another chip; true for a measured cell or a benchmark. */
24904
+ measured: boolean(),
24905
+ /**
24906
+ * Advisory session cap: ⌊fps × (1 − headroom) / camera fps⌋ from the table,
24907
+ * or the benchmark's measured max sessions. Never enforced.
24908
+ */
24909
+ suggestedMaxSessions: number().nullable()
24910
+ });
24911
+ var SuggestedNodeShareSchema = object({
24912
+ nodeId: string(),
24913
+ /** Share of the cluster (0–100, rounded); null = node skipped (offline, unknown hardware). */
24914
+ share: number().nullable(),
24915
+ /** Parallel sessions the node sustains at the suggested models with the headroom kept free. */
24916
+ capacitySessions: number(),
24917
+ devices: array(SuggestedDeviceShareSchema).readonly(),
24918
+ skippedReason: string().nullable(),
24919
+ /** What this node's capacity was read from; null when the node is skipped. */
24920
+ capacitySource: CapacitySourceSchema.nullable(),
24921
+ /** Set when the `benchmark` source was asked for and this node used `hardware`. */
24922
+ capacityFallback: CapacityFallbackSchema.nullable()
24923
+ });
24924
+ var SuggestSharesResultSchema = object({
24925
+ headroom: number(),
24926
+ /** The source asked for; each node says what it actually used. */
24927
+ source: CapacitySourceSchema,
24928
+ /** Camera detection rate the capacity is counted in (the fastest camera's fps). */
24929
+ cameraFps: number(),
24930
+ /** The Auto tune capacity floor the models were picked at. */
24931
+ minSessionsPerDevice: number(),
24932
+ nodes: array(SuggestedNodeShareSchema).readonly()
24933
+ });
24934
+ /**
24935
+ * Where the node and device shares come from (D750, D755).
24936
+ * - `hardware` (default) — computed by the system from each node's static
24937
+ * capacity (its accelerators at their Auto tune models, from the measured
24938
+ * latency table), recomputed whenever a node or device joins, leaves, is
24939
+ * switched on or off, or changes model. No load input.
24940
+ * - `benchmark` — the same, from each node's measured capacity (node
24941
+ * benchmark results); a node without results falls back to `hardware`.
24942
+ * - `manual` — the operator's stored sliders.
24943
+ * Either way a node or device that cannot take sessions gives its share to
24944
+ * the others in proportion; the stored values are never rewritten for that.
24945
+ */
24946
+ var ShareSourceSchema = _enum([
24947
+ "hardware",
24948
+ "benchmark",
24949
+ "manual"
24950
+ ]);
24951
+ var SetShareSourceInputSchema = object({ source: ShareSourceSchema });
24952
+ object({
24953
+ nodes: record(string(), number()),
24954
+ devices: record(string(), record(string(), number()))
24955
+ });
24956
+ var EffectiveDeviceShareSchema = object({
24957
+ deviceKey: string(),
24958
+ /** Can take sessions now (enabled, available, can run the root). */
24959
+ eligible: boolean(),
24960
+ /** The share the source assigns, as a percentage of the node's devices. */
24961
+ configuredPct: number(),
24962
+ /** The share actually used, after an ineligible device's share went to the others. */
24963
+ effectivePct: number()
24964
+ });
24965
+ var EffectiveNodeShareSchema = object({
24966
+ nodeId: string(),
24967
+ eligible: boolean(),
24968
+ configuredPct: number(),
24969
+ effectivePct: number(),
24970
+ /** Automatic sources: what this node's share was computed from; null under `manual` or before the first answer. */
24971
+ capacitySource: CapacitySourceSchema.nullable(),
24972
+ /** Automatic `benchmark`: why this node used `hardware` instead. */
24973
+ capacityFallback: CapacityFallbackSchema.nullable(),
24974
+ devices: array(EffectiveDeviceShareSchema).readonly()
24975
+ });
24976
+ var EffectiveSharesSchema = object({
24977
+ source: ShareSourceSchema,
24978
+ policy: SessionPlacementPolicySchema,
24979
+ /** An automatic source with no computed answer yet: the stored sliders are used meanwhile. */
24980
+ autoPending: boolean(),
24981
+ /** When the automatic shares were last computed (ms epoch); null = never. */
24982
+ computedAt: number().nullable(),
24983
+ /** What made the system recompute them last. */
24984
+ trigger: string().nullable(),
24985
+ nodes: array(EffectiveNodeShareSchema).readonly(),
24986
+ /** The relative weights the election reads (before eligibility). */
24987
+ nodeWeights: record(string(), number()),
24988
+ deviceWeights: record(string(), record(string(), number()))
24989
+ });
24576
24990
  object({
24577
24991
  activeCameras: number(),
24578
24992
  throttledCameras: number(),
@@ -25490,14 +25904,15 @@ var RunnerLocalLoadSchema = object({
25490
25904
  * Per-inference-device live load (multi-device C4). One entry per deviceKey
25491
25905
  * this runner currently has attached cameras on, so the orchestrator's second
25492
25906
  * `balance()` pass (over a node's devices) weights on real per-pool session
25493
- * counts. Empty on single-device / pre-multi-device runners. `queueDepthTotal`
25494
- * per device is 0 until the pool backlog gets a public accessor (follow-up).
25907
+ * counts. Empty on single-device / pre-multi-device runners. There is no
25908
+ * per-device queue depth: the inference pool's backlog has no accessor, and
25909
+ * a field that always read 0 was removed rather than shown as a measurement
25910
+ * (D762).
25495
25911
  */
25496
25912
  devices: array(object({
25497
25913
  deviceKey: string(),
25498
25914
  backend: string(),
25499
- attachedCameras: number(),
25500
- queueDepthTotal: number()
25915
+ attachedCameras: number()
25501
25916
  })).default([]),
25502
25917
  /** Hardware capability flags reported by this node. */
25503
25918
  hardware: object({
@@ -25633,7 +26048,22 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
25633
26048
  */
25634
26049
  cropJpeg: string().optional(),
25635
26050
  parent: DetailParentSchema,
25636
- steps: array(string()).optional()
26051
+ steps: array(string()).optional(),
26052
+ /**
26053
+ * The camera's root model already drew this step's boxes (D730): a
26054
+ * `license_plate` inside the parent vehicle. The named step is NOT
26055
+ * inferred — these FRAME-space boxes are its output — and its
26056
+ * requested children (the plate reader) run on them. Absent ⇒ every
26057
+ * requested step infers as before.
26058
+ */
26059
+ supplied: object({
26060
+ stepId: string(),
26061
+ modelId: string(),
26062
+ boxes: array(object({
26063
+ bbox: NativeCropBboxSchema,
26064
+ score: number()
26065
+ })).min(1)
26066
+ }).optional()
25637
26067
  }), object({ details: array(DetailResultSchema) }).nullable(), { kind: "mutation" }), method(object({
25638
26068
  /** Catalog step id, e.g. `clip-embedding`. */
25639
26069
  stepId: string(),
@@ -25696,14 +26126,6 @@ var CameraPipelineConfigSchema = object({
25696
26126
  settings: record(string(), unknown()).readonly().optional()
25697
26127
  }).nullable().optional()
25698
26128
  });
25699
- var PipelineTemplateSchema = object({
25700
- id: string(),
25701
- name: string(),
25702
- description: string().optional(),
25703
- config: CameraPipelineConfigSchema,
25704
- createdAt: string(),
25705
- updatedAt: string()
25706
- });
25707
26129
  var DeviceStepConfigSchema = object({
25708
26130
  modelId: string().optional(),
25709
26131
  settings: record(string(), unknown()).optional(),
@@ -25777,9 +26199,10 @@ var CameraStepOverridePatchSchema = object({
25777
26199
  modelId: string().optional(),
25778
26200
  settings: record(string(), unknown()).readonly().optional()
25779
26201
  });
26202
+ var CameraStepSettingsSchema = record(string(), record(string(), unknown()).readonly());
25780
26203
  var CameraPipelineSettingsSchema = object({
25781
- pinnedAgentNodeId: string().optional(),
25782
26204
  stepToggles: record(string(), boolean()).optional(),
26205
+ stepSettings: CameraStepSettingsSchema.optional(),
25783
26206
  stepOverridesByDevice: record(string(), record(string(), record(string(), CameraStepOverridePatchSchema))).optional(),
25784
26207
  pipelineByAgent: record(string(), CameraPipelineForAgentSchema).optional()
25785
26208
  });
@@ -25812,7 +26235,10 @@ var PipelineAssignmentSchema = object({
25812
26235
  });
25813
26236
  /**
25814
26237
  * Per-agent load summary surfaced to the load balancer + dashboards.
25815
- * Aggregated from each runner's `getLocalLoad` cap call.
26238
+ * Aggregated from each runner's `getLocalLoad` cap call. In the
26239
+ * `getAgentLoad` report, a single-device node's default-pool sessions (no
26240
+ * `deviceKey`) are credited to its one eligible device in `load.devices` —
26241
+ * the default pool IS that device (D745); the balancer's census stays raw.
25816
26242
  */
25817
26243
  var AgentLoadSummarySchema = object({
25818
26244
  nodeId: string(),
@@ -25901,26 +26327,27 @@ var CameraBrokerStatusSchema = object({
25901
26327
  width: number(),
25902
26328
  height: number(),
25903
26329
  subscribers: number(),
25904
- inFps: number(),
25905
- outFps: number()
26330
+ /**
26331
+ * Encoded packets/s the broker receives from the camera. null when the
26332
+ * broker's stats read failed — unknown, never 0 (a 0 here reads as a stall).
26333
+ * There is no output rate: decoding runs in the session decode workers, not
26334
+ * in the broker, so the broker's own decoded-frame rate is 0 on every live
26335
+ * camera and is not served (D758).
26336
+ */
26337
+ inFps: number().nullable()
25906
26338
  })).readonly(),
25907
26339
  webrtcSessions: number(),
25908
26340
  rtspRestream: boolean()
25909
26341
  });
25910
- /** Shared-memory ring statistics within the decoder block. */
25911
- var CameraDecoderShmSchema = object({
25912
- framesWritten: number(),
25913
- getFrameHits: number(),
25914
- getFrameMisses: number(),
25915
- budgetMb: number()
25916
- });
25917
- /** Decoder block — null when the decoder stage is unreachable or inactive. */
25918
- var CameraDecoderStatusSchema = object({
25919
- nodeId: string(),
25920
- formats: array(string()).readonly(),
25921
- sessionCount: number(),
25922
- shm: CameraDecoderShmSchema
25923
- });
26342
+ /**
26343
+ * Decoder block — WHERE decode runs (co-located with the detection node by
26344
+ * construction); null when the camera has no detection node. It carries no
26345
+ * frame counter: the shared-memory plane whose counters it used to serve is
26346
+ * gone, and those fields read 0 forever. Whether frames actually flow is read
26347
+ * from `detection.actualFps` (frames delivered to and processed by the
26348
+ * detector), never from a counter nothing feeds.
26349
+ */
26350
+ var CameraDecoderStatusSchema = object({ nodeId: string() });
25924
26351
  /** Motion block — null when motion detection is not active for this device. */
25925
26352
  var CameraMotionStatusSchema = object({
25926
26353
  enabled: boolean(),
@@ -26277,12 +26704,6 @@ method(object({
26277
26704
  }), object({ success: literal(true) }), {
26278
26705
  kind: "mutation",
26279
26706
  auth: "admin"
26280
- }), method(object({
26281
- agentNodeId: string(),
26282
- detectWeight: number().positive().nullable()
26283
- }), object({ success: literal(true) }), {
26284
- kind: "mutation",
26285
- auth: "admin"
26286
26707
  }), method(object({
26287
26708
  agentNodeId: string(),
26288
26709
  detect: boolean().nullable().optional(),
@@ -26324,6 +26745,15 @@ method(object({
26324
26745
  }), {
26325
26746
  kind: "mutation",
26326
26747
  auth: "admin"
26748
+ }), method(AutoTuneOptionsSchema, AutoTunePlanSchema, { auth: "admin" }), method(AutoTuneApplyInputSchema, AutoTuneApplyResultSchema, {
26749
+ kind: "mutation",
26750
+ auth: "admin"
26751
+ }), method(LoadBalancingSharesInputSchema, object({ success: literal(true) }), {
26752
+ kind: "mutation",
26753
+ auth: "admin"
26754
+ }), method(PlacementStatsInputSchema, PlacementStatsSchema, { auth: "admin" }), method(SuggestSharesInputSchema, SuggestSharesResultSchema, { auth: "admin" }), method(_void(), EffectiveSharesSchema, { auth: "admin" }), method(SetShareSourceInputSchema, object({ success: literal(true) }), {
26755
+ kind: "mutation",
26756
+ auth: "admin"
26327
26757
  }), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
26328
26758
  deviceId: number(),
26329
26759
  addonId: string(),
@@ -26340,6 +26770,13 @@ method(object({
26340
26770
  }), object({ success: literal(true) }), {
26341
26771
  kind: "mutation",
26342
26772
  auth: "admin"
26773
+ }), method(object({
26774
+ deviceId: number(),
26775
+ addonId: string(),
26776
+ settings: record(string(), unknown()).nullable()
26777
+ }), object({ success: literal(true) }), {
26778
+ kind: "mutation",
26779
+ auth: "admin"
26343
26780
  }), method(object({
26344
26781
  deviceId: number(),
26345
26782
  agentNodeId: string(),
@@ -26363,25 +26800,7 @@ method(object({
26363
26800
  }), method(_void(), DiskReconcileJobSchema, {
26364
26801
  kind: "mutation",
26365
26802
  auth: "admin"
26366
- }), method(_void(), DiskReconcileJobSchema, { auth: "admin" }), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
26367
- name: string(),
26368
- description: string().optional(),
26369
- config: CameraPipelineConfigSchema
26370
- }), PipelineTemplateSchema, {
26371
- kind: "mutation",
26372
- auth: "admin"
26373
- }), method(object({
26374
- id: string(),
26375
- name: string().optional(),
26376
- description: string().optional(),
26377
- config: CameraPipelineConfigSchema.optional()
26378
- }), PipelineTemplateSchema, {
26379
- kind: "mutation",
26380
- auth: "admin"
26381
- }), method(object({ id: string() }), object({ success: literal(true) }), {
26382
- kind: "mutation",
26383
- auth: "admin"
26384
- });
26803
+ }), method(_void(), DiskReconcileJobSchema, { auth: "admin" });
26385
26804
  /**
26386
26805
  * Cap → event-kind mapping for the SENSOR / CONTROL cap families — the table
26387
26806
  * `pipeline-analytics.listEventKinds` uses to turn a linked device's bound
@@ -27075,7 +27494,19 @@ var SsoBridgeClaimsSchema = object({
27075
27494
  * editing a descriptor must not retroactively extend or shorten a link the
27076
27495
  * operator already consented to.
27077
27496
  */
27078
- refreshTtl: union([number().int().positive(), literal("never")]).optional()
27497
+ refreshTtl: union([number().int().positive(), literal("never")]).optional(),
27498
+ /**
27499
+ * Opaque handle of a hub-side LINK intent (D782). Set by an OIDC callback
27500
+ * that was started from a signed-in user's "Link" button: the finish then
27501
+ * links this identity to the intent's user instead of signing anyone in.
27502
+ * The handle carries no user id — the hub resolves it, single-use.
27503
+ */
27504
+ linkIntent: string().optional(),
27505
+ /**
27506
+ * Verified `iss` of the id_token behind an OIDC login bridge (D782). A
27507
+ * subject is unique only per issuer, so a link is bound to it.
27508
+ */
27509
+ issuer: string().optional()
27079
27510
  });
27080
27511
  method(object({
27081
27512
  claims: SsoBridgeClaimsSchema,
@@ -29152,8 +29583,6 @@ var WebrtcStreamChoiceSchema = object({
29152
29583
  ]).nullable(),
29153
29584
  /** Input FPS from the camera (null for adaptive). */
29154
29585
  inputFps: number().nullable(),
29155
- /** Decoded FPS (null for adaptive). */
29156
- decodeFps: number().nullable(),
29157
29586
  /** Bitrate in kbps (null for adaptive). */
29158
29587
  bitrateKbps: number().nullable()
29159
29588
  });
@@ -29430,7 +29859,22 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
29430
29859
  * field their hints were silently stripped by the schema and the
29431
29860
  * adaptive ladder started blind on the client's display size.
29432
29861
  */
29433
- hints: webrtcClientHintsSchema.optional()
29862
+ hints: webrtcClientHintsSchema.optional(),
29863
+ /**
29864
+ * Talk-back (D771): relay the PEER's audio to the device's speaker
29865
+ * through the `intercom` cap's push-talk triple. When `true` and the
29866
+ * offer lets the peer send audio, the answer's audio is `sendrecv`
29867
+ * and every inbound frame goes to `intercom.pushTalkAudio` for this
29868
+ * `deviceId`; absent/false answers `sendonly`, as for every viewer.
29869
+ *
29870
+ * TRUSTED-CALLER ONLY. Set by the Alexa export for an Echo on a camera
29871
+ * with `intercom`, when the linked user may control that camera. The
29872
+ * hub STRIPS it from every request-bound call (a browser), exactly as
29873
+ * it overwrites `relayOnly` — a viewer's talk permission is the
29874
+ * intercom cap's own surface (share tokens gate it there), and this
29875
+ * flag must not become a second door to the camera's speaker.
29876
+ */
29877
+ talkback: boolean().optional()
29434
29878
  }), object({
29435
29879
  sessionId: string(),
29436
29880
  sdpAnswer: string()
@@ -29485,6 +29929,14 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
29485
29929
  */
29486
29930
  alive: boolean()
29487
29931
  })), method(object({
29932
+ deviceId: number().int().nonnegative(),
29933
+ sessionId: string(),
29934
+ downlinkMbps: number().nonnegative()
29935
+ }), object({
29936
+ outcome: _enum(["switching", "held"]),
29937
+ tier: CamProfileSchema.nullable(),
29938
+ reason: string()
29939
+ }), { kind: "mutation" }), method(object({
29488
29940
  deviceId: number().int().nonnegative(),
29489
29941
  sessionId: string()
29490
29942
  }), WebrtcSessionDebugSchema, { kind: "query" });
@@ -29724,6 +30176,59 @@ var AddonAutoUpdateSchema = ChannelWithInheritSchema;
29724
30176
  var RestartAddonResultSchema = unknown();
29725
30177
  var InstallPackageResultSchema = unknown();
29726
30178
  var ReloadPackagesResultSchema = unknown();
30179
+ /**
30180
+ * What an uninstall did on ONE node.
30181
+ * - `uninstalled` — removed: runner(s) stopped, caps gone, code deleted.
30182
+ * - `not-installed` — the node did not have it (nothing to do).
30183
+ * - `refused` — protected / bootstrap package; nothing touched.
30184
+ * - `failed` — attempted and did not complete; `error` says why.
30185
+ * - `pending-reconnect` — the node is OFFLINE: its record was pruned so the
30186
+ * back-fill never returns the package, and the stale-addon sweep removes the
30187
+ * copy when the node registers again (only once the hub no longer has it).
30188
+ */
30189
+ var UninstallNodeOutcomeSchema = _enum([
30190
+ "uninstalled",
30191
+ "not-installed",
30192
+ "refused",
30193
+ "failed",
30194
+ "pending-reconnect"
30195
+ ]);
30196
+ var UninstallNodeResultSchema = object({
30197
+ nodeId: string(),
30198
+ outcome: UninstallNodeOutcomeSchema,
30199
+ error: string().optional(),
30200
+ addonIds: array(string()).readonly(),
30201
+ runnersStopped: array(string()).readonly(),
30202
+ warnings: array(string()).readonly()
30203
+ });
30204
+ var UninstallPackageResultSchema = object({
30205
+ /** Every targeted node ended `uninstalled`, `not-installed` or `pending-reconnect`. */
30206
+ success: boolean(),
30207
+ packageName: string(),
30208
+ results: array(UninstallNodeResultSchema).readonly()
30209
+ });
30210
+ /**
30211
+ * `unreachable` lists online agents whose status read FAILED — absence from
30212
+ * `installations` is only "not installed" for a node that answered (D315).
30213
+ */
30214
+ var PackageInstallationsSchema = object({
30215
+ installations: array(object({
30216
+ packageName: string(),
30217
+ nodeId: string(),
30218
+ nodeName: string(),
30219
+ isHub: boolean(),
30220
+ isOnline: boolean(),
30221
+ version: string().nullable(),
30222
+ addonIds: array(string()).readonly(),
30223
+ source: _enum(["live", "recorded"]),
30224
+ /** The hub installs this package too. `false` on an agent row = an orphan. */
30225
+ onHub: boolean()
30226
+ })).readonly(),
30227
+ unreachable: array(object({
30228
+ nodeId: string(),
30229
+ error: string()
30230
+ })).readonly()
30231
+ });
29727
30232
  var BulkUpdateItemStatusSchema = _enum([
29728
30233
  "queued",
29729
30234
  "updating",
@@ -29806,10 +30311,14 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
29806
30311
  }), method(object({ packageName: string() }), InstallPackageResultSchema, {
29807
30312
  kind: "mutation",
29808
30313
  auth: "admin"
29809
- }), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({ packageName: string() }), unknown(), {
30314
+ }), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({
30315
+ packageName: string().min(1),
30316
+ nodeId: string().optional(),
30317
+ everywhere: boolean().optional()
30318
+ }), UninstallPackageResultSchema, {
29810
30319
  kind: "mutation",
29811
30320
  auth: "admin"
29812
- }), method(_void(), ReloadPackagesResultSchema, {
30321
+ }), method(object({ packageName: string().optional() }), PackageInstallationsSchema, { auth: "admin" }), method(_void(), ReloadPackagesResultSchema, {
29813
30322
  kind: "mutation",
29814
30323
  auth: "admin"
29815
30324
  }), method(object({ query: string().optional() }), array(SearchResultSchema)), method(object({ nodeId: string().optional() }), array(PackageUpdateSchema).readonly(), { auth: "admin" }), method(object({
@@ -33296,7 +33805,8 @@ var ConnectionEndpointSchema = object({
33296
33805
  "lan-ipv6",
33297
33806
  "public",
33298
33807
  "loopback",
33299
- "app-link"
33808
+ "app-link",
33809
+ "custom"
33300
33810
  ]),
33301
33811
  /**
33302
33812
  * Originating-interface kind — `lan`/`wifi`/`docker`/`vpn`/`other`/
@@ -33365,7 +33875,7 @@ var GetConnectionEndpointsResultSchema = object({
33365
33875
  localPort: AdvertisedLocalPortSchema
33366
33876
  });
33367
33877
  /**
33368
- * The address flagged for notification links. `baseUrl: null` = AUTO, which
33878
+ * The address flagged for notification taps (`notificationTaps`). `baseUrl: null` = AUTO, which
33369
33879
  * since D709 is the CamStack app link; `resolved` reports the effective value,
33370
33880
  * so the UI can show it either way.
33371
33881
  */
@@ -33398,6 +33908,72 @@ var ViewerEndpointsSchema = object({
33398
33908
  /** What the ranking currently resolves to (may be empty if nothing is up). */
33399
33909
  resolved: array(string()).readonly()
33400
33910
  });
33911
+ /**
33912
+ * DEPRECATED compatibility shape of `getHubAddresses` (D729 amendment, kept
33913
+ * for addons built against it): `cluster` is the `internal` role, `browser`
33914
+ * the `publicEndpoint` role; `override` is the flagged address.
33915
+ */
33916
+ var HubAddressSnapshotSchema = object({
33917
+ override: string().nullable(),
33918
+ resolved: string().nullable(),
33919
+ source: _enum([
33920
+ "override",
33921
+ "auto",
33922
+ "none"
33923
+ ])
33924
+ });
33925
+ var HubAddressesSchema = object({
33926
+ cluster: HubAddressSnapshotSchema,
33927
+ browser: HubAddressSnapshotSchema
33928
+ });
33929
+ /**
33930
+ * What an address is used for (`hub-address.ts`, D734). `appConnections` is
33931
+ * many-valued; `notificationTaps`, `publicEndpoint` and `internal` are carried
33932
+ * by at most one address.
33933
+ */
33934
+ var HubAddressRoleSchema = _enum(HUB_ADDRESS_ROLES);
33935
+ var RoleSourceSchema = _enum([
33936
+ "flagged",
33937
+ "auto",
33938
+ "none"
33939
+ ]);
33940
+ /** One single-valued role: the flagged address, the one in use, and why. */
33941
+ var HubAddressRoleResolutionSchema = object({
33942
+ /** The address carrying the flag, or null = automatic. */
33943
+ flagged: string().nullable(),
33944
+ /** The address in use, or null when nothing qualifies (never loopback). */
33945
+ resolved: string().nullable(),
33946
+ source: RoleSourceSchema
33947
+ });
33948
+ var HubAppConnectionsResolutionSchema = object({
33949
+ /** The addresses flagged `appConnections`, or empty = automatic. */
33950
+ flagged: array(string()).readonly(),
33951
+ /** What the apps race right now. */
33952
+ resolved: array(string()).readonly(),
33953
+ source: RoleSourceSchema
33954
+ });
33955
+ var HubAddressBookSchema = object({
33956
+ rows: array(ConnectionEndpointSchema.extend({
33957
+ /** In the hub's detected palette right now. */
33958
+ detected: boolean(),
33959
+ /** Entered by the operator (removable). */
33960
+ custom: boolean(),
33961
+ /** The roles explicitly flagged on this address. */
33962
+ flags: array(HubAddressRoleSchema).readonly(),
33963
+ /** The roles this address serves right now — flagged or automatic. */
33964
+ inUse: array(HubAddressRoleSchema).readonly(),
33965
+ /** The roles this address may be flagged with. */
33966
+ eligible: array(HubAddressRoleSchema).readonly()
33967
+ })).readonly(),
33968
+ roles: object({
33969
+ appConnections: HubAppConnectionsResolutionSchema,
33970
+ notificationTaps: HubAddressRoleResolutionSchema,
33971
+ internal: HubAddressRoleResolutionSchema,
33972
+ publicEndpoint: HubAddressRoleResolutionSchema
33973
+ }),
33974
+ /** The `hub=` an app link carries (D709), or null. */
33975
+ appLinkHub: string().nullable()
33976
+ });
33401
33977
  var AllowedAddressesSchema = object({
33402
33978
  /**
33403
33979
  * Allowlist of interface addresses operators have explicitly opted
@@ -33441,10 +34017,27 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
33441
34017
  * tunnel always emits `https://` regardless. */
33442
34018
  scheme: _enum(["http", "https"]).optional(),
33443
34019
  /** Append the CamStack app link entry (`kind: 'app-link'`, D709) —
33444
- * an address notification links can be flagged with, not a hub
34020
+ * an address notification taps can be flagged with, not a hub
33445
34021
  * route. Default `false`: racers and rankers never see it. */
33446
34022
  includeAppLink: boolean().optional()
33447
- }), GetConnectionEndpointsResultSchema), method(_void(), NotificationEndpointSchema), method(object({ baseUrl: string().nullable() }), NotificationEndpointSchema, { kind: "mutation" }), method(_void(), ViewerEndpointsSchema), method(object({ baseUrls: array(string()).readonly() }), ViewerEndpointsSchema, { kind: "mutation" }), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" }), method(_void(), TlsStatusSchema), method(object({ reason: string().optional() }), TlsStatusSchema, {
34023
+ }), GetConnectionEndpointsResultSchema), method(_void(), NotificationEndpointSchema), method(object({ baseUrl: string().nullable() }), NotificationEndpointSchema, { kind: "mutation" }), method(_void(), ViewerEndpointsSchema), method(object({ baseUrls: array(string()).readonly() }), ViewerEndpointsSchema, { kind: "mutation" }), method(object({ scheme: _enum(["http", "https"]).optional() }).optional(), HubAddressBookSchema), method(object({
34024
+ baseUrl: string(),
34025
+ label: string().max(80)
34026
+ }), HubAddressBookSchema, {
34027
+ kind: "mutation",
34028
+ auth: "admin"
34029
+ }), method(object({ baseUrl: string() }), HubAddressBookSchema, {
34030
+ kind: "mutation",
34031
+ auth: "admin"
34032
+ }), method(object({
34033
+ role: HubAddressRoleSchema,
34034
+ baseUrl: string().nullable(),
34035
+ enabled: boolean(),
34036
+ acceptInsecureHttp: boolean().optional()
34037
+ }), HubAddressBookSchema, {
34038
+ kind: "mutation",
34039
+ auth: "admin"
34040
+ }), method(_void(), HubAddressesSchema), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" }), method(_void(), TlsStatusSchema), method(object({ reason: string().optional() }), TlsStatusSchema, {
33448
34041
  kind: "mutation",
33449
34042
  auth: "admin"
33450
34043
  }), method(object({
@@ -33902,7 +34495,8 @@ var MotionStatusSchema = object({
33902
34495
  * writes this slice (not even a boot seed), and neither does the runner's
33903
34496
  * phase machine: its phase is "a session is attached" for every on-motion
33904
34497
  * session, not motion, and it now has its own `DetectionPhaseTransition`.
33905
- * A provider's `isDetected` answers from the hub's slice.
34498
+ * A provider's `isDetected` and `getStatus` answer from the hub's slice
34499
+ * (`hubMotionNativeProvider`).
33906
34500
  * - **Sensors** (Home Assistant binary sensors, Homematic, Matter, Alexa
33907
34501
  * imports) — the provider pushes both edges itself, from the upstream
33908
34502
  * system's own state change. That is the sensor's own fact.
@@ -40204,6 +40798,32 @@ var TotpStatusSchema = object({
40204
40798
  /** Null when no row exists OR the row is still pending confirmation. */
40205
40799
  confirmedAt: number().nullable()
40206
40800
  });
40801
+ /**
40802
+ * user-management — singleton capability for user accounts, API keys,
40803
+ * and scoped tokens.
40804
+ *
40805
+ * v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
40806
+ * — the subset check on `setUserScopes` / `createScopedToken` is moot
40807
+ * because non-admins never reach these. If/when we open non-admin
40808
+ * delegation, structural caller-scope subset check goes inside the
40809
+ * provider.
40810
+ */
40811
+ var ExternalIdentitySchema = object({
40812
+ /** Login-method id of the provider instance, e.g. `auth-oidc/authentik`. */
40813
+ provider: string(),
40814
+ /** The IdP's stable subject (`sub`) for this account. */
40815
+ subject: string(),
40816
+ /** The verified `iss` of the IdP the identity was linked under — `sub` is unique only per issuer. */
40817
+ issuer: string(),
40818
+ userId: string(),
40819
+ /** What the IdP called the account at link time (username / email) — display only. */
40820
+ label: string().optional(),
40821
+ linkedAt: number()
40822
+ });
40823
+ var ExternalIdentityKeySchema = object({
40824
+ provider: string().min(1),
40825
+ subject: string().min(1)
40826
+ });
40207
40827
  method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserInputSchema, UserSummarySchema, {
40208
40828
  kind: "mutation",
40209
40829
  auth: "admin",
@@ -40317,7 +40937,22 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
40317
40937
  userId: string(),
40318
40938
  username: string(),
40319
40939
  scopes: array(TokenScopeSchema)
40320
- }).nullable(), { access: "view" }), method(_void(), array(OauthSessionSummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: boolean() }), {
40940
+ }).nullable(), { access: "view" }), method(object({ userId: string() }), array(ExternalIdentitySchema), { auth: "admin" }), method(ExternalIdentityKeySchema, object({
40941
+ userId: string(),
40942
+ issuer: string()
40943
+ }).nullable(), { auth: "admin" }), method(ExternalIdentityKeySchema.extend({
40944
+ userId: string(),
40945
+ issuer: string().min(1),
40946
+ label: string().optional()
40947
+ }), object({ success: literal(true) }), {
40948
+ kind: "mutation",
40949
+ auth: "admin",
40950
+ access: "create"
40951
+ }), method(ExternalIdentityKeySchema.extend({ userId: string() }), object({ success: boolean() }), {
40952
+ kind: "mutation",
40953
+ auth: "admin",
40954
+ access: "delete"
40955
+ }), method(_void(), array(OauthSessionSummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: boolean() }), {
40321
40956
  kind: "mutation",
40322
40957
  auth: "admin",
40323
40958
  access: "delete"
@@ -41019,6 +41654,16 @@ var zoneRulesCapability = {
41019
41654
  durability: "restored"
41020
41655
  };
41021
41656
  SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
41657
+ Object.freeze({
41658
+ person: .5,
41659
+ vehicle: .5,
41660
+ animal: .5
41661
+ });
41662
+ Object.freeze({
41663
+ person: .65,
41664
+ vehicle: .65,
41665
+ animal: .65
41666
+ });
41022
41667
  /**
41023
41668
  * Accessory device helpers — shared across drivers.
41024
41669
  *
@@ -42743,6 +43388,12 @@ Object.freeze({
42743
43388
  addonId: null,
42744
43389
  access: "view"
42745
43390
  },
43391
+ "addons.listInstallations": {
43392
+ capName: "addons",
43393
+ capScope: "system",
43394
+ addonId: null,
43395
+ access: "view"
43396
+ },
42746
43397
  "addons.listJobs": {
42747
43398
  capName: "addons",
42748
43399
  capScope: "system",
@@ -43925,90 +44576,18 @@ Object.freeze({
43925
44576
  addonId: null,
43926
44577
  access: "create"
43927
44578
  },
43928
- "decoder.createSession": {
43929
- capName: "decoder",
43930
- capScope: "system",
43931
- addonId: null,
43932
- access: "view"
43933
- },
43934
- "decoder.destroySession": {
43935
- capName: "decoder",
43936
- capScope: "system",
43937
- addonId: null,
43938
- access: "delete"
43939
- },
43940
- "decoder.getFrame": {
43941
- capName: "decoder",
43942
- capScope: "system",
43943
- addonId: null,
43944
- access: "view"
43945
- },
43946
44579
  "decoder.getInfo": {
43947
44580
  capName: "decoder",
43948
44581
  capScope: "system",
43949
44582
  addonId: null,
43950
44583
  access: "view"
43951
44584
  },
43952
- "decoder.getShmStats": {
43953
- capName: "decoder",
43954
- capScope: "system",
43955
- addonId: null,
43956
- access: "view"
43957
- },
43958
- "decoder.getStats": {
43959
- capName: "decoder",
43960
- capScope: "system",
43961
- addonId: null,
43962
- access: "view"
43963
- },
43964
- "decoder.listActiveSessions": {
43965
- capName: "decoder",
43966
- capScope: "system",
43967
- addonId: null,
43968
- access: "view"
43969
- },
43970
- "decoder.openStream": {
43971
- capName: "decoder",
43972
- capScope: "system",
43973
- addonId: null,
43974
- access: "view"
43975
- },
43976
- "decoder.pullFrames": {
43977
- capName: "decoder",
43978
- capScope: "system",
43979
- addonId: null,
43980
- access: "view"
43981
- },
43982
- "decoder.pullHandles": {
43983
- capName: "decoder",
43984
- capScope: "system",
43985
- addonId: null,
43986
- access: "view"
43987
- },
43988
- "decoder.pushPacket": {
43989
- capName: "decoder",
43990
- capScope: "system",
43991
- addonId: null,
43992
- access: "view"
43993
- },
43994
44585
  "decoder.reprobeHwaccel": {
43995
44586
  capName: "decoder",
43996
44587
  capScope: "system",
43997
44588
  addonId: null,
43998
44589
  access: "create"
43999
44590
  },
44000
- "decoder.supportsCodec": {
44001
- capName: "decoder",
44002
- capScope: "system",
44003
- addonId: null,
44004
- access: "view"
44005
- },
44006
- "decoder.updateConfig": {
44007
- capName: "decoder",
44008
- capScope: "system",
44009
- addonId: null,
44010
- access: "view"
44011
- },
44012
44591
  "detectionPipeline.applyDeviceSettingsPatch": {
44013
44592
  capName: "detection-pipeline",
44014
44593
  capScope: "device",
@@ -45497,12 +46076,24 @@ Object.freeze({
45497
46076
  addonId: null,
45498
46077
  access: "view"
45499
46078
  },
46079
+ "localNetwork.addCustomAddress": {
46080
+ capName: "local-network",
46081
+ capScope: "system",
46082
+ addonId: null,
46083
+ access: "create"
46084
+ },
45500
46085
  "localNetwork.downloadCa": {
45501
46086
  capName: "local-network",
45502
46087
  capScope: "system",
45503
46088
  addonId: null,
45504
46089
  access: "view"
45505
46090
  },
46091
+ "localNetwork.getAddresses": {
46092
+ capName: "local-network",
46093
+ capScope: "system",
46094
+ addonId: null,
46095
+ access: "view"
46096
+ },
45506
46097
  "localNetwork.getAllowedAddresses": {
45507
46098
  capName: "local-network",
45508
46099
  capScope: "system",
@@ -45515,6 +46106,12 @@ Object.freeze({
45515
46106
  addonId: null,
45516
46107
  access: "view"
45517
46108
  },
46109
+ "localNetwork.getHubAddresses": {
46110
+ capName: "local-network",
46111
+ capScope: "system",
46112
+ addonId: null,
46113
+ access: "view"
46114
+ },
45518
46115
  "localNetwork.getNotificationEndpoint": {
45519
46116
  capName: "local-network",
45520
46117
  capScope: "system",
@@ -45551,6 +46148,12 @@ Object.freeze({
45551
46148
  addonId: null,
45552
46149
  access: "create"
45553
46150
  },
46151
+ "localNetwork.removeCustomAddress": {
46152
+ capName: "local-network",
46153
+ capScope: "system",
46154
+ addonId: null,
46155
+ access: "delete"
46156
+ },
45554
46157
  "localNetwork.resetAllowlistToBestMatch": {
45555
46158
  capName: "local-network",
45556
46159
  capScope: "system",
@@ -45563,6 +46166,12 @@ Object.freeze({
45563
46166
  addonId: null,
45564
46167
  access: "create"
45565
46168
  },
46169
+ "localNetwork.setAddressRole": {
46170
+ capName: "local-network",
46171
+ capScope: "system",
46172
+ addonId: null,
46173
+ access: "create"
46174
+ },
45566
46175
  "localNetwork.setAllowedAddresses": {
45567
46176
  capName: "local-network",
45568
46177
  capScope: "system",
@@ -47009,6 +47618,12 @@ Object.freeze({
47009
47618
  addonId: null,
47010
47619
  access: "create"
47011
47620
  },
47621
+ "pipelineAnalytics.setRetrainFrameComplete": {
47622
+ capName: "pipeline-analytics",
47623
+ capScope: "device",
47624
+ addonId: null,
47625
+ access: "create"
47626
+ },
47012
47627
  "pipelineAnalytics.setTrackFlags": {
47013
47628
  capName: "pipeline-analytics",
47014
47629
  capScope: "device",
@@ -47045,6 +47660,12 @@ Object.freeze({
47045
47660
  addonId: null,
47046
47661
  access: "delete"
47047
47662
  },
47663
+ "pipelineAnalytics.writeRetrainArchive": {
47664
+ capName: "pipeline-analytics",
47665
+ capScope: "device",
47666
+ addonId: null,
47667
+ access: "create"
47668
+ },
47048
47669
  "pipelineExecutor.cacheFrameInPool": {
47049
47670
  capName: "pipeline-executor",
47050
47671
  capScope: "system",
@@ -47057,13 +47678,13 @@ Object.freeze({
47057
47678
  addonId: null,
47058
47679
  access: "delete"
47059
47680
  },
47060
- "pipelineExecutor.deleteModel": {
47681
+ "pipelineExecutor.clearModelBoundDeviceOverrides": {
47061
47682
  capName: "pipeline-executor",
47062
47683
  capScope: "system",
47063
47684
  addonId: null,
47064
47685
  access: "delete"
47065
47686
  },
47066
- "pipelineExecutor.deleteTemplate": {
47687
+ "pipelineExecutor.deleteModel": {
47067
47688
  capName: "pipeline-executor",
47068
47689
  capScope: "system",
47069
47690
  addonId: null,
@@ -47207,12 +47828,6 @@ Object.freeze({
47207
47828
  addonId: null,
47208
47829
  access: "view"
47209
47830
  },
47210
- "pipelineExecutor.listTemplates": {
47211
- capName: "pipeline-executor",
47212
- capScope: "system",
47213
- addonId: null,
47214
- access: "view"
47215
- },
47216
47831
  "pipelineExecutor.rearmInferenceDevice": {
47217
47832
  capName: "pipeline-executor",
47218
47833
  capScope: "system",
@@ -47237,12 +47852,6 @@ Object.freeze({
47237
47852
  addonId: null,
47238
47853
  access: "create"
47239
47854
  },
47240
- "pipelineExecutor.saveTemplate": {
47241
- capName: "pipeline-executor",
47242
- capScope: "system",
47243
- addonId: null,
47244
- access: "create"
47245
- },
47246
47855
  "pipelineExecutor.setVideoPipelineSteps": {
47247
47856
  capName: "pipeline-executor",
47248
47857
  capScope: "system",
@@ -47261,41 +47870,35 @@ Object.freeze({
47261
47870
  addonId: null,
47262
47871
  access: "create"
47263
47872
  },
47264
- "pipelineExecutor.updateTemplate": {
47265
- capName: "pipeline-executor",
47266
- capScope: "system",
47267
- addonId: null,
47268
- access: "create"
47269
- },
47270
47873
  "pipelineExecutor.validatePipeline": {
47271
47874
  capName: "pipeline-executor",
47272
47875
  capScope: "system",
47273
47876
  addonId: null,
47274
47877
  access: "view"
47275
47878
  },
47276
- "pipelineOrchestrator.applyDeviceSettingsPatch": {
47879
+ "pipelineOrchestrator.applyAutoTune": {
47277
47880
  capName: "pipeline-orchestrator",
47278
47881
  capScope: "system",
47279
47882
  addonId: null,
47280
47883
  access: "create"
47281
47884
  },
47282
- "pipelineOrchestrator.assignAudio": {
47885
+ "pipelineOrchestrator.applyDeviceSettingsPatch": {
47283
47886
  capName: "pipeline-orchestrator",
47284
47887
  capScope: "system",
47285
47888
  addonId: null,
47286
47889
  access: "create"
47287
47890
  },
47288
- "pipelineOrchestrator.assignPipeline": {
47891
+ "pipelineOrchestrator.assignAudio": {
47289
47892
  capName: "pipeline-orchestrator",
47290
47893
  capScope: "system",
47291
47894
  addonId: null,
47292
47895
  access: "create"
47293
47896
  },
47294
- "pipelineOrchestrator.deleteTemplate": {
47897
+ "pipelineOrchestrator.assignPipeline": {
47295
47898
  capName: "pipeline-orchestrator",
47296
47899
  capScope: "system",
47297
47900
  addonId: null,
47298
- access: "delete"
47901
+ access: "create"
47299
47902
  },
47300
47903
  "pipelineOrchestrator.getAgentLoad": {
47301
47904
  capName: "pipeline-orchestrator",
@@ -47387,6 +47990,12 @@ Object.freeze({
47387
47990
  addonId: null,
47388
47991
  access: "view"
47389
47992
  },
47993
+ "pipelineOrchestrator.getEffectiveShares": {
47994
+ capName: "pipeline-orchestrator",
47995
+ capScope: "system",
47996
+ addonId: null,
47997
+ access: "view"
47998
+ },
47390
47999
  "pipelineOrchestrator.getGlobalMetrics": {
47391
48000
  capName: "pipeline-orchestrator",
47392
48001
  capScope: "system",
@@ -47423,19 +48032,19 @@ Object.freeze({
47423
48032
  addonId: null,
47424
48033
  access: "view"
47425
48034
  },
47426
- "pipelineOrchestrator.getReconcileFromDiskStatus": {
48035
+ "pipelineOrchestrator.getPlacementStats": {
47427
48036
  capName: "pipeline-orchestrator",
47428
48037
  capScope: "system",
47429
48038
  addonId: null,
47430
48039
  access: "view"
47431
48040
  },
47432
- "pipelineOrchestrator.listAgentSettings": {
48041
+ "pipelineOrchestrator.getReconcileFromDiskStatus": {
47433
48042
  capName: "pipeline-orchestrator",
47434
48043
  capScope: "system",
47435
48044
  addonId: null,
47436
48045
  access: "view"
47437
48046
  },
47438
- "pipelineOrchestrator.listTemplates": {
48047
+ "pipelineOrchestrator.listAgentSettings": {
47439
48048
  capName: "pipeline-orchestrator",
47440
48049
  capScope: "system",
47441
48050
  addonId: null,
@@ -47447,6 +48056,12 @@ Object.freeze({
47447
48056
  addonId: null,
47448
48057
  access: "create"
47449
48058
  },
48059
+ "pipelineOrchestrator.planAutoTune": {
48060
+ capName: "pipeline-orchestrator",
48061
+ capScope: "system",
48062
+ addonId: null,
48063
+ access: "view"
48064
+ },
47450
48065
  "pipelineOrchestrator.rebalance": {
47451
48066
  capName: "pipeline-orchestrator",
47452
48067
  capScope: "system",
@@ -47489,12 +48104,6 @@ Object.freeze({
47489
48104
  addonId: null,
47490
48105
  access: "create"
47491
48106
  },
47492
- "pipelineOrchestrator.saveTemplate": {
47493
- capName: "pipeline-orchestrator",
47494
- capScope: "system",
47495
- addonId: null,
47496
- access: "create"
47497
- },
47498
48107
  "pipelineOrchestrator.setAgentCapabilities": {
47499
48108
  capName: "pipeline-orchestrator",
47500
48109
  capScope: "system",
@@ -47507,12 +48116,6 @@ Object.freeze({
47507
48116
  addonId: null,
47508
48117
  access: "create"
47509
48118
  },
47510
- "pipelineOrchestrator.setAgentDetectWeight": {
47511
- capName: "pipeline-orchestrator",
47512
- capScope: "system",
47513
- addonId: null,
47514
- access: "create"
47515
- },
47516
48119
  "pipelineOrchestrator.setAgentInferenceDevices": {
47517
48120
  capName: "pipeline-orchestrator",
47518
48121
  capScope: "system",
@@ -47549,6 +48152,12 @@ Object.freeze({
47549
48152
  addonId: null,
47550
48153
  access: "create"
47551
48154
  },
48155
+ "pipelineOrchestrator.setCameraStepSettings": {
48156
+ capName: "pipeline-orchestrator",
48157
+ capScope: "system",
48158
+ addonId: null,
48159
+ access: "create"
48160
+ },
47552
48161
  "pipelineOrchestrator.setCameraStepToggle": {
47553
48162
  capName: "pipeline-orchestrator",
47554
48163
  capScope: "system",
@@ -47567,25 +48176,37 @@ Object.freeze({
47567
48176
  addonId: null,
47568
48177
  access: "create"
47569
48178
  },
48179
+ "pipelineOrchestrator.setLoadBalancingShares": {
48180
+ capName: "pipeline-orchestrator",
48181
+ capScope: "system",
48182
+ addonId: null,
48183
+ access: "create"
48184
+ },
47570
48185
  "pipelineOrchestrator.setPipelineDevicePin": {
47571
48186
  capName: "pipeline-orchestrator",
47572
48187
  capScope: "system",
47573
48188
  addonId: null,
47574
48189
  access: "create"
47575
48190
  },
47576
- "pipelineOrchestrator.unassignAudio": {
48191
+ "pipelineOrchestrator.setShareSource": {
47577
48192
  capName: "pipeline-orchestrator",
47578
48193
  capScope: "system",
47579
48194
  addonId: null,
47580
48195
  access: "create"
47581
48196
  },
47582
- "pipelineOrchestrator.unassignPipeline": {
48197
+ "pipelineOrchestrator.suggestShares": {
48198
+ capName: "pipeline-orchestrator",
48199
+ capScope: "system",
48200
+ addonId: null,
48201
+ access: "view"
48202
+ },
48203
+ "pipelineOrchestrator.unassignAudio": {
47583
48204
  capName: "pipeline-orchestrator",
47584
48205
  capScope: "system",
47585
48206
  addonId: null,
47586
48207
  access: "create"
47587
48208
  },
47588
- "pipelineOrchestrator.updateTemplate": {
48209
+ "pipelineOrchestrator.unassignPipeline": {
47589
48210
  capName: "pipeline-orchestrator",
47590
48211
  capScope: "system",
47591
48212
  addonId: null,
@@ -49025,12 +49646,6 @@ Object.freeze({
49025
49646
  addonId: null,
49026
49647
  access: "view"
49027
49648
  },
49028
- "streamBroker.pullFrameHandles": {
49029
- capName: "stream-broker",
49030
- capScope: "system",
49031
- addonId: null,
49032
- access: "view"
49033
- },
49034
49649
  "streamBroker.regenerateRtspToken": {
49035
49650
  capName: "stream-broker",
49036
49651
  capScope: "system",
@@ -49097,12 +49712,6 @@ Object.freeze({
49097
49712
  addonId: null,
49098
49713
  access: "create"
49099
49714
  },
49100
- "streamBroker.subscribeFrames": {
49101
- capName: "stream-broker",
49102
- capScope: "system",
49103
- addonId: null,
49104
- access: "create"
49105
- },
49106
49715
  "streamBroker.unassignProfile": {
49107
49716
  capName: "stream-broker",
49108
49717
  capScope: "system",
@@ -49115,12 +49724,6 @@ Object.freeze({
49115
49724
  addonId: null,
49116
49725
  access: "create"
49117
49726
  },
49118
- "streamBroker.unsubscribeFrames": {
49119
- capName: "stream-broker",
49120
- capScope: "system",
49121
- addonId: null,
49122
- access: "create"
49123
- },
49124
49727
  "streamCatalog.getCatalog": {
49125
49728
  capName: "stream-catalog",
49126
49729
  capScope: "device",
@@ -49415,18 +50018,36 @@ Object.freeze({
49415
50018
  addonId: null,
49416
50019
  access: "delete"
49417
50020
  },
50021
+ "userManagement.findUserByExternalIdentity": {
50022
+ capName: "user-management",
50023
+ capScope: "system",
50024
+ addonId: null,
50025
+ access: "view"
50026
+ },
49418
50027
  "userManagement.getTotpStatus": {
49419
50028
  capName: "user-management",
49420
50029
  capScope: "system",
49421
50030
  addonId: null,
49422
50031
  access: "view"
49423
50032
  },
50033
+ "userManagement.linkExternalIdentity": {
50034
+ capName: "user-management",
50035
+ capScope: "system",
50036
+ addonId: null,
50037
+ access: "create"
50038
+ },
49424
50039
  "userManagement.listApiKeys": {
49425
50040
  capName: "user-management",
49426
50041
  capScope: "system",
49427
50042
  addonId: null,
49428
50043
  access: "view"
49429
50044
  },
50045
+ "userManagement.listExternalIdentities": {
50046
+ capName: "user-management",
50047
+ capScope: "system",
50048
+ addonId: null,
50049
+ access: "view"
50050
+ },
49430
50051
  "userManagement.listOauthSessions": {
49431
50052
  capName: "user-management",
49432
50053
  capScope: "system",
@@ -49505,6 +50126,12 @@ Object.freeze({
49505
50126
  addonId: null,
49506
50127
  access: "create"
49507
50128
  },
50129
+ "userManagement.unlinkExternalIdentity": {
50130
+ capName: "user-management",
50131
+ capScope: "system",
50132
+ addonId: null,
50133
+ access: "delete"
50134
+ },
49508
50135
  "userManagement.updateUser": {
49509
50136
  capName: "user-management",
49510
50137
  capScope: "system",
@@ -49817,6 +50444,12 @@ Object.freeze({
49817
50444
  addonId: null,
49818
50445
  access: "create"
49819
50446
  },
50447
+ "webrtcSession.applyDownlinkProbe": {
50448
+ capName: "webrtc-session",
50449
+ capScope: "device",
50450
+ addonId: null,
50451
+ access: "create"
50452
+ },
49820
50453
  "webrtcSession.closeSession": {
49821
50454
  capName: "webrtc-session",
49822
50455
  capScope: "device",
@@ -51780,11 +52413,6 @@ Object.freeze({
51780
52413
  form: "single",
51781
52414
  optional: false
51782
52415
  }],
51783
- "decoder.createSession": [{
51784
- name: "deviceId",
51785
- form: "single",
51786
- optional: true
51787
- }],
51788
52416
  "detectionPipeline.applyDeviceSettingsPatch": [{
51789
52417
  name: "deviceId",
51790
52418
  form: "single",
@@ -52995,6 +53623,11 @@ Object.freeze({
52995
53623
  form: "single",
52996
53624
  optional: false
52997
53625
  }],
53626
+ "pipelineAnalytics.setRetrainFrameComplete": [{
53627
+ name: "deviceId",
53628
+ form: "single",
53629
+ optional: false
53630
+ }],
52998
53631
  "pipelineAnalytics.setTrackFlags": [{
52999
53632
  name: "deviceId",
53000
53633
  form: "single",
@@ -53015,6 +53648,11 @@ Object.freeze({
53015
53648
  form: "single",
53016
53649
  optional: false
53017
53650
  }],
53651
+ "pipelineExecutor.clearModelBoundDeviceOverrides": [{
53652
+ name: "deviceIds",
53653
+ form: "array",
53654
+ optional: true
53655
+ }],
53018
53656
  "pipelineExecutor.runPipeline": [{
53019
53657
  name: "deviceId",
53020
53658
  form: "single",
@@ -53120,6 +53758,11 @@ Object.freeze({
53120
53758
  form: "single",
53121
53759
  optional: false
53122
53760
  }],
53761
+ "pipelineOrchestrator.setCameraStepSettings": [{
53762
+ name: "deviceId",
53763
+ form: "single",
53764
+ optional: false
53765
+ }],
53123
53766
  "pipelineOrchestrator.setCameraStepToggle": [{
53124
53767
  name: "deviceId",
53125
53768
  form: "single",
@@ -53891,6 +54534,11 @@ Object.freeze({
53891
54534
  form: "single",
53892
54535
  optional: false
53893
54536
  }],
54537
+ "webrtcSession.applyDownlinkProbe": [{
54538
+ name: "deviceId",
54539
+ form: "single",
54540
+ optional: false
54541
+ }],
53894
54542
  "webrtcSession.closeSession": [{
53895
54543
  name: "deviceId",
53896
54544
  form: "single",
@@ -54120,6 +54768,8 @@ new Map(Object.entries({
54120
54768
  "detection-blind": "device-events",
54121
54769
  "node-online": "system",
54122
54770
  "node-offline": "system",
54771
+ "node-restarting": "system",
54772
+ "node-updating": "system",
54123
54773
  "node-inference-unavailable": "system",
54124
54774
  "addon-crash-loop": "system",
54125
54775
  "addon-update-available": "system",
@@ -54197,6 +54847,7 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
54197
54847
  kinds: [
54198
54848
  "node-offline",
54199
54849
  "node-online",
54850
+ "node-restarting",
54200
54851
  "node-inference-unavailable"
54201
54852
  ]
54202
54853
  },
@@ -54218,6 +54869,7 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
54218
54869
  label: "Server & container updates",
54219
54870
  kinds: [
54220
54871
  "server-update-available",
54872
+ "node-updating",
54221
54873
  "server-updated",
54222
54874
  "wrapper-update-available"
54223
54875
  ]
@@ -54365,6 +55017,7 @@ var STATE_SUMMARY_SECTION_VARS = [
54365
55017
  kinds: [
54366
55018
  "node-offline",
54367
55019
  "node-online",
55020
+ "node-restarting",
54368
55021
  "node-inference-unavailable"
54369
55022
  ]
54370
55023
  },
@@ -54386,6 +55039,7 @@ var STATE_SUMMARY_SECTION_VARS = [
54386
55039
  example: "server 1.2.377 → 1.2.378",
54387
55040
  kinds: [
54388
55041
  "server-update-available",
55042
+ "node-updating",
54389
55043
  "server-updated",
54390
55044
  "wrapper-update-available"
54391
55045
  ]
@@ -54418,7 +55072,7 @@ var STATE_SUMMARY_VARS = [
54418
55072
  {
54419
55073
  name: "summarySection",
54420
55074
  label: "Summary: this section",
54421
- description: "The section a per-section summary row is about (D698); on a summary sent as one message, every section it reports, comma-separated.",
55075
+ description: "The section a per-section summary row is about; on a summary sent as one message, every section it reports, comma-separated.",
54422
55076
  example: "Batterie scariche",
54423
55077
  group: "system",
54424
55078
  families: ["rule"],
@@ -54841,10 +55495,9 @@ TimelapseRuleInputSchema.extend({
54841
55495
  createdAt: number(),
54842
55496
  updatedAt: number()
54843
55497
  });
54844
- async function readHubMotionDetected(deviceState, deviceId) {
54845
- let slice;
55498
+ async function readSlice(deviceState, deviceId) {
54846
55499
  try {
54847
- slice = await deviceState.getCapSlice.query({
55500
+ return await deviceState.getCapSlice.query({
54848
55501
  deviceId,
54849
55502
  capName: "motion"
54850
55503
  });
@@ -54852,10 +55505,44 @@ async function readHubMotionDetected(deviceState, deviceId) {
54852
55505
  const reason = err instanceof Error ? err.message : String(err);
54853
55506
  throw new Error(`motion state of device ${deviceId} is unreadable: ${reason}`, { cause: err });
54854
55507
  }
54855
- const detected = slice?.["detected"];
55508
+ }
55509
+ /**
55510
+ * The hub's `motion` slice as a `MotionStatus`, or `null` when nobody has
55511
+ * published it since the hub started. Throws when the hub does not answer or
55512
+ * the slice is malformed — never a made-up "no motion".
55513
+ */
55514
+ async function readHubMotionStatus(deviceState, deviceId) {
55515
+ const slice = await readSlice(deviceState, deviceId);
55516
+ if (slice === null) return null;
55517
+ const parsed = MotionStatusSchema.safeParse(slice);
55518
+ if (!parsed.success) throw new Error(`motion state of device ${deviceId} is malformed on the hub: ${parsed.error.message}`);
55519
+ return parsed.data;
55520
+ }
55521
+ async function readHubMotionDetected(deviceState, deviceId) {
55522
+ const detected = (await readSlice(deviceState, deviceId))?.["detected"];
54856
55523
  if (typeof detected !== "boolean") throw new Error(`motion state of device ${deviceId} is not published yet (unknown)`);
54857
55524
  return detected;
54858
55525
  }
55526
+ /**
55527
+ * The native `motion` provider of a camera whose slice the orchestrator writes
55528
+ * (D696): `isDetected` AND `getStatus`, both from the hub. `owner` names the
55529
+ * provider class in the deviceId-mismatch error.
55530
+ */
55531
+ function hubMotionNativeProvider(deviceState, deviceId, owner) {
55532
+ const ownDevice = (asked) => {
55533
+ if (asked !== deviceId) throw new Error(`${owner}: motion deviceId mismatch, expected ${deviceId}, got ${asked}`);
55534
+ };
55535
+ return {
55536
+ isDetected: async ({ deviceId: asked }) => {
55537
+ ownDevice(asked);
55538
+ return readHubMotionDetected(deviceState, deviceId);
55539
+ },
55540
+ getStatus: async ({ deviceId: asked }) => {
55541
+ ownDevice(asked);
55542
+ return readHubMotionStatus(deviceState, deviceId);
55543
+ }
55544
+ };
55545
+ }
54859
55546
  MotionOnMotionChangedDataSchema.omit({ triggeredBy: true });
54860
55547
  function providerMotionEvent(source, data) {
54861
55548
  return createEvent(EventCategory.ProviderMotion, source, data);
@@ -156043,7 +156730,7 @@ function buildInitialStatus2(config, enabled) {
156043
156730
  * Node-only (`node:child_process`), so it lives under `@camstack/types/node`.
156044
156731
  */
156045
156732
  /** The detail a site refusing for want of a binary puts in its refusal. */
156046
- var NO_PINNED_FFMPEG_DETAIL = "no pinned ffmpeg on this node (D540)";
156733
+ var NO_PINNED_FFMPEG_DETAIL = "no pinned ffmpeg on this node";
156047
156734
  /**
156048
156735
  * {@link pinnedFfmpegSpawner}, asked at the point of use through the node's
156049
156736
  * resolver (`memoizePinnedFfmpeg`). A site that keeps the RESOLVER rather than
@@ -156183,7 +156870,7 @@ var reolinkCameraSchema = object({
156183
156870
  host: string().describe("Camera IP or hostname"),
156184
156871
  port: number().default(9e3).describe("Baichuan port (default 9000)"),
156185
156872
  username: string().default("admin").describe("Username"),
156186
- password: string().describe("Password"),
156873
+ password: string().describe("Password").meta({ secret: true }),
156187
156874
  /**
156188
156875
  * Transport mode resolved at creation time by autodetect (Slice 15).
156189
156876
  * - `tcp` : standard TCP-based Baichuan (regular cameras, NVR/Hub)
@@ -156864,7 +157551,7 @@ var reolinkHubSchema = object({
156864
157551
  host: string().describe("Hub IP or hostname"),
156865
157552
  port: number().default(9e3).describe("Baichuan port (default 9000)"),
156866
157553
  username: string().default("admin"),
156867
- password: string(),
157554
+ password: string().meta({ secret: true }),
156868
157555
  /** Hubs are TCP-only on supported firmwares — kept here for symmetry. */
156869
157556
  transport: _enum(["tcp", "udp"]).default("tcp"),
156870
157557
  /** UID is unused on Hubs (no UDP discovery), but persisted for symmetry. */
@@ -166975,16 +167662,14 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
166975
167662
  * `handleSimpleEvent` emits its raw push as `ProviderMotion` (`source:
166976
167663
  * 'onboard'`, D673), the orchestrator's camera-sensors bridge turns it into
166977
167664
  * the effective `MotionOnMotionChanged`, and the orchestrator is the slice's
166978
- * only writer, with that effective value, on the hub. `isDetected`
166979
- * therefore answers from the HUB's slice; an unreadable hub, or a slice
166980
- * nobody has published since the hub started, fails the call. It never
166981
- * answers `false` for "unknown" (D49, D393).
167665
+ * only writer, with that effective value, on the hub. `isDetected` AND
167666
+ * `getStatus` therefore answer from the HUB's slice
167667
+ * (`hubMotionNativeProvider`); an unreadable hub fails both. Never `false`
167668
+ * for "unknown" (D49, D393).
166982
167669
  */
166983
167670
  registerMotionCap() {
166984
- this.ctx.registerNativeCap(motionCapability, { isDetected: async ({ deviceId }) => {
166985
- if (deviceId !== this.id) throw new Error(`ReolinkCamera: deviceId mismatch, expected ${this.id}, got ${deviceId}`);
166986
- return readHubMotionDetected(this.ctx.api.deviceState, this.id);
166987
- } });
167671
+ const motionProvider = hubMotionNativeProvider(this.ctx.api.deviceState, this.id, "ReolinkCamera");
167672
+ this.ctx.registerNativeCap(motionCapability, motionProvider);
166988
167673
  }
166989
167674
  registerNetworkLink() {
166990
167675
  this.ctx.registerNativeCap(networkLinkCapability, { getStatus: async ({ deviceId }) => {