@camstack/addon-provider-unifi 0.2.120 → 0.2.121

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 +882 -461
  2. package/dist/addon.mjs +882 -461
  3. package/package.json +1 -1
package/dist/addon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- //#region ../types/dist/event-category-BGmz_oxW.mjs
1
+ //#region ../types/dist/event-category-B_0XEcLF.mjs
2
2
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
3
3
  EventCategory["SystemBoot"] = "system.boot";
4
4
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -499,15 +499,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
499
499
  EventCategory["AgentWsDisconnected"] = "agent.ws.disconnected";
500
500
  EventCategory["AgentBackupActivated"] = "agent.backup.activated";
501
501
  EventCategory["OrchestrationSettingsUpdated"] = "orchestration.settings-updated";
502
- /**
503
- * Per-agent hwaccel preference changed (user override set, cleared, or
504
- * re-probed). Observability event — decoders pull the current pref at
505
- * `createSession`, so running sessions keep their current backend until
506
- * they rotate naturally (camera add/remove, stream restart). Future
507
- * work can wire a listener in stream-broker that force-rotates live
508
- * sessions; for now this event powers logs + admin-UI toast feedback.
509
- */
510
- EventCategory["PipelineAgentHwaccelChanged"] = "pipeline.agent-hwaccel-changed";
511
502
  EventCategory["MotionAnalysis"] = "detection.motion-analysis";
512
503
  /** All raw motion zones from CCL before minArea filter — for UI debug overlay. */
513
504
  EventCategory["MotionZonesRaw"] = "detection.motion-zones-raw";
@@ -5378,7 +5369,7 @@ var ZodIssueCode = {
5378
5369
  var ZodFirstPartyTypeKind;
5379
5370
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5380
5371
  //#endregion
5381
- //#region ../types/dist/sleep-DXKLNFvA.mjs
5372
+ //#region ../types/dist/sleep-BNeXenvr.mjs
5382
5373
  /**
5383
5374
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5384
5375
  * window to float samples (D455).
@@ -6744,32 +6735,12 @@ object({
6744
6735
  audioCodec: string().optional(),
6745
6736
  metadata: record(string(), unknown()).readonly().optional()
6746
6737
  });
6747
- var EncodedPacketSchema = object({
6748
- type: _enum(["video", "audio"]),
6749
- data: _instanceof(Uint8Array),
6750
- pts: number(),
6751
- dts: number(),
6752
- keyframe: boolean(),
6753
- codec: string()
6754
- });
6755
- var DecodedFrameSchema = object({
6756
- data: _instanceof(Uint8Array),
6757
- width: number(),
6758
- height: number(),
6759
- format: _enum([
6760
- "jpeg",
6761
- "rgb",
6762
- "bgr",
6763
- "yuv420",
6764
- "gray"
6765
- ]),
6766
- timestamp: number()
6767
- });
6768
6738
  /**
6769
6739
  * Wire schema for `FrameHandle` — a zero-pixel, serialisable reference to a
6770
6740
  * frame in a shared-memory ring (Phase 5 / D9). Mirrors the `FrameHandle` TS
6771
- * interface in `interfaces/frame-handle.ts` field-for-field so a decoder cap
6772
- * method (`pullHandles`) can carry handles over tRPC / Moleculer.
6741
+ * interface in `interfaces/frame-handle.ts` field-for-field so a cap method
6742
+ * (the runner's native-crop and pipeline-executor inputs) can carry handles
6743
+ * over tRPC / Moleculer.
6773
6744
  *
6774
6745
  * The `satisfies` assertion below pins this schema to the interface: if a
6775
6746
  * field is added to / removed from `FrameHandle` without a matching schema
@@ -6795,50 +6766,6 @@ var FrameHandleSchema = object({
6795
6766
  slotCount: number().int().positive()
6796
6767
  });
6797
6768
  /**
6798
- * Pixel format a frame-handle subscriber can request from the broker
6799
- * (Phase 5 / D9). The packed, raster subset of `FrameFormat` — the formats a
6800
- * `frameSink: 'shm'` decoder session can write into a `FrameRing` slot.
6801
- * `jpeg` is excluded: a variable-length stream is not a fixed-stride ring
6802
- * payload, and no decoded-frame consumer requests it over the shm plane.
6803
- */
6804
- var FrameHandleFormatSchema = _enum([
6805
- "rgb",
6806
- "bgr",
6807
- "yuv420",
6808
- "gray"
6809
- ]);
6810
- /**
6811
- * Input for `stream-broker.subscribeFrames` (Phase 5 / D9). A consumer asks the
6812
- * broker for a `FrameHandle` stream of one `format`; the broker maintains one
6813
- * shared-memory ring per `(brokerId, format)` actually requested, so a `gray`
6814
- * subscriber (motion) and an `rgb` subscriber (detection) each read the format
6815
- * they asked for with no broker-side conversion.
6816
- */
6817
- var SubscribeFramesInputSchema = object({
6818
- brokerId: string(),
6819
- format: FrameHandleFormatSchema,
6820
- /**
6821
- * Optional reader-side cadence hint in frames per second. The broker does
6822
- * NOT throttle — latest-wins ring reads drop frames implicitly for a slow
6823
- * consumer. The value is echoed back in `SubscribeFramesResult.maxFps` so
6824
- * the consumer can pace its own `pullFrameHandles` polling.
6825
- */
6826
- maxFps: number().positive().optional(),
6827
- /** Short caller-identity tag (`motion`, `detection`, …) for diagnostics. */
6828
- tag: string().optional()
6829
- });
6830
- /**
6831
- * Result of `stream-broker.subscribeFrames`. The consumer then polls
6832
- * `pullFrameHandles({ subscriptionId, maxCount })` and feeds each returned
6833
- * `FrameHandle` to a `FrameRingReader`.
6834
- */
6835
- var SubscribeFramesResultSchema = object({
6836
- /** Opaque id the consumer passes to `pullFrameHandles` / `unsubscribeFrames`. */
6837
- subscriptionId: string(),
6838
- /** Reader-side cadence hint (frames/s) — echoes `SubscribeFramesInput.maxFps`. */
6839
- maxFps: number().nonnegative()
6840
- });
6841
- /**
6842
6769
  * Wire schema for a decoded audio chunk (Phase 5 / D9). Mirrors the
6843
6770
  * `DecodedAudioChunk` TS interface in `interfaces/stream-broker.ts`: PCM
6844
6771
  * sample bytes plus the track parameters a consumer needs to interpret them.
@@ -6846,8 +6773,8 @@ var SubscribeFramesResultSchema = object({
6846
6773
  * Audio chunks are tiny (a ~500ms AudioCodecSession window is a few KB of
6847
6774
  * Float32 PCM), so unlike video frames they ship their bytes INLINE over
6848
6775
  * tRPC / Moleculer — no shared-memory plane. `data` is typed `Uint8Array`
6849
- * (the wire-serialisable supertype of `Buffer`) to match `DecodedFrameSchema`
6850
- * / `EncodedPacketSchema`'s precedent; a `Buffer` is assignable to it.
6776
+ * (the wire-serialisable supertype of `Buffer`); a `Buffer` is assignable to
6777
+ * it.
6851
6778
  */
6852
6779
  var AudioChunkFormatSchema = _enum(AUDIO_CHUNK_FORMATS);
6853
6780
  var DecodedAudioChunkSchema = object({
@@ -6865,11 +6792,10 @@ var DecodedAudioChunkSchema = object({
6865
6792
  format: AudioChunkFormatSchema.optional()
6866
6793
  });
6867
6794
  /**
6868
- * Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9). The
6869
- * handle-free, ship-bytes-inline analogue of `subscribeFrames`: a consumer
6870
- * asks the broker for the decoded audio-chunk stream of one broker; the
6871
- * broker keeps a per-subscription bounded FIFO queue the consumer drains via
6872
- * `pullAudioChunks`.
6795
+ * Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9). Audio ships
6796
+ * its bytes inline: a consumer asks the broker for the decoded audio-chunk
6797
+ * stream of one broker; the broker keeps a per-subscription bounded FIFO queue
6798
+ * the consumer drains via `pullAudioChunks`.
6873
6799
  */
6874
6800
  var SubscribeAudioChunksInputSchema = object({
6875
6801
  brokerId: string(),
@@ -6900,9 +6826,7 @@ var BrokerStatsSchema = object({
6900
6826
  "stopped"
6901
6827
  ]),
6902
6828
  inputFps: number(),
6903
- decodeFps: number(),
6904
6829
  encodedSubscribers: number(),
6905
- decodedSubscribers: number(),
6906
6830
  uptimeMs: number(),
6907
6831
  bitrateKbps: number(),
6908
6832
  idrIntervalMs: number(),
@@ -6915,14 +6839,6 @@ var BrokerStatsSchema = object({
6915
6839
  preBufferMs: number(),
6916
6840
  preBufferPackets: number(),
6917
6841
  /**
6918
- * Moleculer node id of the decoder provider currently servicing this
6919
- * stream's decoded subscribers. `null` until the deferred decoder is
6920
- * created (no decoded clients yet, or codec not detected). Surfaces the
6921
- * runtime decoder placement so the UI can show "Decoder: <agent>" without
6922
- * a separate cap call per broker.
6923
- */
6924
- decoderNodeId: string().nullable(),
6925
- /**
6926
6842
  * Detected audio track parameters from the RTSP DESCRIBE / SDP. `null`
6927
6843
  * when the stream has no audio track or the broker is in cold start.
6928
6844
  * `supported = false` means the codec was detected but the local
@@ -10258,70 +10174,6 @@ var StorageLocationDeclarationSchema = object({
10258
10174
  "backup"
10259
10175
  ]).optional()
10260
10176
  });
10261
- var DecoderStatsSchema = object({
10262
- inputFps: number(),
10263
- outputFps: number(),
10264
- avgDecodeTimeMs: number(),
10265
- droppedFrames: number(),
10266
- /**
10267
- * Pull-mode adaptive-fps telemetry (optional — only pull sessions run the
10268
- * lag-driven controller; push sessions omit these). `lagMs` is the EWMA of
10269
- * the decoder's real-time drift (rising = falling behind live); `adaptiveFps`
10270
- * is the current lag-throttled emit rate (≤ `effectiveFps` ceiling).
10271
- */
10272
- lagMs: number().optional(),
10273
- effectiveFps: number().optional(),
10274
- adaptiveFps: number().optional()
10275
- });
10276
- var DecoderSessionConfigSchema = object({
10277
- codec: string(),
10278
- maxFps: number().default(0),
10279
- outputFormat: _enum([
10280
- "jpeg",
10281
- "rgb",
10282
- "bgr",
10283
- "yuv420",
10284
- "gray"
10285
- ]).default("jpeg"),
10286
- scale: number().default(1),
10287
- width: number().optional(),
10288
- height: number().optional(),
10289
- /**
10290
- * Identifier of the camera this decoder session serves. Optional
10291
- * because the cap is generic (any caller could request decode), but
10292
- * stream-broker passes it so decoder logs include `deviceId` for
10293
- * per-camera filtering when diagnosing failures (e.g. node-av
10294
- * sendPacket errors on a single hung camera).
10295
- */
10296
- deviceId: number().int().nonnegative().optional(),
10297
- /**
10298
- * Free-form tag for log scoping. Stream-broker uses
10299
- * `broker:<deviceId>/<profile>`. Decoder session logger surfaces it
10300
- * on every line so `grep tag=broker:5/high` filters one camera
10301
- * profile cleanly.
10302
- */
10303
- tag: string().optional(),
10304
- /**
10305
- * Where the session delivers decoded frames (Phase 5 / D9):
10306
- *
10307
- * - `'callback'` (default) — the legacy pixel path: decoded frames are
10308
- * buffered as `DecodedFrame`s and drained via `pullFrames`.
10309
- * - `'shm'` — the shared-memory frame plane: decoded frames are written
10310
- * into an OS shared-memory ring and drained as zero-pixel
10311
- * `FrameHandle`s via `pullHandles`. A session is one mode or the
10312
- * other — `pullFrames` returns nothing for an `'shm'` session and
10313
- * `pullHandles` returns nothing for a `'callback'` session.
10314
- */
10315
- frameSink: _enum(["callback", "shm"]).default("callback"),
10316
- /**
10317
- * Per-camera decoder DEBUG facility. When `true`, a pull-mode session emits
10318
- * a throttled (~1Hz) structured `decoder debug` line (effective/adaptive fps,
10319
- * real-time lag, dropped-frame delta, avg decode time, hwaccel). Mirrors the
10320
- * stream-broker's `streamingDebug` gate — off by default so production logs
10321
- * stay quiet and the emit path pays zero per-frame cost when disabled.
10322
- */
10323
- debug: boolean().optional()
10324
- });
10325
10177
  /**
10326
10178
  * Per-component log CHANNELS — the gate a hot path consults, and the registry
10327
10179
  * an addon declares its channels in.
@@ -10464,6 +10316,26 @@ var ClipSearchStrictnessSchema = _enum([
10464
10316
  "balanced",
10465
10317
  "strict"
10466
10318
  ]);
10319
+ /** Steps whose effect a root label can BE. */
10320
+ var LABEL_SUPPLY_STEP_IDS = [
10321
+ "animal-classifier",
10322
+ "vehicle-classifier",
10323
+ "package-detection"
10324
+ ];
10325
+ /** Steps whose box a root detection can BE. */
10326
+ var CROP_SUPPLY_STEP_IDS = ["plate-detection", "face-detection"];
10327
+ /**
10328
+ * Steps whose per-detection MASK a root detection can carry (D737). The live
10329
+ * mask step is `segmentation` — a frame-plane refiner that runs its own model
10330
+ * once per detection crop. (`instance-segmentation` is a dormant step id that
10331
+ * no camera tree carries.)
10332
+ */
10333
+ var MASK_SUPPLY_STEP_IDS = ["segmentation"];
10334
+ [
10335
+ ...LABEL_SUPPLY_STEP_IDS,
10336
+ ...CROP_SUPPLY_STEP_IDS,
10337
+ ...MASK_SUPPLY_STEP_IDS
10338
+ ];
10467
10339
  var MODEL_FORMATS = [
10468
10340
  "onnx",
10469
10341
  "coreml",
@@ -10492,7 +10364,53 @@ var ModelFormatEntrySchema = object({
10492
10364
  /** Multi-file payload (directory members or sibling files). */
10493
10365
  files: array(string()).readonly().optional(),
10494
10366
  /** Runtime(s) that can use this format. If omitted, inferred from ModelFormat key */
10495
- runtimes: array(_enum(["python"])).readonly().optional()
10367
+ runtimes: array(_enum(["python"])).readonly().optional(),
10368
+ /**
10369
+ * Content revision of the artefact, for one hosted OFF the CamStack mirror.
10370
+ * A format on the mirror leaves it unset: its revision (the sha256 of its
10371
+ * weight file) comes from the downloader's generated table, kept in step
10372
+ * with the mirror by `scripts/check-hosted-model-revisions.ts` (D744). A
10373
+ * node records the revision it downloaded next to the file
10374
+ * (`<file>.revision`); a copy with no record or a different one is stale
10375
+ * unless its weight file hashes to the revision, and a stale copy is
10376
+ * downloaded again, the old one serving until the new one is complete. No
10377
+ * revision at all ⇒ a file on disk is current, whatever it holds (D743).
10378
+ */
10379
+ revision: string().min(1).optional()
10380
+ });
10381
+ /**
10382
+ * What a node holds for one (model, format) (D746). `current` is a complete
10383
+ * copy at its catalog revision — exactly what `downloaded: true` means.
10384
+ * `stale` is bytes on disk that are not (yet) proven current under D743/D744:
10385
+ * no or a different revision record, or a missing sibling. `missing` is no
10386
+ * copy. `downloaded` alone folds `stale` into "not downloaded", which hid
10387
+ * reclaimable bytes and a copy about to be replaced.
10388
+ */
10389
+ var ModelOnDiskStateSchema = _enum([
10390
+ "current",
10391
+ "stale",
10392
+ "missing"
10393
+ ]);
10394
+ /**
10395
+ * The numeric precision of one format's BUILD (D746) — reported only when the
10396
+ * build states it (file-name token, an INT8 variant, an EdgeTPU compile, a
10397
+ * CamStack Core ML export). Absent means "not stated", never "fp32".
10398
+ */
10399
+ var ModelFormatPrecisionSchema = _enum([
10400
+ "fp32",
10401
+ "fp16",
10402
+ "int8"
10403
+ ]);
10404
+ /**
10405
+ * One format of one model as a node's `pipelineExecutor.getSchema` reports it.
10406
+ * `onDisk` / `precision` are optional for version skew: a runner that predates
10407
+ * them omits them, and a reader falls back to `downloaded`.
10408
+ */
10409
+ var PipelineModelFormatStatusSchema = object({
10410
+ downloaded: boolean(),
10411
+ sizeMB: number(),
10412
+ onDisk: ModelOnDiskStateSchema.optional(),
10413
+ precision: ModelFormatPrecisionSchema.optional()
10496
10414
  });
10497
10415
  /**
10498
10416
  * Extra file that must be downloaded alongside the model (e.g., labels JSON, dict.txt).
@@ -10596,6 +10514,46 @@ var ModelLicenseSchema = preprocess((value) => typeof value === "string" ? { wei
10596
10514
  /** True when the weights or their data forbid commercial use. */
10597
10515
  nonCommercial: boolean().optional()
10598
10516
  }));
10517
+ /**
10518
+ * One step a ROOT detector can supply from its own output (D730) — see
10519
+ * `ModelCatalogEntry.suppliesSteps`.
10520
+ *
10521
+ * - `label`: the root's raw class IS the step's answer. `labelToEffect` maps
10522
+ * the root's label to the step's vocabulary; `uncovered` is the vocabulary
10523
+ * the root cannot produce (shown as unavailable, never a blocker).
10524
+ * - `crop`: the root draws the box the step would have found (`license_plate`
10525
+ * for plate-detection, `face` for face-detection). The box becomes a detail
10526
+ * child of the `parentMacro` detection that contains it — never a track.
10527
+ * - `mask`: the root's decode emits an instance mask with every detection (a
10528
+ * YOLO26-seg root, D737) — the `segmentation` step's result, carried on the
10529
+ * detection in the shape that step produces. Derived from the model's
10530
+ * postprocessor on read, never stored by an import.
10531
+ */
10532
+ var RootStepSupplySchema = discriminatedUnion("kind", [
10533
+ object({
10534
+ kind: literal("label"),
10535
+ stepId: _enum(LABEL_SUPPLY_STEP_IDS),
10536
+ labelToEffect: record(string(), string()),
10537
+ uncovered: array(string()).readonly()
10538
+ }),
10539
+ object({
10540
+ kind: literal("crop"),
10541
+ stepId: _enum(CROP_SUPPLY_STEP_IDS),
10542
+ rootLabels: array(string()).readonly(),
10543
+ parentMacro: _enum(["vehicle", "person"]),
10544
+ childClass: _enum(["plate", "face"]),
10545
+ /**
10546
+ * The root's smaller input side, stamped on read by `rootSuppliesOf` from
10547
+ * the model entry — what a step's `minRootInputPx` gate judges. Never
10548
+ * stored by an import.
10549
+ */
10550
+ rootInputPx: number().int().positive().optional()
10551
+ }),
10552
+ object({
10553
+ kind: literal("mask"),
10554
+ stepId: _enum(MASK_SUPPLY_STEP_IDS)
10555
+ })
10556
+ ]);
10599
10557
  var ModelCatalogEntrySchema = object({
10600
10558
  id: string(),
10601
10559
  name: string(),
@@ -10661,6 +10619,35 @@ var ModelCatalogEntrySchema = object({
10661
10619
  */
10662
10620
  defaultConfidence: number().min(0).max(1).optional(),
10663
10621
  /**
10622
+ * Per-MODEL default of the per-class confidence floors (`minConfidence<Macro>`
10623
+ * on a detector step), keyed by macro class: `{ person: 0.45 }`. A class
10624
+ * absent here runs at the step slider's global default. The same row shape
10625
+ * the floor measurement produces (`model-floors.json`: modelId → floors), so
10626
+ * a measured table is copied in as-is. An operator override is bound to the
10627
+ * model it was made for and does not survive a model change (D738). A custom
10628
+ * / imported model may declare it; without it, the global defaults apply.
10629
+ */
10630
+ defaultClassFloors: record(string(), number().min(0).max(1)).optional(),
10631
+ /**
10632
+ * The inference precision this model's OpenVINO IR needs on an Intel GPU.
10633
+ * Absent ⇒ the device default (f16 on a GPU). Set to `'f32'` for an FP32 IR
10634
+ * that produces invalid output at f16 — measured 2026-10-07 for YOLO26
10635
+ * base IRs (`yolo26s`: 0 true / 146 false positives; `yolo26m*`: NaN
10636
+ * scores) on the Core Ultra iGPU and the N100. Threaded to the pool as
10637
+ * `PoolModelConfig.gpuInferencePrecision`; the pool sets
10638
+ * INFERENCE_PRECISION_HINT on a GPU only. Costs ~60% latency on the GPU.
10639
+ */
10640
+ gpuInferencePrecision: _enum(["f32", "f16"]).optional(),
10641
+ /**
10642
+ * ROOT detectors only: per supplied step (`animal-classifier`, …), the
10643
+ * minimum DETECTION score from which this root's own fine label (species,
10644
+ * vehicle type — D736 root supply) is taken (D741). Below it the detection
10645
+ * keeps its macro class without the fine label. `1` = never take it from
10646
+ * this root. Absent ⇒ no floor beyond the macro floor. The supplied step's
10647
+ * `minConfidence` slider, bound to the ROOT model, overrides it.
10648
+ */
10649
+ suppliedLabelFloors: record(string(), number().min(0).max(1)).optional(),
10650
+ /**
10664
10651
  * When true, the executor produces a landmark-aligned crop (similarity warp
10665
10652
  * onto the canonical template) before this step runs, instead of a plain
10666
10653
  * axis-aligned bbox crop. Required for face-recognition embedders (ArcFace):
@@ -10722,6 +10709,16 @@ var ModelCatalogEntrySchema = object({
10722
10709
  */
10723
10710
  classMap: DetectionCatalogClassMapSchema.optional(),
10724
10711
  /**
10712
+ * The pipeline steps this ROOT detector can supply from its own output
10713
+ * (D730): its labels name a step's effect (`deer` for `animal-classifier`)
10714
+ * or draw a step's box (`license_plate` for `plate-detection`). Computed at
10715
+ * import from THIS model's labelmap by `deriveRootSupplies`, never written
10716
+ * by hand and never assumed per family; a row without it is derived on read
10717
+ * (`rootSuppliesOf`). Whether a camera uses it is the step's own
10718
+ * `useRootModel` flag (`resolveRootSupply`).
10719
+ */
10720
+ suppliesSteps: array(RootStepSupplySchema).readonly().optional(),
10721
+ /**
10725
10722
  * The model's CLIP feature-space contract (text encoder, dimension, vector
10726
10723
  * index, token window, search floor) — see `clip-model.ts`. Present ONLY on a
10727
10724
  * CLIP image encoder; its absence is what "not a CLIP model" means to the
@@ -12323,13 +12320,6 @@ var BrokerRtspClientSchema = object({
12323
12320
  lastRtpAt: number(),
12324
12321
  bytesSent: number()
12325
12322
  });
12326
- var BrokerDecodedClientSchema = object({
12327
- tag: string(),
12328
- subscribedAt: number(),
12329
- maxFps: number(),
12330
- framesDelivered: number(),
12331
- framesDropped: number()
12332
- });
12333
12323
  var BrokerAudioClientSchema = object({
12334
12324
  tag: string(),
12335
12325
  subscribedAt: number(),
@@ -12421,7 +12411,6 @@ var BrokerEncodedClientSchema = object({
12421
12411
  });
12422
12412
  var BrokerClientsSchema = object({
12423
12413
  rtsp: array(BrokerRtspClientSchema).readonly(),
12424
- decoded: array(BrokerDecodedClientSchema).readonly(),
12425
12414
  audio: array(BrokerAudioClientSchema).readonly(),
12426
12415
  encoded: array(BrokerEncodedClientSchema).readonly(),
12427
12416
  pipeClients: number(),
@@ -12790,11 +12779,7 @@ method(object({
12790
12779
  auth: "admin"
12791
12780
  }), method(object({ brokerId: string() }), BrokerClientsSchema), method(object({
12792
12781
  brokerId: string(),
12793
- channel: _enum([
12794
- "rtsp",
12795
- "decoded",
12796
- "audio"
12797
- ]),
12782
+ channel: _enum(["rtsp", "audio"]),
12798
12783
  handle: string()
12799
12784
  }), object({ killed: boolean() }), {
12800
12785
  kind: "mutation",
@@ -12829,10 +12814,7 @@ method(object({
12829
12814
  }), method(SubscribeAudioChunksInputSchema, SubscribeAudioChunksResultSchema, { kind: "mutation" }), method(object({
12830
12815
  subscriptionId: string(),
12831
12816
  maxCount: number().int().positive().default(8)
12832
- }), array(DecodedAudioChunkSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(SubscribeFramesInputSchema, SubscribeFramesResultSchema, { kind: "mutation" }), method(object({
12833
- subscriptionId: string(),
12834
- maxCount: number().int().positive().default(4)
12835
- }), array(FrameHandleSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(object({
12817
+ }), array(DecodedAudioChunkSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(object({
12836
12818
  brokerId: string(),
12837
12819
  seconds: number().min(0).max(30)
12838
12820
  }), _void(), {
@@ -14091,54 +14073,12 @@ id: union([string(), number()]) }), {
14091
14073
  kind: "mutation",
14092
14074
  auth: "admin"
14093
14075
  });
14094
- /**
14095
- * shm ring usage stats for a `frameSink: 'shm'` decoder session —
14096
- * exposed via `decoder.getShmStats` so downstream consumers can
14097
- * observe ring pressure (slot count, byte budget, hit/miss ratio).
14098
- */
14099
- var ShmRingStatsSchema = object({
14100
- sessionId: string(),
14101
- slotCount: number().int(),
14102
- slotByteLength: number().int(),
14103
- segmentBytes: number().int(),
14104
- budgetMb: number().int(),
14105
- framesWritten: number().int(),
14106
- getFrameHits: number().int(),
14107
- getFrameMisses: number().int()
14108
- });
14109
- method(object({ codec: string() }), boolean()), method(_void(), object({
14076
+ method(_void(), object({
14110
14077
  id: string(),
14111
14078
  name: string(),
14112
- isPullMode: boolean().optional(),
14113
- priority: number().optional(),
14114
14079
  hwaccel: string().optional(),
14115
14080
  probedBestHwaccel: string().optional()
14116
- })), method(DecoderSessionConfigSchema, object({
14117
- sessionId: string(),
14118
- nodeId: string()
14119
- })), method(object({ sessionId: string() }), _void()), method(object({
14120
- sessionId: string(),
14121
- packet: EncodedPacketSchema
14122
- }), _void()), method(object({
14123
- sessionId: string(),
14124
- url: string()
14125
- }), _void()), method(object({
14126
- sessionId: string(),
14127
- maxCount: number().default(1),
14128
- waitMs: number().optional()
14129
- }), array(DecodedFrameSchema)), method(object({
14130
- sessionId: string(),
14131
- maxCount: number().default(1),
14132
- waitMs: number().optional()
14133
- }), array(FrameHandleSchema)), method(object({ handle: FrameHandleSchema }), DecodedFrameSchema.nullable()), method(object({ sessionId: string() }), ShmRingStatsSchema.nullable()), method(object({
14134
- sessionId: string(),
14135
- config: DecoderSessionConfigSchema.partial()
14136
- }), _void()), method(object({ sessionId: string() }), DecoderStatsSchema), method(_void(), array(object({
14137
- sessionId: string(),
14138
- codec: string(),
14139
- outputFormat: string(),
14140
- createdAtMs: number()
14141
- })).readonly()), method(_void(), object({ backend: string() }), {
14081
+ })), method(_void(), object({ backend: string() }), {
14142
14082
  kind: "mutation",
14143
14083
  auth: "admin"
14144
14084
  });
@@ -16283,6 +16223,12 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
16283
16223
  kind: "mutation",
16284
16224
  auth: "admin"
16285
16225
  });
16226
+ var HUB_ADDRESS_ROLES = [
16227
+ "appConnections",
16228
+ "notificationTaps",
16229
+ "internal",
16230
+ "publicEndpoint"
16231
+ ];
16286
16232
  /**
16287
16233
  * Transport bounds for AI capability methods.
16288
16234
  *
@@ -18885,6 +18831,8 @@ var NcSystemEventKindSchema = _enum([
18885
18831
  "stream-offline",
18886
18832
  "node-online",
18887
18833
  "node-offline",
18834
+ "node-restarting",
18835
+ "node-updating",
18888
18836
  "node-inference-unavailable",
18889
18837
  "detection-blind",
18890
18838
  "addon-crash-loop",
@@ -20490,7 +20438,13 @@ var NcAlarmModeDelaysListSchema = array(object({
20490
20438
  * Absent = false (logged, not sent). Even when true it is not sent when that same sensor
20491
20439
  * is the one that starts the entry delay — the entry-delay notification already names it.
20492
20440
  */
20493
- notifySensorRewatched: boolean().optional()
20441
+ notifySensorRewatched: boolean().optional(),
20442
+ /**
20443
+ * D735: notify "ignored" when a sensor this arm bypassed really MOVED while armed (its own
20444
+ * change time is after the arm) and set nothing off. Absent = false (logged, not sent). A
20445
+ * re-sync, a recovery from `unavailable` or a duplicate is never announced, switch or not.
20446
+ */
20447
+ notifySensorIgnored: boolean().optional()
20494
20448
  })).max(8).refine(uniqueModes, { message: "modeDelays: at most one entry per arm mode" });
20495
20449
  var NcAlarmModeDelaysEditListSchema = array(object({
20496
20450
  mode: AlarmArmModeSchema,
@@ -20503,7 +20457,9 @@ var NcAlarmModeDelaysEditListSchema = array(object({
20503
20457
  /** D706: set the switch, or `null` to clear it (back to the default, false). */
20504
20458
  notifyDuringEntryDelay: boolean().nullable().optional(),
20505
20459
  /** D706: set the switch, or `null` to clear it (back to the default, false). */
20506
- notifySensorRewatched: boolean().nullable().optional()
20460
+ notifySensorRewatched: boolean().nullable().optional(),
20461
+ /** D735: set the switch, or `null` to clear it (back to the default, false). */
20462
+ notifySensorIgnored: boolean().nullable().optional()
20507
20463
  })).max(8).refine(uniqueModes, { message: "modeDelays: at most one edit per arm mode" });
20508
20464
  /** One switch of the alarm table: put ONE device on, or take it off, ONE mode's list. */
20509
20465
  var NcAlarmNonBlockingEditSchema = object({
@@ -21481,8 +21437,8 @@ Object.freeze(Object.fromEntries([{
21481
21437
  var CLUSTER_STEP_SETTING_FIELDS = [{
21482
21438
  stepId: "face-embedding",
21483
21439
  key: "minLandmarkFaceSize",
21484
- label: "Min face size for recognition (detection px)",
21485
- 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.",
21440
+ label: "Min face size to embed (detection-frame px)",
21441
+ 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.",
21486
21442
  type: "slider",
21487
21443
  min: 0,
21488
21444
  max: 64,
@@ -23402,6 +23358,34 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
23402
23358
  timestamp: number()
23403
23359
  });
23404
23360
  /**
23361
+ * A root model's boxes standing in for one crop-kind step's own inference
23362
+ * (D730) — see `runPipeline.suppliedRoot`.
23363
+ */
23364
+ var SuppliedRootOutputSchema = object({
23365
+ stepId: string(),
23366
+ /** The root model that drew the boxes — stamped on the result. */
23367
+ modelId: string(),
23368
+ detections: array(object({
23369
+ /** `[x1, y1, x2, y2]` in the pixels of the call's image. */
23370
+ bbox: tuple([
23371
+ number(),
23372
+ number(),
23373
+ number(),
23374
+ number()
23375
+ ]),
23376
+ score: number(),
23377
+ /**
23378
+ * Five facial landmarks in the same pixels — a face the step's own
23379
+ * detector already re-found inside a root face box (D730), so its
23380
+ * embedder child aligns it exactly as it aligns any detected face.
23381
+ */
23382
+ landmarks: array(object({
23383
+ x: number(),
23384
+ y: number()
23385
+ })).optional()
23386
+ })).min(1)
23387
+ });
23388
+ /**
23405
23389
  * Reference to the frame's retained NATIVE surface + the parent crop's placement
23406
23390
  * within the frame, so the executor can re-cut a leaf child ROI at native
23407
23391
  * resolution on the detail plane. See the `runPipeline` `nativeCropRef` field.
@@ -23449,7 +23433,7 @@ var FrameRefSchema = object({
23449
23433
  timestamp: number(),
23450
23434
  capturedAt: number().optional()
23451
23435
  });
23452
- var ModelFormatSchema$1 = _enum([
23436
+ var ModelFormatSchema$2 = _enum([
23453
23437
  "onnx",
23454
23438
  "coreml",
23455
23439
  "openvino",
@@ -23467,7 +23451,7 @@ var PipelineSlotSchema = _enum([
23467
23451
  var PipelineEngineChoiceSchema = object({
23468
23452
  runtime: literal("python"),
23469
23453
  backend: string(),
23470
- format: ModelFormatSchema$1,
23454
+ format: ModelFormatSchema$2,
23471
23455
  device: string().optional()
23472
23456
  });
23473
23457
  /**
@@ -23506,32 +23490,15 @@ var PipelineDefaultStepSchema = lazy(() => object({
23506
23490
  group: string().optional(),
23507
23491
  settings: record(string(), unknown()).optional()
23508
23492
  }));
23509
- var PipelineTemplateStepSchema = lazy(() => object({
23510
- addonId: string(),
23511
- enabled: boolean(),
23512
- modelId: string(),
23513
- children: array(PipelineTemplateStepSchema).readonly(),
23514
- settings: record(string(), unknown()).optional()
23515
- }));
23516
- var PipelineTemplateSchema$1 = object({
23517
- id: string(),
23518
- name: string(),
23519
- createdAt: string(),
23520
- updatedAt: string(),
23521
- engine: PipelineEngineChoiceSchema,
23522
- steps: array(PipelineTemplateStepSchema).readonly()
23523
- });
23524
23493
  var PipelineModelOptionSchema = object({
23525
23494
  id: string(),
23526
23495
  name: string(),
23527
- formats: record(string(), object({
23528
- downloaded: boolean(),
23529
- sizeMB: number()
23530
- })),
23496
+ formats: record(string(), PipelineModelFormatStatusSchema),
23531
23497
  group: ModelVariantGroupSchema.optional(),
23532
23498
  legacy: boolean().optional(),
23533
23499
  provider: ModelProviderIdSchema.optional(),
23534
- defaultConfidence: number().optional()
23500
+ defaultConfidence: number().optional(),
23501
+ suppliesSteps: array(RootStepSupplySchema).readonly().optional()
23535
23502
  });
23536
23503
  var ConfigFieldBridge = custom();
23537
23504
  var PipelineAddonSchemaSchema = object({
@@ -23693,6 +23660,22 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
23693
23660
  }), {
23694
23661
  kind: "mutation",
23695
23662
  auth: "admin"
23663
+ }), method(object({
23664
+ nodeId: string(),
23665
+ deviceIds: array(number()).readonly().optional(),
23666
+ dryRun: boolean()
23667
+ }), object({
23668
+ entries: array(object({
23669
+ deviceId: number(),
23670
+ keys: array(string()).readonly()
23671
+ })).readonly(),
23672
+ refused: array(object({
23673
+ deviceId: number(),
23674
+ reason: string()
23675
+ })).readonly()
23676
+ }), {
23677
+ kind: "mutation",
23678
+ auth: "admin"
23696
23679
  }), method(object({ nodeId: string() }), object({ unhealthy: array(object({
23697
23680
  /** `<backend>:<device>`, e.g. `openvino:gpu`. */
23698
23681
  deviceKey: string(),
@@ -23718,22 +23701,14 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
23718
23701
  }), method(_void(), PipelineSchemaSchema), method(_void(), array(PipelineDefaultStepSchema).readonly().nullable()), method(_void(), PipelineConfigBridge), method(_void(), ConfigUISchemaBridge), method(object({
23719
23702
  steps: array(PipelineStepInputSchema),
23720
23703
  deviceKey: string().optional()
23721
- }), PipelineValidationResultSchema), method(_void(), array(PipelineTemplateSchema$1).readonly()), method(object({
23722
- name: string(),
23723
- steps: array(PipelineTemplateStepSchema).readonly(),
23724
- engine: PipelineEngineChoiceSchema
23725
- }), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({
23726
- id: string(),
23727
- name: string().optional(),
23728
- steps: array(PipelineTemplateStepSchema).readonly().optional()
23729
- }), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({ id: string() }), _void(), { kind: "mutation" }), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
23704
+ }), PipelineValidationResultSchema), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
23730
23705
  addonId: string(),
23731
23706
  modelId: string(),
23732
- format: ModelFormatSchema$1
23707
+ format: ModelFormatSchema$2
23733
23708
  }), DownloadModelResultSchema, { kind: "mutation" }), method(object({
23734
23709
  addonId: string(),
23735
23710
  modelId: string(),
23736
- format: ModelFormatSchema$1
23711
+ format: ModelFormatSchema$2
23737
23712
  }), object({ success: literal(true) }), { kind: "mutation" }), method(object({
23738
23713
  steps: array(PipelineStepInputSchema).min(1),
23739
23714
  frame: FrameInputSchema.optional(),
@@ -23799,7 +23774,16 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
23799
23774
  * `device-not-servable`), and nothing reaches the camera's live
23800
23775
  * trace stream. Absent ⇒ unchanged behaviour.
23801
23776
  */
23802
- replay: literal(true).optional()
23777
+ replay: literal(true).optional(),
23778
+ /**
23779
+ * Root-supplied detections for the tree's ROOT step (D730). Set by
23780
+ * `runDetailSubtree` when the camera's root model supplies a crop-kind
23781
+ * step (a Frigate+ `license_plate` for `plate-detection`): the step is
23782
+ * NOT inferred, these boxes are its output, and its children (the plate
23783
+ * reader) run on them through their own crop policy. Boxes are in the
23784
+ * PIXELS of the image this call carries. Absent ⇒ the root step runs.
23785
+ */
23786
+ suppliedRoot: SuppliedRootOutputSchema.optional()
23803
23787
  }), PipelineRunResultBridge, { kind: "mutation" }), method(object({
23804
23788
  steps: array(PipelineStepInputSchema).min(1),
23805
23789
  frames: array(FrameInputSchema).min(1).max(255),
@@ -23881,6 +23865,375 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
23881
23865
  filename: string().optional(),
23882
23866
  settings: record(string(), unknown()).optional()
23883
23867
  }), AudioTestResultSchema, { kind: "mutation" }), method(_void(), ConfigUISchemaNullableBridge);
23868
+ /**
23869
+ * The wire shapes of the Auto tune plan and apply (D745), used by the
23870
+ * `pipeline-orchestrator` cap. The recommender's own types
23871
+ * (`recommend.ts`) are the TS face of the same data; these
23872
+ * schemas are what crosses the cap boundary.
23873
+ */
23874
+ var ModelFormatSchema$1 = _enum(MODEL_FORMATS);
23875
+ /** The operator's range for it. */
23876
+ var MIN_SESSIONS_PER_DEVICE_RANGE = {
23877
+ min: 1,
23878
+ max: 8
23879
+ };
23880
+ var HardwareClassIdSchema = _enum([
23881
+ "intel-core-ultra",
23882
+ "intel-n-series",
23883
+ "apple-m-base",
23884
+ "apple-m-pro",
23885
+ "unknown"
23886
+ ]);
23887
+ var AcceleratorKindSchema = _enum([
23888
+ "intel-npu",
23889
+ "intel-igpu",
23890
+ "x86-cpu",
23891
+ "arm-cpu",
23892
+ "apple-ane",
23893
+ "coral"
23894
+ ]);
23895
+ var RecommendationReasonSchema = discriminatedUnion("kind", [
23896
+ object({
23897
+ kind: literal("capacity"),
23898
+ sessions: number(),
23899
+ minSessions: number()
23900
+ }),
23901
+ object({
23902
+ kind: literal("tie-faster"),
23903
+ over: string(),
23904
+ recallDelta: number()
23905
+ }),
23906
+ object({
23907
+ kind: literal("stepped-down"),
23908
+ from: string(),
23909
+ to: string(),
23910
+ limitedBy: string()
23911
+ }),
23912
+ object({
23913
+ kind: literal("no-fit-lightest"),
23914
+ sessions: number(),
23915
+ minSessions: number()
23916
+ }),
23917
+ object({
23918
+ kind: literal("derived-latency"),
23919
+ modelId: string()
23920
+ }),
23921
+ object({ kind: literal("cpu-device") }),
23922
+ object({ kind: literal("coral-untouched") }),
23923
+ object({ kind: literal("device-disabled") }),
23924
+ object({ kind: literal("device-unavailable") }),
23925
+ object({ kind: literal("node-offline") }),
23926
+ object({ kind: literal("no-hardware-facts") }),
23927
+ object({
23928
+ kind: literal("no-measured-data"),
23929
+ hardwareClass: HardwareClassIdSchema
23930
+ }),
23931
+ object({
23932
+ kind: literal("no-family-build"),
23933
+ format: ModelFormatSchema$1
23934
+ })
23935
+ ]);
23936
+ var DeviceModelChoiceSchema = object({
23937
+ modelId: string(),
23938
+ p50Ms: number(),
23939
+ fps: number(),
23940
+ measured: boolean(),
23941
+ /** Parallel sessions at the camera rate with the headroom kept free: ⌊fps × (1 − headroom) / camera fps⌋. */
23942
+ capacitySessions: number(),
23943
+ personRecall: number()
23944
+ });
23945
+ var DeviceRecommendationSchema = object({
23946
+ deviceKey: string(),
23947
+ accelerator: AcceleratorKindSchema.nullable(),
23948
+ enabled: boolean(),
23949
+ available: boolean(),
23950
+ chosen: DeviceModelChoiceSchema.nullable(),
23951
+ reasons: array(RecommendationReasonSchema).readonly()
23952
+ });
23953
+ var NodeRecommendationSchema = object({
23954
+ nodeId: string(),
23955
+ reachable: boolean(),
23956
+ hardwareClass: HardwareClassIdSchema.nullable(),
23957
+ cpuModel: string().nullable(),
23958
+ skipped: boolean(),
23959
+ acceleratorModelId: string().nullable(),
23960
+ devices: array(DeviceRecommendationSchema).readonly(),
23961
+ reasons: array(RecommendationReasonSchema).readonly()
23962
+ });
23963
+ var ModelPinChangeSchema = object({
23964
+ stepId: string(),
23965
+ before: string().nullable(),
23966
+ after: string().nullable()
23967
+ });
23968
+ var NodeDeviceChangeSchema = object({
23969
+ nodeId: string(),
23970
+ deviceKey: string(),
23971
+ madeExplicit: boolean(),
23972
+ modelPins: array(ModelPinChangeSchema).readonly(),
23973
+ thresholds: array(object({
23974
+ stepId: string(),
23975
+ keys: array(string()).readonly()
23976
+ })).readonly()
23977
+ });
23978
+ var CameraOverrideClearSchema = object({
23979
+ deviceId: number(),
23980
+ source: _enum(["step-override", "wholesale"]),
23981
+ nodeId: string(),
23982
+ deviceKey: string().nullable(),
23983
+ stepId: string(),
23984
+ modelIdBefore: string().nullable(),
23985
+ keys: array(string()).readonly()
23986
+ });
23987
+ var DetectorStoreClearSchema = object({
23988
+ deviceId: number(),
23989
+ keys: array(string()).readonly()
23990
+ });
23991
+ var AutoTuneWarningSchema = discriminatedUnion("kind", [
23992
+ object({
23993
+ kind: literal("detector-store-cluster-wide"),
23994
+ skippedNodes: array(string()).readonly()
23995
+ }),
23996
+ object({
23997
+ kind: literal("detector-store-unreadable"),
23998
+ error: string()
23999
+ }),
24000
+ object({
24001
+ kind: literal("coral-enabled"),
24002
+ nodeId: string(),
24003
+ deviceKey: string()
24004
+ })
24005
+ ]);
24006
+ var AutoTuneOptionsSchema = object({
24007
+ /** Share of each accelerator's throughput kept free (0.3–0.5). */
24008
+ headroom: number().min(.3).max(.5).default(.4),
24009
+ /**
24010
+ * The least number of parallel sessions every device must sustain at the
24011
+ * camera rate with the headroom kept free (D755). The most accurate model
24012
+ * that reaches it wins.
24013
+ */
24014
+ minSessionsPerDevice: number().int().min(MIN_SESSIONS_PER_DEVICE_RANGE.min).max(MIN_SESSIONS_PER_DEVICE_RANGE.max).default(2)
24015
+ });
24016
+ var AutoTunePlanSchema = object({
24017
+ /** Hash of everything the apply will write — the apply refuses a different one. */
24018
+ planHash: string(),
24019
+ family: literal("yolov9"),
24020
+ headroom: number(),
24021
+ minSessionsPerDevice: number(),
24022
+ /** The detection rate a session is counted at (the fastest camera running the pipeline root). */
24023
+ cameraFps: number(),
24024
+ generatedAt: number(),
24025
+ nodes: array(NodeRecommendationSchema).readonly(),
24026
+ nodeChanges: array(NodeDeviceChangeSchema).readonly(),
24027
+ cameraClears: array(CameraOverrideClearSchema).readonly(),
24028
+ detectorStoreClears: array(DetectorStoreClearSchema).readonly(),
24029
+ warnings: array(AutoTuneWarningSchema).readonly()
24030
+ });
24031
+ var AutoTuneApplyInputSchema = object({
24032
+ planHash: string(),
24033
+ headroom: number().min(.3).max(.5).default(.4),
24034
+ minSessionsPerDevice: number().int().min(MIN_SESSIONS_PER_DEVICE_RANGE.min).max(MIN_SESSIONS_PER_DEVICE_RANGE.max).default(2)
24035
+ });
24036
+ var AutoTunePhaseResultSchema = object({
24037
+ phase: _enum([
24038
+ "download",
24039
+ "camera-overrides",
24040
+ "detector-thresholds",
24041
+ "node-models",
24042
+ "redispatch"
24043
+ ]),
24044
+ ok: boolean(),
24045
+ detail: string()
24046
+ });
24047
+ var AutoTuneApplyResultSchema = discriminatedUnion("kind", [
24048
+ object({
24049
+ kind: literal("applied"),
24050
+ planHash: string(),
24051
+ phases: array(AutoTunePhaseResultSchema).readonly()
24052
+ }),
24053
+ object({
24054
+ kind: literal("aborted"),
24055
+ phases: array(AutoTunePhaseResultSchema).readonly()
24056
+ }),
24057
+ object({
24058
+ kind: literal("stale"),
24059
+ plan: AutoTunePlanSchema
24060
+ }),
24061
+ object({
24062
+ kind: literal("refused"),
24063
+ reason: _enum(["apply-in-progress"])
24064
+ })
24065
+ ]);
24066
+ /**
24067
+ * Wire shapes of the Load balancing surface (D748): the session placement
24068
+ * policy, the atomic share write, the observed placement statistics, the
24069
+ * hardware share suggestion and the stale device pins.
24070
+ */
24071
+ /**
24072
+ * How a new detection session picks its node and device.
24073
+ * - `least-loaded` — the historical rule: lowest `attached / weight`, a
24074
+ * constant node order at a tie (D37). An idle node always ties at 0, so a
24075
+ * weight only bites once a node already holds a session.
24076
+ * - `share` — the share of PARALLEL sessions is held to the weights, and a
24077
+ * full or drowning node yields to a free one (D748).
24078
+ */
24079
+ var SessionPlacementPolicySchema = _enum(["least-loaded", "share"]);
24080
+ var LoadBalancingSharesInputSchema = object({
24081
+ /** nodeId → share (> 0). A node left out keeps its weight. */
24082
+ nodes: record(string(), number().positive()).default({}),
24083
+ /** nodeId → deviceKey → share (> 0). A device left out keeps its weight. */
24084
+ devices: record(string(), record(string(), number().positive())).default({})
24085
+ });
24086
+ var PlacementStatsInputSchema = object({
24087
+ /** Window the observed shares are averaged over (default 1 h, max 24 h). */
24088
+ windowMs: number().int().min(6e4).max(1440 * 60 * 1e3).default(3600 * 1e3) });
24089
+ var PlacementDeviceStatsSchema = object({
24090
+ deviceKey: string(),
24091
+ /** Sessions running on this device now. */
24092
+ sessionsNow: number(),
24093
+ /** Sessions started on this device inside the window. */
24094
+ sessionsStarted: number(),
24095
+ /** Time-weighted share of the node's parallel sessions over the window (0–1); null = no session ran. */
24096
+ observedShare: number().nullable()
24097
+ });
24098
+ var PlacementNodeStatsSchema = object({
24099
+ nodeId: string(),
24100
+ sessionsNow: number(),
24101
+ sessionsStarted: number(),
24102
+ /** Time-weighted share of the cluster's parallel sessions over the window (0–1); null = none ran. */
24103
+ observedShare: number().nullable(),
24104
+ /** Most sessions this node ran at once inside the window. */
24105
+ peakSessions: number(),
24106
+ /** Sessions a share election handed elsewhere because this node was full or drowning. */
24107
+ yieldsAway: number(),
24108
+ devices: array(PlacementDeviceStatsSchema).readonly()
24109
+ });
24110
+ /** A camera's device pin that the session path cannot honour. */
24111
+ var StaleDevicePinSchema = object({
24112
+ deviceId: number(),
24113
+ deviceKey: string(),
24114
+ /** `disabled` — the key exists on some node but is not enabled anywhere; `absent` — no node has it. */
24115
+ reason: _enum(["disabled", "absent"])
24116
+ });
24117
+ var PlacementStatsSchema = object({
24118
+ policy: SessionPlacementPolicySchema,
24119
+ windowMs: number(),
24120
+ /** How much of the window was actually observed (the hub keeps it in memory). */
24121
+ observedForMs: number(),
24122
+ sessionsNow: number(),
24123
+ /** Most parallel sessions across the cluster inside the window. */
24124
+ clusterPeakSessions: number(),
24125
+ nodes: array(PlacementNodeStatsSchema).readonly(),
24126
+ stalePins: array(StaleDevicePinSchema).readonly()
24127
+ });
24128
+ /**
24129
+ * Where an automatic share's capacity comes from (D755).
24130
+ * - `hardware` — the static capacity of each device at its Auto tune model:
24131
+ * the measured latency table for the node's hardware class.
24132
+ * - `benchmark` — the node's own measured capacity (node benchmark results).
24133
+ * A node with no results falls back to `hardware`, and says so.
24134
+ */
24135
+ var CapacitySourceSchema = _enum(["hardware", "benchmark"]);
24136
+ /** Why a node under the `benchmark` source was sized from hardware instead. */
24137
+ var CapacityFallbackSchema = _enum(["no-benchmark-results", "partial-benchmark-results"]);
24138
+ var SuggestSharesInputSchema = object({
24139
+ headroom: number().min(.3).max(.5).default(.4),
24140
+ /** Default `hardware`. */
24141
+ source: CapacitySourceSchema.default("hardware")
24142
+ });
24143
+ var SuggestedDeviceShareSchema = object({
24144
+ deviceKey: string(),
24145
+ /** Share of the node (0–100, rounded). */
24146
+ share: number(),
24147
+ modelId: string().nullable(),
24148
+ /** Inferences per second at that model, from the measured table; null when sized by a benchmark. */
24149
+ fps: number().nullable(),
24150
+ /** False for a table cell derived from another chip; true for a measured cell or a benchmark. */
24151
+ measured: boolean(),
24152
+ /**
24153
+ * Advisory session cap: ⌊fps × (1 − headroom) / camera fps⌋ from the table,
24154
+ * or the benchmark's measured max sessions. Never enforced.
24155
+ */
24156
+ suggestedMaxSessions: number().nullable()
24157
+ });
24158
+ var SuggestedNodeShareSchema = object({
24159
+ nodeId: string(),
24160
+ /** Share of the cluster (0–100, rounded); null = node skipped (offline, unknown hardware). */
24161
+ share: number().nullable(),
24162
+ /** Parallel sessions the node sustains at the suggested models with the headroom kept free. */
24163
+ capacitySessions: number(),
24164
+ devices: array(SuggestedDeviceShareSchema).readonly(),
24165
+ skippedReason: string().nullable(),
24166
+ /** What this node's capacity was read from; null when the node is skipped. */
24167
+ capacitySource: CapacitySourceSchema.nullable(),
24168
+ /** Set when the `benchmark` source was asked for and this node used `hardware`. */
24169
+ capacityFallback: CapacityFallbackSchema.nullable()
24170
+ });
24171
+ var SuggestSharesResultSchema = object({
24172
+ headroom: number(),
24173
+ /** The source asked for; each node says what it actually used. */
24174
+ source: CapacitySourceSchema,
24175
+ /** Camera detection rate the capacity is counted in (the fastest camera's fps). */
24176
+ cameraFps: number(),
24177
+ /** The Auto tune capacity floor the models were picked at. */
24178
+ minSessionsPerDevice: number(),
24179
+ nodes: array(SuggestedNodeShareSchema).readonly()
24180
+ });
24181
+ /**
24182
+ * Where the node and device shares come from (D750, D755).
24183
+ * - `hardware` (default) — computed by the system from each node's static
24184
+ * capacity (its accelerators at their Auto tune models, from the measured
24185
+ * latency table), recomputed whenever a node or device joins, leaves, is
24186
+ * switched on or off, or changes model. No load input.
24187
+ * - `benchmark` — the same, from each node's measured capacity (node
24188
+ * benchmark results); a node without results falls back to `hardware`.
24189
+ * - `manual` — the operator's stored sliders.
24190
+ * Either way a node or device that cannot take sessions gives its share to
24191
+ * the others in proportion; the stored values are never rewritten for that.
24192
+ */
24193
+ var ShareSourceSchema = _enum([
24194
+ "hardware",
24195
+ "benchmark",
24196
+ "manual"
24197
+ ]);
24198
+ var SetShareSourceInputSchema = object({ source: ShareSourceSchema });
24199
+ object({
24200
+ nodes: record(string(), number()),
24201
+ devices: record(string(), record(string(), number()))
24202
+ });
24203
+ var EffectiveDeviceShareSchema = object({
24204
+ deviceKey: string(),
24205
+ /** Can take sessions now (enabled, available, can run the root). */
24206
+ eligible: boolean(),
24207
+ /** The share the source assigns, as a percentage of the node's devices. */
24208
+ configuredPct: number(),
24209
+ /** The share actually used, after an ineligible device's share went to the others. */
24210
+ effectivePct: number()
24211
+ });
24212
+ var EffectiveNodeShareSchema = object({
24213
+ nodeId: string(),
24214
+ eligible: boolean(),
24215
+ configuredPct: number(),
24216
+ effectivePct: number(),
24217
+ /** Automatic sources: what this node's share was computed from; null under `manual` or before the first answer. */
24218
+ capacitySource: CapacitySourceSchema.nullable(),
24219
+ /** Automatic `benchmark`: why this node used `hardware` instead. */
24220
+ capacityFallback: CapacityFallbackSchema.nullable(),
24221
+ devices: array(EffectiveDeviceShareSchema).readonly()
24222
+ });
24223
+ var EffectiveSharesSchema = object({
24224
+ source: ShareSourceSchema,
24225
+ policy: SessionPlacementPolicySchema,
24226
+ /** An automatic source with no computed answer yet: the stored sliders are used meanwhile. */
24227
+ autoPending: boolean(),
24228
+ /** When the automatic shares were last computed (ms epoch); null = never. */
24229
+ computedAt: number().nullable(),
24230
+ /** What made the system recompute them last. */
24231
+ trigger: string().nullable(),
24232
+ nodes: array(EffectiveNodeShareSchema).readonly(),
24233
+ /** The relative weights the election reads (before eligibility). */
24234
+ nodeWeights: record(string(), number()),
24235
+ deviceWeights: record(string(), record(string(), number()))
24236
+ });
23884
24237
  object({
23885
24238
  activeCameras: number(),
23886
24239
  throttledCameras: number(),
@@ -24798,14 +25151,15 @@ var RunnerLocalLoadSchema = object({
24798
25151
  * Per-inference-device live load (multi-device C4). One entry per deviceKey
24799
25152
  * this runner currently has attached cameras on, so the orchestrator's second
24800
25153
  * `balance()` pass (over a node's devices) weights on real per-pool session
24801
- * counts. Empty on single-device / pre-multi-device runners. `queueDepthTotal`
24802
- * per device is 0 until the pool backlog gets a public accessor (follow-up).
25154
+ * counts. Empty on single-device / pre-multi-device runners. There is no
25155
+ * per-device queue depth: the inference pool's backlog has no accessor, and
25156
+ * a field that always read 0 was removed rather than shown as a measurement
25157
+ * (D762).
24803
25158
  */
24804
25159
  devices: array(object({
24805
25160
  deviceKey: string(),
24806
25161
  backend: string(),
24807
- attachedCameras: number(),
24808
- queueDepthTotal: number()
25162
+ attachedCameras: number()
24809
25163
  })).default([]),
24810
25164
  /** Hardware capability flags reported by this node. */
24811
25165
  hardware: object({
@@ -24941,7 +25295,22 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
24941
25295
  */
24942
25296
  cropJpeg: string().optional(),
24943
25297
  parent: DetailParentSchema,
24944
- steps: array(string()).optional()
25298
+ steps: array(string()).optional(),
25299
+ /**
25300
+ * The camera's root model already drew this step's boxes (D730): a
25301
+ * `license_plate` inside the parent vehicle. The named step is NOT
25302
+ * inferred — these FRAME-space boxes are its output — and its
25303
+ * requested children (the plate reader) run on them. Absent ⇒ every
25304
+ * requested step infers as before.
25305
+ */
25306
+ supplied: object({
25307
+ stepId: string(),
25308
+ modelId: string(),
25309
+ boxes: array(object({
25310
+ bbox: NativeCropBboxSchema,
25311
+ score: number()
25312
+ })).min(1)
25313
+ }).optional()
24945
25314
  }), object({ details: array(DetailResultSchema) }).nullable(), { kind: "mutation" }), method(object({
24946
25315
  /** Catalog step id, e.g. `clip-embedding`. */
24947
25316
  stepId: string(),
@@ -25004,14 +25373,6 @@ var CameraPipelineConfigSchema = object({
25004
25373
  settings: record(string(), unknown()).readonly().optional()
25005
25374
  }).nullable().optional()
25006
25375
  });
25007
- var PipelineTemplateSchema = object({
25008
- id: string(),
25009
- name: string(),
25010
- description: string().optional(),
25011
- config: CameraPipelineConfigSchema,
25012
- createdAt: string(),
25013
- updatedAt: string()
25014
- });
25015
25376
  var DeviceStepConfigSchema = object({
25016
25377
  modelId: string().optional(),
25017
25378
  settings: record(string(), unknown()).optional(),
@@ -25085,9 +25446,10 @@ var CameraStepOverridePatchSchema = object({
25085
25446
  modelId: string().optional(),
25086
25447
  settings: record(string(), unknown()).readonly().optional()
25087
25448
  });
25449
+ var CameraStepSettingsSchema = record(string(), record(string(), unknown()).readonly());
25088
25450
  var CameraPipelineSettingsSchema = object({
25089
- pinnedAgentNodeId: string().optional(),
25090
25451
  stepToggles: record(string(), boolean()).optional(),
25452
+ stepSettings: CameraStepSettingsSchema.optional(),
25091
25453
  stepOverridesByDevice: record(string(), record(string(), record(string(), CameraStepOverridePatchSchema))).optional(),
25092
25454
  pipelineByAgent: record(string(), CameraPipelineForAgentSchema).optional()
25093
25455
  });
@@ -25120,7 +25482,10 @@ var PipelineAssignmentSchema = object({
25120
25482
  });
25121
25483
  /**
25122
25484
  * Per-agent load summary surfaced to the load balancer + dashboards.
25123
- * Aggregated from each runner's `getLocalLoad` cap call.
25485
+ * Aggregated from each runner's `getLocalLoad` cap call. In the
25486
+ * `getAgentLoad` report, a single-device node's default-pool sessions (no
25487
+ * `deviceKey`) are credited to its one eligible device in `load.devices` —
25488
+ * the default pool IS that device (D745); the balancer's census stays raw.
25124
25489
  */
25125
25490
  var AgentLoadSummarySchema = object({
25126
25491
  nodeId: string(),
@@ -25209,26 +25574,27 @@ var CameraBrokerStatusSchema = object({
25209
25574
  width: number(),
25210
25575
  height: number(),
25211
25576
  subscribers: number(),
25212
- inFps: number(),
25213
- outFps: number()
25577
+ /**
25578
+ * Encoded packets/s the broker receives from the camera. null when the
25579
+ * broker's stats read failed — unknown, never 0 (a 0 here reads as a stall).
25580
+ * There is no output rate: decoding runs in the session decode workers, not
25581
+ * in the broker, so the broker's own decoded-frame rate is 0 on every live
25582
+ * camera and is not served (D758).
25583
+ */
25584
+ inFps: number().nullable()
25214
25585
  })).readonly(),
25215
25586
  webrtcSessions: number(),
25216
25587
  rtspRestream: boolean()
25217
25588
  });
25218
- /** Shared-memory ring statistics within the decoder block. */
25219
- var CameraDecoderShmSchema = object({
25220
- framesWritten: number(),
25221
- getFrameHits: number(),
25222
- getFrameMisses: number(),
25223
- budgetMb: number()
25224
- });
25225
- /** Decoder block — null when the decoder stage is unreachable or inactive. */
25226
- var CameraDecoderStatusSchema = object({
25227
- nodeId: string(),
25228
- formats: array(string()).readonly(),
25229
- sessionCount: number(),
25230
- shm: CameraDecoderShmSchema
25231
- });
25589
+ /**
25590
+ * Decoder block — WHERE decode runs (co-located with the detection node by
25591
+ * construction); null when the camera has no detection node. It carries no
25592
+ * frame counter: the shared-memory plane whose counters it used to serve is
25593
+ * gone, and those fields read 0 forever. Whether frames actually flow is read
25594
+ * from `detection.actualFps` (frames delivered to and processed by the
25595
+ * detector), never from a counter nothing feeds.
25596
+ */
25597
+ var CameraDecoderStatusSchema = object({ nodeId: string() });
25232
25598
  /** Motion block — null when motion detection is not active for this device. */
25233
25599
  var CameraMotionStatusSchema = object({
25234
25600
  enabled: boolean(),
@@ -25585,12 +25951,6 @@ method(object({
25585
25951
  }), object({ success: literal(true) }), {
25586
25952
  kind: "mutation",
25587
25953
  auth: "admin"
25588
- }), method(object({
25589
- agentNodeId: string(),
25590
- detectWeight: number().positive().nullable()
25591
- }), object({ success: literal(true) }), {
25592
- kind: "mutation",
25593
- auth: "admin"
25594
25954
  }), method(object({
25595
25955
  agentNodeId: string(),
25596
25956
  detect: boolean().nullable().optional(),
@@ -25632,6 +25992,15 @@ method(object({
25632
25992
  }), {
25633
25993
  kind: "mutation",
25634
25994
  auth: "admin"
25995
+ }), method(AutoTuneOptionsSchema, AutoTunePlanSchema, { auth: "admin" }), method(AutoTuneApplyInputSchema, AutoTuneApplyResultSchema, {
25996
+ kind: "mutation",
25997
+ auth: "admin"
25998
+ }), method(LoadBalancingSharesInputSchema, object({ success: literal(true) }), {
25999
+ kind: "mutation",
26000
+ auth: "admin"
26001
+ }), method(PlacementStatsInputSchema, PlacementStatsSchema, { auth: "admin" }), method(SuggestSharesInputSchema, SuggestSharesResultSchema, { auth: "admin" }), method(_void(), EffectiveSharesSchema, { auth: "admin" }), method(SetShareSourceInputSchema, object({ success: literal(true) }), {
26002
+ kind: "mutation",
26003
+ auth: "admin"
25635
26004
  }), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
25636
26005
  deviceId: number(),
25637
26006
  addonId: string(),
@@ -25648,6 +26017,13 @@ method(object({
25648
26017
  }), object({ success: literal(true) }), {
25649
26018
  kind: "mutation",
25650
26019
  auth: "admin"
26020
+ }), method(object({
26021
+ deviceId: number(),
26022
+ addonId: string(),
26023
+ settings: record(string(), unknown()).nullable()
26024
+ }), object({ success: literal(true) }), {
26025
+ kind: "mutation",
26026
+ auth: "admin"
25651
26027
  }), method(object({
25652
26028
  deviceId: number(),
25653
26029
  agentNodeId: string(),
@@ -25671,25 +26047,7 @@ method(object({
25671
26047
  }), method(_void(), DiskReconcileJobSchema, {
25672
26048
  kind: "mutation",
25673
26049
  auth: "admin"
25674
- }), method(_void(), DiskReconcileJobSchema, { auth: "admin" }), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
25675
- name: string(),
25676
- description: string().optional(),
25677
- config: CameraPipelineConfigSchema
25678
- }), PipelineTemplateSchema, {
25679
- kind: "mutation",
25680
- auth: "admin"
25681
- }), method(object({
25682
- id: string(),
25683
- name: string().optional(),
25684
- description: string().optional(),
25685
- config: CameraPipelineConfigSchema.optional()
25686
- }), PipelineTemplateSchema, {
25687
- kind: "mutation",
25688
- auth: "admin"
25689
- }), method(object({ id: string() }), object({ success: literal(true) }), {
25690
- kind: "mutation",
25691
- auth: "admin"
25692
- });
26050
+ }), method(_void(), DiskReconcileJobSchema, { auth: "admin" });
25693
26051
  /**
25694
26052
  * Cap → event-kind mapping for the SENSOR / CONTROL cap families — the table
25695
26053
  * `pipeline-analytics.listEventKinds` uses to turn a linked device's bound
@@ -27938,8 +28296,6 @@ var WebrtcStreamChoiceSchema = object({
27938
28296
  ]).nullable(),
27939
28297
  /** Input FPS from the camera (null for adaptive). */
27940
28298
  inputFps: number().nullable(),
27941
- /** Decoded FPS (null for adaptive). */
27942
- decodeFps: number().nullable(),
27943
28299
  /** Bitrate in kbps (null for adaptive). */
27944
28300
  bitrateKbps: number().nullable()
27945
28301
  });
@@ -28271,6 +28627,14 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
28271
28627
  */
28272
28628
  alive: boolean()
28273
28629
  })), method(object({
28630
+ deviceId: number().int().nonnegative(),
28631
+ sessionId: string(),
28632
+ downlinkMbps: number().nonnegative()
28633
+ }), object({
28634
+ outcome: _enum(["switching", "held"]),
28635
+ tier: CamProfileSchema.nullable(),
28636
+ reason: string()
28637
+ }), { kind: "mutation" }), method(object({
28274
28638
  deviceId: number().int().nonnegative(),
28275
28639
  sessionId: string()
28276
28640
  }), WebrtcSessionDebugSchema, { kind: "query" });
@@ -32099,7 +32463,8 @@ var ConnectionEndpointSchema = object({
32099
32463
  "lan-ipv6",
32100
32464
  "public",
32101
32465
  "loopback",
32102
- "app-link"
32466
+ "app-link",
32467
+ "custom"
32103
32468
  ]),
32104
32469
  /**
32105
32470
  * Originating-interface kind — `lan`/`wifi`/`docker`/`vpn`/`other`/
@@ -32168,7 +32533,7 @@ var GetConnectionEndpointsResultSchema = object({
32168
32533
  localPort: AdvertisedLocalPortSchema
32169
32534
  });
32170
32535
  /**
32171
- * The address flagged for notification links. `baseUrl: null` = AUTO, which
32536
+ * The address flagged for notification taps (`notificationTaps`). `baseUrl: null` = AUTO, which
32172
32537
  * since D709 is the CamStack app link; `resolved` reports the effective value,
32173
32538
  * so the UI can show it either way.
32174
32539
  */
@@ -32201,6 +32566,72 @@ var ViewerEndpointsSchema = object({
32201
32566
  /** What the ranking currently resolves to (may be empty if nothing is up). */
32202
32567
  resolved: array(string()).readonly()
32203
32568
  });
32569
+ /**
32570
+ * DEPRECATED compatibility shape of `getHubAddresses` (D729 amendment, kept
32571
+ * for addons built against it): `cluster` is the `internal` role, `browser`
32572
+ * the `publicEndpoint` role; `override` is the flagged address.
32573
+ */
32574
+ var HubAddressSnapshotSchema = object({
32575
+ override: string().nullable(),
32576
+ resolved: string().nullable(),
32577
+ source: _enum([
32578
+ "override",
32579
+ "auto",
32580
+ "none"
32581
+ ])
32582
+ });
32583
+ var HubAddressesSchema = object({
32584
+ cluster: HubAddressSnapshotSchema,
32585
+ browser: HubAddressSnapshotSchema
32586
+ });
32587
+ /**
32588
+ * What an address is used for (`hub-address.ts`, D734). `appConnections` is
32589
+ * many-valued; `notificationTaps`, `publicEndpoint` and `internal` are carried
32590
+ * by at most one address.
32591
+ */
32592
+ var HubAddressRoleSchema = _enum(HUB_ADDRESS_ROLES);
32593
+ var RoleSourceSchema = _enum([
32594
+ "flagged",
32595
+ "auto",
32596
+ "none"
32597
+ ]);
32598
+ /** One single-valued role: the flagged address, the one in use, and why. */
32599
+ var HubAddressRoleResolutionSchema = object({
32600
+ /** The address carrying the flag, or null = automatic. */
32601
+ flagged: string().nullable(),
32602
+ /** The address in use, or null when nothing qualifies (never loopback). */
32603
+ resolved: string().nullable(),
32604
+ source: RoleSourceSchema
32605
+ });
32606
+ var HubAppConnectionsResolutionSchema = object({
32607
+ /** The addresses flagged `appConnections`, or empty = automatic. */
32608
+ flagged: array(string()).readonly(),
32609
+ /** What the apps race right now. */
32610
+ resolved: array(string()).readonly(),
32611
+ source: RoleSourceSchema
32612
+ });
32613
+ var HubAddressBookSchema = object({
32614
+ rows: array(ConnectionEndpointSchema.extend({
32615
+ /** In the hub's detected palette right now. */
32616
+ detected: boolean(),
32617
+ /** Entered by the operator (removable). */
32618
+ custom: boolean(),
32619
+ /** The roles explicitly flagged on this address. */
32620
+ flags: array(HubAddressRoleSchema).readonly(),
32621
+ /** The roles this address serves right now — flagged or automatic. */
32622
+ inUse: array(HubAddressRoleSchema).readonly(),
32623
+ /** The roles this address may be flagged with. */
32624
+ eligible: array(HubAddressRoleSchema).readonly()
32625
+ })).readonly(),
32626
+ roles: object({
32627
+ appConnections: HubAppConnectionsResolutionSchema,
32628
+ notificationTaps: HubAddressRoleResolutionSchema,
32629
+ internal: HubAddressRoleResolutionSchema,
32630
+ publicEndpoint: HubAddressRoleResolutionSchema
32631
+ }),
32632
+ /** The `hub=` an app link carries (D709), or null. */
32633
+ appLinkHub: string().nullable()
32634
+ });
32204
32635
  var AllowedAddressesSchema = object({
32205
32636
  /**
32206
32637
  * Allowlist of interface addresses operators have explicitly opted
@@ -32244,10 +32675,27 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
32244
32675
  * tunnel always emits `https://` regardless. */
32245
32676
  scheme: _enum(["http", "https"]).optional(),
32246
32677
  /** Append the CamStack app link entry (`kind: 'app-link'`, D709) —
32247
- * an address notification links can be flagged with, not a hub
32678
+ * an address notification taps can be flagged with, not a hub
32248
32679
  * route. Default `false`: racers and rankers never see it. */
32249
32680
  includeAppLink: boolean().optional()
32250
- }), 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, {
32681
+ }), 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({
32682
+ baseUrl: string(),
32683
+ label: string().max(80)
32684
+ }), HubAddressBookSchema, {
32685
+ kind: "mutation",
32686
+ auth: "admin"
32687
+ }), method(object({ baseUrl: string() }), HubAddressBookSchema, {
32688
+ kind: "mutation",
32689
+ auth: "admin"
32690
+ }), method(object({
32691
+ role: HubAddressRoleSchema,
32692
+ baseUrl: string().nullable(),
32693
+ enabled: boolean(),
32694
+ acceptInsecureHttp: boolean().optional()
32695
+ }), HubAddressBookSchema, {
32696
+ kind: "mutation",
32697
+ auth: "admin"
32698
+ }), 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, {
32251
32699
  kind: "mutation",
32252
32700
  auth: "admin"
32253
32701
  }), method(object({
@@ -32705,7 +33153,8 @@ var MotionStatusSchema = object({
32705
33153
  * writes this slice (not even a boot seed), and neither does the runner's
32706
33154
  * phase machine: its phase is "a session is attached" for every on-motion
32707
33155
  * session, not motion, and it now has its own `DetectionPhaseTransition`.
32708
- * A provider's `isDetected` answers from the hub's slice.
33156
+ * A provider's `isDetected` and `getStatus` answer from the hub's slice
33157
+ * (`hubMotionNativeProvider`).
32709
33158
  * - **Sensors** (Home Assistant binary sensors, Homematic, Matter, Alexa
32710
33159
  * imports) — the provider pushes both edges itself, from the upstream
32711
33160
  * system's own state change. That is the sensor's own fact.
@@ -39252,6 +39701,16 @@ var zoneRulesCapability = {
39252
39701
  durability: "restored"
39253
39702
  };
39254
39703
  SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
39704
+ Object.freeze({
39705
+ person: .5,
39706
+ vehicle: .5,
39707
+ animal: .5
39708
+ });
39709
+ Object.freeze({
39710
+ person: .65,
39711
+ vehicle: .65,
39712
+ animal: .65
39713
+ });
39255
39714
  /**
39256
39715
  * Accessory device helpers — shared across drivers.
39257
39716
  *
@@ -42132,90 +42591,18 @@ Object.freeze({
42132
42591
  addonId: null,
42133
42592
  access: "create"
42134
42593
  },
42135
- "decoder.createSession": {
42136
- capName: "decoder",
42137
- capScope: "system",
42138
- addonId: null,
42139
- access: "view"
42140
- },
42141
- "decoder.destroySession": {
42142
- capName: "decoder",
42143
- capScope: "system",
42144
- addonId: null,
42145
- access: "delete"
42146
- },
42147
- "decoder.getFrame": {
42148
- capName: "decoder",
42149
- capScope: "system",
42150
- addonId: null,
42151
- access: "view"
42152
- },
42153
42594
  "decoder.getInfo": {
42154
42595
  capName: "decoder",
42155
42596
  capScope: "system",
42156
42597
  addonId: null,
42157
42598
  access: "view"
42158
42599
  },
42159
- "decoder.getShmStats": {
42160
- capName: "decoder",
42161
- capScope: "system",
42162
- addonId: null,
42163
- access: "view"
42164
- },
42165
- "decoder.getStats": {
42166
- capName: "decoder",
42167
- capScope: "system",
42168
- addonId: null,
42169
- access: "view"
42170
- },
42171
- "decoder.listActiveSessions": {
42172
- capName: "decoder",
42173
- capScope: "system",
42174
- addonId: null,
42175
- access: "view"
42176
- },
42177
- "decoder.openStream": {
42178
- capName: "decoder",
42179
- capScope: "system",
42180
- addonId: null,
42181
- access: "view"
42182
- },
42183
- "decoder.pullFrames": {
42184
- capName: "decoder",
42185
- capScope: "system",
42186
- addonId: null,
42187
- access: "view"
42188
- },
42189
- "decoder.pullHandles": {
42190
- capName: "decoder",
42191
- capScope: "system",
42192
- addonId: null,
42193
- access: "view"
42194
- },
42195
- "decoder.pushPacket": {
42196
- capName: "decoder",
42197
- capScope: "system",
42198
- addonId: null,
42199
- access: "view"
42200
- },
42201
42600
  "decoder.reprobeHwaccel": {
42202
42601
  capName: "decoder",
42203
42602
  capScope: "system",
42204
42603
  addonId: null,
42205
42604
  access: "create"
42206
42605
  },
42207
- "decoder.supportsCodec": {
42208
- capName: "decoder",
42209
- capScope: "system",
42210
- addonId: null,
42211
- access: "view"
42212
- },
42213
- "decoder.updateConfig": {
42214
- capName: "decoder",
42215
- capScope: "system",
42216
- addonId: null,
42217
- access: "view"
42218
- },
42219
42606
  "detectionPipeline.applyDeviceSettingsPatch": {
42220
42607
  capName: "detection-pipeline",
42221
42608
  capScope: "device",
@@ -43704,12 +44091,24 @@ Object.freeze({
43704
44091
  addonId: null,
43705
44092
  access: "view"
43706
44093
  },
44094
+ "localNetwork.addCustomAddress": {
44095
+ capName: "local-network",
44096
+ capScope: "system",
44097
+ addonId: null,
44098
+ access: "create"
44099
+ },
43707
44100
  "localNetwork.downloadCa": {
43708
44101
  capName: "local-network",
43709
44102
  capScope: "system",
43710
44103
  addonId: null,
43711
44104
  access: "view"
43712
44105
  },
44106
+ "localNetwork.getAddresses": {
44107
+ capName: "local-network",
44108
+ capScope: "system",
44109
+ addonId: null,
44110
+ access: "view"
44111
+ },
43713
44112
  "localNetwork.getAllowedAddresses": {
43714
44113
  capName: "local-network",
43715
44114
  capScope: "system",
@@ -43722,6 +44121,12 @@ Object.freeze({
43722
44121
  addonId: null,
43723
44122
  access: "view"
43724
44123
  },
44124
+ "localNetwork.getHubAddresses": {
44125
+ capName: "local-network",
44126
+ capScope: "system",
44127
+ addonId: null,
44128
+ access: "view"
44129
+ },
43725
44130
  "localNetwork.getNotificationEndpoint": {
43726
44131
  capName: "local-network",
43727
44132
  capScope: "system",
@@ -43758,6 +44163,12 @@ Object.freeze({
43758
44163
  addonId: null,
43759
44164
  access: "create"
43760
44165
  },
44166
+ "localNetwork.removeCustomAddress": {
44167
+ capName: "local-network",
44168
+ capScope: "system",
44169
+ addonId: null,
44170
+ access: "delete"
44171
+ },
43761
44172
  "localNetwork.resetAllowlistToBestMatch": {
43762
44173
  capName: "local-network",
43763
44174
  capScope: "system",
@@ -43770,6 +44181,12 @@ Object.freeze({
43770
44181
  addonId: null,
43771
44182
  access: "create"
43772
44183
  },
44184
+ "localNetwork.setAddressRole": {
44185
+ capName: "local-network",
44186
+ capScope: "system",
44187
+ addonId: null,
44188
+ access: "create"
44189
+ },
43773
44190
  "localNetwork.setAllowedAddresses": {
43774
44191
  capName: "local-network",
43775
44192
  capScope: "system",
@@ -45264,13 +45681,13 @@ Object.freeze({
45264
45681
  addonId: null,
45265
45682
  access: "delete"
45266
45683
  },
45267
- "pipelineExecutor.deleteModel": {
45684
+ "pipelineExecutor.clearModelBoundDeviceOverrides": {
45268
45685
  capName: "pipeline-executor",
45269
45686
  capScope: "system",
45270
45687
  addonId: null,
45271
45688
  access: "delete"
45272
45689
  },
45273
- "pipelineExecutor.deleteTemplate": {
45690
+ "pipelineExecutor.deleteModel": {
45274
45691
  capName: "pipeline-executor",
45275
45692
  capScope: "system",
45276
45693
  addonId: null,
@@ -45414,12 +45831,6 @@ Object.freeze({
45414
45831
  addonId: null,
45415
45832
  access: "view"
45416
45833
  },
45417
- "pipelineExecutor.listTemplates": {
45418
- capName: "pipeline-executor",
45419
- capScope: "system",
45420
- addonId: null,
45421
- access: "view"
45422
- },
45423
45834
  "pipelineExecutor.rearmInferenceDevice": {
45424
45835
  capName: "pipeline-executor",
45425
45836
  capScope: "system",
@@ -45444,12 +45855,6 @@ Object.freeze({
45444
45855
  addonId: null,
45445
45856
  access: "create"
45446
45857
  },
45447
- "pipelineExecutor.saveTemplate": {
45448
- capName: "pipeline-executor",
45449
- capScope: "system",
45450
- addonId: null,
45451
- access: "create"
45452
- },
45453
45858
  "pipelineExecutor.setVideoPipelineSteps": {
45454
45859
  capName: "pipeline-executor",
45455
45860
  capScope: "system",
@@ -45468,41 +45873,35 @@ Object.freeze({
45468
45873
  addonId: null,
45469
45874
  access: "create"
45470
45875
  },
45471
- "pipelineExecutor.updateTemplate": {
45472
- capName: "pipeline-executor",
45473
- capScope: "system",
45474
- addonId: null,
45475
- access: "create"
45476
- },
45477
45876
  "pipelineExecutor.validatePipeline": {
45478
45877
  capName: "pipeline-executor",
45479
45878
  capScope: "system",
45480
45879
  addonId: null,
45481
45880
  access: "view"
45482
45881
  },
45483
- "pipelineOrchestrator.applyDeviceSettingsPatch": {
45882
+ "pipelineOrchestrator.applyAutoTune": {
45484
45883
  capName: "pipeline-orchestrator",
45485
45884
  capScope: "system",
45486
45885
  addonId: null,
45487
45886
  access: "create"
45488
45887
  },
45489
- "pipelineOrchestrator.assignAudio": {
45888
+ "pipelineOrchestrator.applyDeviceSettingsPatch": {
45490
45889
  capName: "pipeline-orchestrator",
45491
45890
  capScope: "system",
45492
45891
  addonId: null,
45493
45892
  access: "create"
45494
45893
  },
45495
- "pipelineOrchestrator.assignPipeline": {
45894
+ "pipelineOrchestrator.assignAudio": {
45496
45895
  capName: "pipeline-orchestrator",
45497
45896
  capScope: "system",
45498
45897
  addonId: null,
45499
45898
  access: "create"
45500
45899
  },
45501
- "pipelineOrchestrator.deleteTemplate": {
45900
+ "pipelineOrchestrator.assignPipeline": {
45502
45901
  capName: "pipeline-orchestrator",
45503
45902
  capScope: "system",
45504
45903
  addonId: null,
45505
- access: "delete"
45904
+ access: "create"
45506
45905
  },
45507
45906
  "pipelineOrchestrator.getAgentLoad": {
45508
45907
  capName: "pipeline-orchestrator",
@@ -45594,6 +45993,12 @@ Object.freeze({
45594
45993
  addonId: null,
45595
45994
  access: "view"
45596
45995
  },
45996
+ "pipelineOrchestrator.getEffectiveShares": {
45997
+ capName: "pipeline-orchestrator",
45998
+ capScope: "system",
45999
+ addonId: null,
46000
+ access: "view"
46001
+ },
45597
46002
  "pipelineOrchestrator.getGlobalMetrics": {
45598
46003
  capName: "pipeline-orchestrator",
45599
46004
  capScope: "system",
@@ -45630,19 +46035,19 @@ Object.freeze({
45630
46035
  addonId: null,
45631
46036
  access: "view"
45632
46037
  },
45633
- "pipelineOrchestrator.getReconcileFromDiskStatus": {
46038
+ "pipelineOrchestrator.getPlacementStats": {
45634
46039
  capName: "pipeline-orchestrator",
45635
46040
  capScope: "system",
45636
46041
  addonId: null,
45637
46042
  access: "view"
45638
46043
  },
45639
- "pipelineOrchestrator.listAgentSettings": {
46044
+ "pipelineOrchestrator.getReconcileFromDiskStatus": {
45640
46045
  capName: "pipeline-orchestrator",
45641
46046
  capScope: "system",
45642
46047
  addonId: null,
45643
46048
  access: "view"
45644
46049
  },
45645
- "pipelineOrchestrator.listTemplates": {
46050
+ "pipelineOrchestrator.listAgentSettings": {
45646
46051
  capName: "pipeline-orchestrator",
45647
46052
  capScope: "system",
45648
46053
  addonId: null,
@@ -45654,6 +46059,12 @@ Object.freeze({
45654
46059
  addonId: null,
45655
46060
  access: "create"
45656
46061
  },
46062
+ "pipelineOrchestrator.planAutoTune": {
46063
+ capName: "pipeline-orchestrator",
46064
+ capScope: "system",
46065
+ addonId: null,
46066
+ access: "view"
46067
+ },
45657
46068
  "pipelineOrchestrator.rebalance": {
45658
46069
  capName: "pipeline-orchestrator",
45659
46070
  capScope: "system",
@@ -45696,12 +46107,6 @@ Object.freeze({
45696
46107
  addonId: null,
45697
46108
  access: "create"
45698
46109
  },
45699
- "pipelineOrchestrator.saveTemplate": {
45700
- capName: "pipeline-orchestrator",
45701
- capScope: "system",
45702
- addonId: null,
45703
- access: "create"
45704
- },
45705
46110
  "pipelineOrchestrator.setAgentCapabilities": {
45706
46111
  capName: "pipeline-orchestrator",
45707
46112
  capScope: "system",
@@ -45714,12 +46119,6 @@ Object.freeze({
45714
46119
  addonId: null,
45715
46120
  access: "create"
45716
46121
  },
45717
- "pipelineOrchestrator.setAgentDetectWeight": {
45718
- capName: "pipeline-orchestrator",
45719
- capScope: "system",
45720
- addonId: null,
45721
- access: "create"
45722
- },
45723
46122
  "pipelineOrchestrator.setAgentInferenceDevices": {
45724
46123
  capName: "pipeline-orchestrator",
45725
46124
  capScope: "system",
@@ -45756,6 +46155,12 @@ Object.freeze({
45756
46155
  addonId: null,
45757
46156
  access: "create"
45758
46157
  },
46158
+ "pipelineOrchestrator.setCameraStepSettings": {
46159
+ capName: "pipeline-orchestrator",
46160
+ capScope: "system",
46161
+ addonId: null,
46162
+ access: "create"
46163
+ },
45759
46164
  "pipelineOrchestrator.setCameraStepToggle": {
45760
46165
  capName: "pipeline-orchestrator",
45761
46166
  capScope: "system",
@@ -45774,25 +46179,37 @@ Object.freeze({
45774
46179
  addonId: null,
45775
46180
  access: "create"
45776
46181
  },
46182
+ "pipelineOrchestrator.setLoadBalancingShares": {
46183
+ capName: "pipeline-orchestrator",
46184
+ capScope: "system",
46185
+ addonId: null,
46186
+ access: "create"
46187
+ },
45777
46188
  "pipelineOrchestrator.setPipelineDevicePin": {
45778
46189
  capName: "pipeline-orchestrator",
45779
46190
  capScope: "system",
45780
46191
  addonId: null,
45781
46192
  access: "create"
45782
46193
  },
45783
- "pipelineOrchestrator.unassignAudio": {
46194
+ "pipelineOrchestrator.setShareSource": {
45784
46195
  capName: "pipeline-orchestrator",
45785
46196
  capScope: "system",
45786
46197
  addonId: null,
45787
46198
  access: "create"
45788
46199
  },
45789
- "pipelineOrchestrator.unassignPipeline": {
46200
+ "pipelineOrchestrator.suggestShares": {
46201
+ capName: "pipeline-orchestrator",
46202
+ capScope: "system",
46203
+ addonId: null,
46204
+ access: "view"
46205
+ },
46206
+ "pipelineOrchestrator.unassignAudio": {
45790
46207
  capName: "pipeline-orchestrator",
45791
46208
  capScope: "system",
45792
46209
  addonId: null,
45793
46210
  access: "create"
45794
46211
  },
45795
- "pipelineOrchestrator.updateTemplate": {
46212
+ "pipelineOrchestrator.unassignPipeline": {
45796
46213
  capName: "pipeline-orchestrator",
45797
46214
  capScope: "system",
45798
46215
  addonId: null,
@@ -47232,12 +47649,6 @@ Object.freeze({
47232
47649
  addonId: null,
47233
47650
  access: "view"
47234
47651
  },
47235
- "streamBroker.pullFrameHandles": {
47236
- capName: "stream-broker",
47237
- capScope: "system",
47238
- addonId: null,
47239
- access: "view"
47240
- },
47241
47652
  "streamBroker.regenerateRtspToken": {
47242
47653
  capName: "stream-broker",
47243
47654
  capScope: "system",
@@ -47304,12 +47715,6 @@ Object.freeze({
47304
47715
  addonId: null,
47305
47716
  access: "create"
47306
47717
  },
47307
- "streamBroker.subscribeFrames": {
47308
- capName: "stream-broker",
47309
- capScope: "system",
47310
- addonId: null,
47311
- access: "create"
47312
- },
47313
47718
  "streamBroker.unassignProfile": {
47314
47719
  capName: "stream-broker",
47315
47720
  capScope: "system",
@@ -47322,12 +47727,6 @@ Object.freeze({
47322
47727
  addonId: null,
47323
47728
  access: "create"
47324
47729
  },
47325
- "streamBroker.unsubscribeFrames": {
47326
- capName: "stream-broker",
47327
- capScope: "system",
47328
- addonId: null,
47329
- access: "create"
47330
- },
47331
47730
  "streamCatalog.getCatalog": {
47332
47731
  capName: "stream-catalog",
47333
47732
  capScope: "device",
@@ -48024,6 +48423,12 @@ Object.freeze({
48024
48423
  addonId: null,
48025
48424
  access: "create"
48026
48425
  },
48426
+ "webrtcSession.applyDownlinkProbe": {
48427
+ capName: "webrtc-session",
48428
+ capScope: "device",
48429
+ addonId: null,
48430
+ access: "create"
48431
+ },
48027
48432
  "webrtcSession.closeSession": {
48028
48433
  capName: "webrtc-session",
48029
48434
  capScope: "device",
@@ -49835,11 +50240,6 @@ Object.freeze({
49835
50240
  form: "single",
49836
50241
  optional: false
49837
50242
  }],
49838
- "decoder.createSession": [{
49839
- name: "deviceId",
49840
- form: "single",
49841
- optional: true
49842
- }],
49843
50243
  "detectionPipeline.applyDeviceSettingsPatch": [{
49844
50244
  name: "deviceId",
49845
50245
  form: "single",
@@ -51070,6 +51470,11 @@ Object.freeze({
51070
51470
  form: "single",
51071
51471
  optional: false
51072
51472
  }],
51473
+ "pipelineExecutor.clearModelBoundDeviceOverrides": [{
51474
+ name: "deviceIds",
51475
+ form: "array",
51476
+ optional: true
51477
+ }],
51073
51478
  "pipelineExecutor.runPipeline": [{
51074
51479
  name: "deviceId",
51075
51480
  form: "single",
@@ -51175,6 +51580,11 @@ Object.freeze({
51175
51580
  form: "single",
51176
51581
  optional: false
51177
51582
  }],
51583
+ "pipelineOrchestrator.setCameraStepSettings": [{
51584
+ name: "deviceId",
51585
+ form: "single",
51586
+ optional: false
51587
+ }],
51178
51588
  "pipelineOrchestrator.setCameraStepToggle": [{
51179
51589
  name: "deviceId",
51180
51590
  form: "single",
@@ -51946,6 +52356,11 @@ Object.freeze({
51946
52356
  form: "single",
51947
52357
  optional: false
51948
52358
  }],
52359
+ "webrtcSession.applyDownlinkProbe": [{
52360
+ name: "deviceId",
52361
+ form: "single",
52362
+ optional: false
52363
+ }],
51949
52364
  "webrtcSession.closeSession": [{
51950
52365
  name: "deviceId",
51951
52366
  form: "single",
@@ -52175,6 +52590,8 @@ new Map(Object.entries({
52175
52590
  "detection-blind": "device-events",
52176
52591
  "node-online": "system",
52177
52592
  "node-offline": "system",
52593
+ "node-restarting": "system",
52594
+ "node-updating": "system",
52178
52595
  "node-inference-unavailable": "system",
52179
52596
  "addon-crash-loop": "system",
52180
52597
  "addon-update-available": "system",
@@ -52252,6 +52669,7 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
52252
52669
  kinds: [
52253
52670
  "node-offline",
52254
52671
  "node-online",
52672
+ "node-restarting",
52255
52673
  "node-inference-unavailable"
52256
52674
  ]
52257
52675
  },
@@ -52273,6 +52691,7 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
52273
52691
  label: "Server & container updates",
52274
52692
  kinds: [
52275
52693
  "server-update-available",
52694
+ "node-updating",
52276
52695
  "server-updated",
52277
52696
  "wrapper-update-available"
52278
52697
  ]
@@ -52420,6 +52839,7 @@ var STATE_SUMMARY_SECTION_VARS = [
52420
52839
  kinds: [
52421
52840
  "node-offline",
52422
52841
  "node-online",
52842
+ "node-restarting",
52423
52843
  "node-inference-unavailable"
52424
52844
  ]
52425
52845
  },
@@ -52441,6 +52861,7 @@ var STATE_SUMMARY_SECTION_VARS = [
52441
52861
  example: "server 1.2.377 → 1.2.378",
52442
52862
  kinds: [
52443
52863
  "server-update-available",
52864
+ "node-updating",
52444
52865
  "server-updated",
52445
52866
  "wrapper-update-available"
52446
52867
  ]
@@ -52473,7 +52894,7 @@ var STATE_SUMMARY_VARS = [
52473
52894
  {
52474
52895
  name: "summarySection",
52475
52896
  label: "Summary: this section",
52476
- description: "The section a per-section summary row is about (D698); on a summary sent as one message, every section it reports, comma-separated.",
52897
+ description: "The section a per-section summary row is about; on a summary sent as one message, every section it reports, comma-separated.",
52477
52898
  example: "Batterie scariche",
52478
52899
  group: "system",
52479
52900
  families: ["rule"],