@camstack/addon-provider-homematic 1.2.126 → 1.2.127

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.js CHANGED
@@ -8,7 +8,7 @@ let http = require("http");
8
8
  let crypto$1 = require("crypto");
9
9
  let fs_promises = require("fs/promises");
10
10
  let path = require("path");
11
- //#region ../types/dist/event-category-BGmz_oxW.mjs
11
+ //#region ../types/dist/event-category-B_0XEcLF.mjs
12
12
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
13
13
  EventCategory["SystemBoot"] = "system.boot";
14
14
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -509,15 +509,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
509
509
  EventCategory["AgentWsDisconnected"] = "agent.ws.disconnected";
510
510
  EventCategory["AgentBackupActivated"] = "agent.backup.activated";
511
511
  EventCategory["OrchestrationSettingsUpdated"] = "orchestration.settings-updated";
512
- /**
513
- * Per-agent hwaccel preference changed (user override set, cleared, or
514
- * re-probed). Observability event — decoders pull the current pref at
515
- * `createSession`, so running sessions keep their current backend until
516
- * they rotate naturally (camera add/remove, stream restart). Future
517
- * work can wire a listener in stream-broker that force-rotates live
518
- * sessions; for now this event powers logs + admin-UI toast feedback.
519
- */
520
- EventCategory["PipelineAgentHwaccelChanged"] = "pipeline.agent-hwaccel-changed";
521
512
  EventCategory["MotionAnalysis"] = "detection.motion-analysis";
522
513
  /** All raw motion zones from CCL before minArea filter — for UI debug overlay. */
523
514
  EventCategory["MotionZonesRaw"] = "detection.motion-zones-raw";
@@ -5388,7 +5379,7 @@ var ZodIssueCode = {
5388
5379
  var ZodFirstPartyTypeKind;
5389
5380
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5390
5381
  //#endregion
5391
- //#region ../types/dist/sleep-DXKLNFvA.mjs
5382
+ //#region ../types/dist/sleep-BNeXenvr.mjs
5392
5383
  /**
5393
5384
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5394
5385
  * window to float samples (D455).
@@ -6754,32 +6745,12 @@ object({
6754
6745
  audioCodec: string().optional(),
6755
6746
  metadata: record(string(), unknown()).readonly().optional()
6756
6747
  });
6757
- var EncodedPacketSchema = object({
6758
- type: _enum(["video", "audio"]),
6759
- data: _instanceof(Uint8Array),
6760
- pts: number(),
6761
- dts: number(),
6762
- keyframe: boolean(),
6763
- codec: string()
6764
- });
6765
- var DecodedFrameSchema = object({
6766
- data: _instanceof(Uint8Array),
6767
- width: number(),
6768
- height: number(),
6769
- format: _enum([
6770
- "jpeg",
6771
- "rgb",
6772
- "bgr",
6773
- "yuv420",
6774
- "gray"
6775
- ]),
6776
- timestamp: number()
6777
- });
6778
6748
  /**
6779
6749
  * Wire schema for `FrameHandle` — a zero-pixel, serialisable reference to a
6780
6750
  * frame in a shared-memory ring (Phase 5 / D9). Mirrors the `FrameHandle` TS
6781
- * interface in `interfaces/frame-handle.ts` field-for-field so a decoder cap
6782
- * method (`pullHandles`) can carry handles over tRPC / Moleculer.
6751
+ * interface in `interfaces/frame-handle.ts` field-for-field so a cap method
6752
+ * (the runner's native-crop and pipeline-executor inputs) can carry handles
6753
+ * over tRPC / Moleculer.
6783
6754
  *
6784
6755
  * The `satisfies` assertion below pins this schema to the interface: if a
6785
6756
  * field is added to / removed from `FrameHandle` without a matching schema
@@ -6805,50 +6776,6 @@ var FrameHandleSchema = object({
6805
6776
  slotCount: number().int().positive()
6806
6777
  });
6807
6778
  /**
6808
- * Pixel format a frame-handle subscriber can request from the broker
6809
- * (Phase 5 / D9). The packed, raster subset of `FrameFormat` — the formats a
6810
- * `frameSink: 'shm'` decoder session can write into a `FrameRing` slot.
6811
- * `jpeg` is excluded: a variable-length stream is not a fixed-stride ring
6812
- * payload, and no decoded-frame consumer requests it over the shm plane.
6813
- */
6814
- var FrameHandleFormatSchema = _enum([
6815
- "rgb",
6816
- "bgr",
6817
- "yuv420",
6818
- "gray"
6819
- ]);
6820
- /**
6821
- * Input for `stream-broker.subscribeFrames` (Phase 5 / D9). A consumer asks the
6822
- * broker for a `FrameHandle` stream of one `format`; the broker maintains one
6823
- * shared-memory ring per `(brokerId, format)` actually requested, so a `gray`
6824
- * subscriber (motion) and an `rgb` subscriber (detection) each read the format
6825
- * they asked for with no broker-side conversion.
6826
- */
6827
- var SubscribeFramesInputSchema = object({
6828
- brokerId: string(),
6829
- format: FrameHandleFormatSchema,
6830
- /**
6831
- * Optional reader-side cadence hint in frames per second. The broker does
6832
- * NOT throttle — latest-wins ring reads drop frames implicitly for a slow
6833
- * consumer. The value is echoed back in `SubscribeFramesResult.maxFps` so
6834
- * the consumer can pace its own `pullFrameHandles` polling.
6835
- */
6836
- maxFps: number().positive().optional(),
6837
- /** Short caller-identity tag (`motion`, `detection`, …) for diagnostics. */
6838
- tag: string().optional()
6839
- });
6840
- /**
6841
- * Result of `stream-broker.subscribeFrames`. The consumer then polls
6842
- * `pullFrameHandles({ subscriptionId, maxCount })` and feeds each returned
6843
- * `FrameHandle` to a `FrameRingReader`.
6844
- */
6845
- var SubscribeFramesResultSchema = object({
6846
- /** Opaque id the consumer passes to `pullFrameHandles` / `unsubscribeFrames`. */
6847
- subscriptionId: string(),
6848
- /** Reader-side cadence hint (frames/s) — echoes `SubscribeFramesInput.maxFps`. */
6849
- maxFps: number().nonnegative()
6850
- });
6851
- /**
6852
6779
  * Wire schema for a decoded audio chunk (Phase 5 / D9). Mirrors the
6853
6780
  * `DecodedAudioChunk` TS interface in `interfaces/stream-broker.ts`: PCM
6854
6781
  * sample bytes plus the track parameters a consumer needs to interpret them.
@@ -6856,8 +6783,8 @@ var SubscribeFramesResultSchema = object({
6856
6783
  * Audio chunks are tiny (a ~500ms AudioCodecSession window is a few KB of
6857
6784
  * Float32 PCM), so unlike video frames they ship their bytes INLINE over
6858
6785
  * tRPC / Moleculer — no shared-memory plane. `data` is typed `Uint8Array`
6859
- * (the wire-serialisable supertype of `Buffer`) to match `DecodedFrameSchema`
6860
- * / `EncodedPacketSchema`'s precedent; a `Buffer` is assignable to it.
6786
+ * (the wire-serialisable supertype of `Buffer`); a `Buffer` is assignable to
6787
+ * it.
6861
6788
  */
6862
6789
  var AudioChunkFormatSchema = _enum(AUDIO_CHUNK_FORMATS);
6863
6790
  var DecodedAudioChunkSchema = object({
@@ -6875,11 +6802,10 @@ var DecodedAudioChunkSchema = object({
6875
6802
  format: AudioChunkFormatSchema.optional()
6876
6803
  });
6877
6804
  /**
6878
- * Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9). The
6879
- * handle-free, ship-bytes-inline analogue of `subscribeFrames`: a consumer
6880
- * asks the broker for the decoded audio-chunk stream of one broker; the
6881
- * broker keeps a per-subscription bounded FIFO queue the consumer drains via
6882
- * `pullAudioChunks`.
6805
+ * Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9). Audio ships
6806
+ * its bytes inline: a consumer asks the broker for the decoded audio-chunk
6807
+ * stream of one broker; the broker keeps a per-subscription bounded FIFO queue
6808
+ * the consumer drains via `pullAudioChunks`.
6883
6809
  */
6884
6810
  var SubscribeAudioChunksInputSchema = object({
6885
6811
  brokerId: string(),
@@ -6910,9 +6836,7 @@ var BrokerStatsSchema = object({
6910
6836
  "stopped"
6911
6837
  ]),
6912
6838
  inputFps: number(),
6913
- decodeFps: number(),
6914
6839
  encodedSubscribers: number(),
6915
- decodedSubscribers: number(),
6916
6840
  uptimeMs: number(),
6917
6841
  bitrateKbps: number(),
6918
6842
  idrIntervalMs: number(),
@@ -6925,14 +6849,6 @@ var BrokerStatsSchema = object({
6925
6849
  preBufferMs: number(),
6926
6850
  preBufferPackets: number(),
6927
6851
  /**
6928
- * Moleculer node id of the decoder provider currently servicing this
6929
- * stream's decoded subscribers. `null` until the deferred decoder is
6930
- * created (no decoded clients yet, or codec not detected). Surfaces the
6931
- * runtime decoder placement so the UI can show "Decoder: <agent>" without
6932
- * a separate cap call per broker.
6933
- */
6934
- decoderNodeId: string().nullable(),
6935
- /**
6936
6852
  * Detected audio track parameters from the RTSP DESCRIBE / SDP. `null`
6937
6853
  * when the stream has no audio track or the broker is in cold start.
6938
6854
  * `supported = false` means the codec was detected but the local
@@ -10268,70 +10184,6 @@ var StorageLocationDeclarationSchema = object({
10268
10184
  "backup"
10269
10185
  ]).optional()
10270
10186
  });
10271
- var DecoderStatsSchema = object({
10272
- inputFps: number(),
10273
- outputFps: number(),
10274
- avgDecodeTimeMs: number(),
10275
- droppedFrames: number(),
10276
- /**
10277
- * Pull-mode adaptive-fps telemetry (optional — only pull sessions run the
10278
- * lag-driven controller; push sessions omit these). `lagMs` is the EWMA of
10279
- * the decoder's real-time drift (rising = falling behind live); `adaptiveFps`
10280
- * is the current lag-throttled emit rate (≤ `effectiveFps` ceiling).
10281
- */
10282
- lagMs: number().optional(),
10283
- effectiveFps: number().optional(),
10284
- adaptiveFps: number().optional()
10285
- });
10286
- var DecoderSessionConfigSchema = object({
10287
- codec: string(),
10288
- maxFps: number().default(0),
10289
- outputFormat: _enum([
10290
- "jpeg",
10291
- "rgb",
10292
- "bgr",
10293
- "yuv420",
10294
- "gray"
10295
- ]).default("jpeg"),
10296
- scale: number().default(1),
10297
- width: number().optional(),
10298
- height: number().optional(),
10299
- /**
10300
- * Identifier of the camera this decoder session serves. Optional
10301
- * because the cap is generic (any caller could request decode), but
10302
- * stream-broker passes it so decoder logs include `deviceId` for
10303
- * per-camera filtering when diagnosing failures (e.g. node-av
10304
- * sendPacket errors on a single hung camera).
10305
- */
10306
- deviceId: number().int().nonnegative().optional(),
10307
- /**
10308
- * Free-form tag for log scoping. Stream-broker uses
10309
- * `broker:<deviceId>/<profile>`. Decoder session logger surfaces it
10310
- * on every line so `grep tag=broker:5/high` filters one camera
10311
- * profile cleanly.
10312
- */
10313
- tag: string().optional(),
10314
- /**
10315
- * Where the session delivers decoded frames (Phase 5 / D9):
10316
- *
10317
- * - `'callback'` (default) — the legacy pixel path: decoded frames are
10318
- * buffered as `DecodedFrame`s and drained via `pullFrames`.
10319
- * - `'shm'` — the shared-memory frame plane: decoded frames are written
10320
- * into an OS shared-memory ring and drained as zero-pixel
10321
- * `FrameHandle`s via `pullHandles`. A session is one mode or the
10322
- * other — `pullFrames` returns nothing for an `'shm'` session and
10323
- * `pullHandles` returns nothing for a `'callback'` session.
10324
- */
10325
- frameSink: _enum(["callback", "shm"]).default("callback"),
10326
- /**
10327
- * Per-camera decoder DEBUG facility. When `true`, a pull-mode session emits
10328
- * a throttled (~1Hz) structured `decoder debug` line (effective/adaptive fps,
10329
- * real-time lag, dropped-frame delta, avg decode time, hwaccel). Mirrors the
10330
- * stream-broker's `streamingDebug` gate — off by default so production logs
10331
- * stay quiet and the emit path pays zero per-frame cost when disabled.
10332
- */
10333
- debug: boolean().optional()
10334
- });
10335
10187
  /**
10336
10188
  * Per-component log CHANNELS — the gate a hot path consults, and the registry
10337
10189
  * an addon declares its channels in.
@@ -10474,6 +10326,26 @@ var ClipSearchStrictnessSchema = _enum([
10474
10326
  "balanced",
10475
10327
  "strict"
10476
10328
  ]);
10329
+ /** Steps whose effect a root label can BE. */
10330
+ var LABEL_SUPPLY_STEP_IDS = [
10331
+ "animal-classifier",
10332
+ "vehicle-classifier",
10333
+ "package-detection"
10334
+ ];
10335
+ /** Steps whose box a root detection can BE. */
10336
+ var CROP_SUPPLY_STEP_IDS = ["plate-detection", "face-detection"];
10337
+ /**
10338
+ * Steps whose per-detection MASK a root detection can carry (D737). The live
10339
+ * mask step is `segmentation` — a frame-plane refiner that runs its own model
10340
+ * once per detection crop. (`instance-segmentation` is a dormant step id that
10341
+ * no camera tree carries.)
10342
+ */
10343
+ var MASK_SUPPLY_STEP_IDS = ["segmentation"];
10344
+ [
10345
+ ...LABEL_SUPPLY_STEP_IDS,
10346
+ ...CROP_SUPPLY_STEP_IDS,
10347
+ ...MASK_SUPPLY_STEP_IDS
10348
+ ];
10477
10349
  var MODEL_FORMATS = [
10478
10350
  "onnx",
10479
10351
  "coreml",
@@ -10502,7 +10374,53 @@ var ModelFormatEntrySchema = object({
10502
10374
  /** Multi-file payload (directory members or sibling files). */
10503
10375
  files: array(string()).readonly().optional(),
10504
10376
  /** Runtime(s) that can use this format. If omitted, inferred from ModelFormat key */
10505
- runtimes: array(_enum(["python"])).readonly().optional()
10377
+ runtimes: array(_enum(["python"])).readonly().optional(),
10378
+ /**
10379
+ * Content revision of the artefact, for one hosted OFF the CamStack mirror.
10380
+ * A format on the mirror leaves it unset: its revision (the sha256 of its
10381
+ * weight file) comes from the downloader's generated table, kept in step
10382
+ * with the mirror by `scripts/check-hosted-model-revisions.ts` (D744). A
10383
+ * node records the revision it downloaded next to the file
10384
+ * (`<file>.revision`); a copy with no record or a different one is stale
10385
+ * unless its weight file hashes to the revision, and a stale copy is
10386
+ * downloaded again, the old one serving until the new one is complete. No
10387
+ * revision at all ⇒ a file on disk is current, whatever it holds (D743).
10388
+ */
10389
+ revision: string().min(1).optional()
10390
+ });
10391
+ /**
10392
+ * What a node holds for one (model, format) (D746). `current` is a complete
10393
+ * copy at its catalog revision — exactly what `downloaded: true` means.
10394
+ * `stale` is bytes on disk that are not (yet) proven current under D743/D744:
10395
+ * no or a different revision record, or a missing sibling. `missing` is no
10396
+ * copy. `downloaded` alone folds `stale` into "not downloaded", which hid
10397
+ * reclaimable bytes and a copy about to be replaced.
10398
+ */
10399
+ var ModelOnDiskStateSchema = _enum([
10400
+ "current",
10401
+ "stale",
10402
+ "missing"
10403
+ ]);
10404
+ /**
10405
+ * The numeric precision of one format's BUILD (D746) — reported only when the
10406
+ * build states it (file-name token, an INT8 variant, an EdgeTPU compile, a
10407
+ * CamStack Core ML export). Absent means "not stated", never "fp32".
10408
+ */
10409
+ var ModelFormatPrecisionSchema = _enum([
10410
+ "fp32",
10411
+ "fp16",
10412
+ "int8"
10413
+ ]);
10414
+ /**
10415
+ * One format of one model as a node's `pipelineExecutor.getSchema` reports it.
10416
+ * `onDisk` / `precision` are optional for version skew: a runner that predates
10417
+ * them omits them, and a reader falls back to `downloaded`.
10418
+ */
10419
+ var PipelineModelFormatStatusSchema = object({
10420
+ downloaded: boolean(),
10421
+ sizeMB: number(),
10422
+ onDisk: ModelOnDiskStateSchema.optional(),
10423
+ precision: ModelFormatPrecisionSchema.optional()
10506
10424
  });
10507
10425
  /**
10508
10426
  * Extra file that must be downloaded alongside the model (e.g., labels JSON, dict.txt).
@@ -10606,6 +10524,46 @@ var ModelLicenseSchema = preprocess((value) => typeof value === "string" ? { wei
10606
10524
  /** True when the weights or their data forbid commercial use. */
10607
10525
  nonCommercial: boolean().optional()
10608
10526
  }));
10527
+ /**
10528
+ * One step a ROOT detector can supply from its own output (D730) — see
10529
+ * `ModelCatalogEntry.suppliesSteps`.
10530
+ *
10531
+ * - `label`: the root's raw class IS the step's answer. `labelToEffect` maps
10532
+ * the root's label to the step's vocabulary; `uncovered` is the vocabulary
10533
+ * the root cannot produce (shown as unavailable, never a blocker).
10534
+ * - `crop`: the root draws the box the step would have found (`license_plate`
10535
+ * for plate-detection, `face` for face-detection). The box becomes a detail
10536
+ * child of the `parentMacro` detection that contains it — never a track.
10537
+ * - `mask`: the root's decode emits an instance mask with every detection (a
10538
+ * YOLO26-seg root, D737) — the `segmentation` step's result, carried on the
10539
+ * detection in the shape that step produces. Derived from the model's
10540
+ * postprocessor on read, never stored by an import.
10541
+ */
10542
+ var RootStepSupplySchema = discriminatedUnion("kind", [
10543
+ object({
10544
+ kind: literal("label"),
10545
+ stepId: _enum(LABEL_SUPPLY_STEP_IDS),
10546
+ labelToEffect: record(string(), string()),
10547
+ uncovered: array(string()).readonly()
10548
+ }),
10549
+ object({
10550
+ kind: literal("crop"),
10551
+ stepId: _enum(CROP_SUPPLY_STEP_IDS),
10552
+ rootLabels: array(string()).readonly(),
10553
+ parentMacro: _enum(["vehicle", "person"]),
10554
+ childClass: _enum(["plate", "face"]),
10555
+ /**
10556
+ * The root's smaller input side, stamped on read by `rootSuppliesOf` from
10557
+ * the model entry — what a step's `minRootInputPx` gate judges. Never
10558
+ * stored by an import.
10559
+ */
10560
+ rootInputPx: number().int().positive().optional()
10561
+ }),
10562
+ object({
10563
+ kind: literal("mask"),
10564
+ stepId: _enum(MASK_SUPPLY_STEP_IDS)
10565
+ })
10566
+ ]);
10609
10567
  var ModelCatalogEntrySchema = object({
10610
10568
  id: string(),
10611
10569
  name: string(),
@@ -10671,6 +10629,35 @@ var ModelCatalogEntrySchema = object({
10671
10629
  */
10672
10630
  defaultConfidence: number().min(0).max(1).optional(),
10673
10631
  /**
10632
+ * Per-MODEL default of the per-class confidence floors (`minConfidence<Macro>`
10633
+ * on a detector step), keyed by macro class: `{ person: 0.45 }`. A class
10634
+ * absent here runs at the step slider's global default. The same row shape
10635
+ * the floor measurement produces (`model-floors.json`: modelId → floors), so
10636
+ * a measured table is copied in as-is. An operator override is bound to the
10637
+ * model it was made for and does not survive a model change (D738). A custom
10638
+ * / imported model may declare it; without it, the global defaults apply.
10639
+ */
10640
+ defaultClassFloors: record(string(), number().min(0).max(1)).optional(),
10641
+ /**
10642
+ * The inference precision this model's OpenVINO IR needs on an Intel GPU.
10643
+ * Absent ⇒ the device default (f16 on a GPU). Set to `'f32'` for an FP32 IR
10644
+ * that produces invalid output at f16 — measured 2026-10-07 for YOLO26
10645
+ * base IRs (`yolo26s`: 0 true / 146 false positives; `yolo26m*`: NaN
10646
+ * scores) on the Core Ultra iGPU and the N100. Threaded to the pool as
10647
+ * `PoolModelConfig.gpuInferencePrecision`; the pool sets
10648
+ * INFERENCE_PRECISION_HINT on a GPU only. Costs ~60% latency on the GPU.
10649
+ */
10650
+ gpuInferencePrecision: _enum(["f32", "f16"]).optional(),
10651
+ /**
10652
+ * ROOT detectors only: per supplied step (`animal-classifier`, …), the
10653
+ * minimum DETECTION score from which this root's own fine label (species,
10654
+ * vehicle type — D736 root supply) is taken (D741). Below it the detection
10655
+ * keeps its macro class without the fine label. `1` = never take it from
10656
+ * this root. Absent ⇒ no floor beyond the macro floor. The supplied step's
10657
+ * `minConfidence` slider, bound to the ROOT model, overrides it.
10658
+ */
10659
+ suppliedLabelFloors: record(string(), number().min(0).max(1)).optional(),
10660
+ /**
10674
10661
  * When true, the executor produces a landmark-aligned crop (similarity warp
10675
10662
  * onto the canonical template) before this step runs, instead of a plain
10676
10663
  * axis-aligned bbox crop. Required for face-recognition embedders (ArcFace):
@@ -10732,6 +10719,16 @@ var ModelCatalogEntrySchema = object({
10732
10719
  */
10733
10720
  classMap: DetectionCatalogClassMapSchema.optional(),
10734
10721
  /**
10722
+ * The pipeline steps this ROOT detector can supply from its own output
10723
+ * (D730): its labels name a step's effect (`deer` for `animal-classifier`)
10724
+ * or draw a step's box (`license_plate` for `plate-detection`). Computed at
10725
+ * import from THIS model's labelmap by `deriveRootSupplies`, never written
10726
+ * by hand and never assumed per family; a row without it is derived on read
10727
+ * (`rootSuppliesOf`). Whether a camera uses it is the step's own
10728
+ * `useRootModel` flag (`resolveRootSupply`).
10729
+ */
10730
+ suppliesSteps: array(RootStepSupplySchema).readonly().optional(),
10731
+ /**
10735
10732
  * The model's CLIP feature-space contract (text encoder, dimension, vector
10736
10733
  * index, token window, search floor) — see `clip-model.ts`. Present ONLY on a
10737
10734
  * CLIP image encoder; its absence is what "not a CLIP model" means to the
@@ -12382,13 +12379,6 @@ var BrokerRtspClientSchema = object({
12382
12379
  lastRtpAt: number(),
12383
12380
  bytesSent: number()
12384
12381
  });
12385
- var BrokerDecodedClientSchema = object({
12386
- tag: string(),
12387
- subscribedAt: number(),
12388
- maxFps: number(),
12389
- framesDelivered: number(),
12390
- framesDropped: number()
12391
- });
12392
12382
  var BrokerAudioClientSchema = object({
12393
12383
  tag: string(),
12394
12384
  subscribedAt: number(),
@@ -12480,7 +12470,6 @@ var BrokerEncodedClientSchema = object({
12480
12470
  });
12481
12471
  var BrokerClientsSchema = object({
12482
12472
  rtsp: array(BrokerRtspClientSchema).readonly(),
12483
- decoded: array(BrokerDecodedClientSchema).readonly(),
12484
12473
  audio: array(BrokerAudioClientSchema).readonly(),
12485
12474
  encoded: array(BrokerEncodedClientSchema).readonly(),
12486
12475
  pipeClients: number(),
@@ -12849,11 +12838,7 @@ method(object({
12849
12838
  auth: "admin"
12850
12839
  }), method(object({ brokerId: string() }), BrokerClientsSchema), method(object({
12851
12840
  brokerId: string(),
12852
- channel: _enum([
12853
- "rtsp",
12854
- "decoded",
12855
- "audio"
12856
- ]),
12841
+ channel: _enum(["rtsp", "audio"]),
12857
12842
  handle: string()
12858
12843
  }), object({ killed: boolean() }), {
12859
12844
  kind: "mutation",
@@ -12888,10 +12873,7 @@ method(object({
12888
12873
  }), method(SubscribeAudioChunksInputSchema, SubscribeAudioChunksResultSchema, { kind: "mutation" }), method(object({
12889
12874
  subscriptionId: string(),
12890
12875
  maxCount: number().int().positive().default(8)
12891
- }), array(DecodedAudioChunkSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(SubscribeFramesInputSchema, SubscribeFramesResultSchema, { kind: "mutation" }), method(object({
12892
- subscriptionId: string(),
12893
- maxCount: number().int().positive().default(4)
12894
- }), array(FrameHandleSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(object({
12876
+ }), array(DecodedAudioChunkSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(object({
12895
12877
  brokerId: string(),
12896
12878
  seconds: number().min(0).max(30)
12897
12879
  }), _void(), {
@@ -14150,54 +14132,12 @@ id: union([string(), number()]) }), {
14150
14132
  kind: "mutation",
14151
14133
  auth: "admin"
14152
14134
  });
14153
- /**
14154
- * shm ring usage stats for a `frameSink: 'shm'` decoder session —
14155
- * exposed via `decoder.getShmStats` so downstream consumers can
14156
- * observe ring pressure (slot count, byte budget, hit/miss ratio).
14157
- */
14158
- var ShmRingStatsSchema = object({
14159
- sessionId: string(),
14160
- slotCount: number().int(),
14161
- slotByteLength: number().int(),
14162
- segmentBytes: number().int(),
14163
- budgetMb: number().int(),
14164
- framesWritten: number().int(),
14165
- getFrameHits: number().int(),
14166
- getFrameMisses: number().int()
14167
- });
14168
- method(object({ codec: string() }), boolean()), method(_void(), object({
14135
+ method(_void(), object({
14169
14136
  id: string(),
14170
14137
  name: string(),
14171
- isPullMode: boolean().optional(),
14172
- priority: number().optional(),
14173
14138
  hwaccel: string().optional(),
14174
14139
  probedBestHwaccel: string().optional()
14175
- })), method(DecoderSessionConfigSchema, object({
14176
- sessionId: string(),
14177
- nodeId: string()
14178
- })), method(object({ sessionId: string() }), _void()), method(object({
14179
- sessionId: string(),
14180
- packet: EncodedPacketSchema
14181
- }), _void()), method(object({
14182
- sessionId: string(),
14183
- url: string()
14184
- }), _void()), method(object({
14185
- sessionId: string(),
14186
- maxCount: number().default(1),
14187
- waitMs: number().optional()
14188
- }), array(DecodedFrameSchema)), method(object({
14189
- sessionId: string(),
14190
- maxCount: number().default(1),
14191
- waitMs: number().optional()
14192
- }), array(FrameHandleSchema)), method(object({ handle: FrameHandleSchema }), DecodedFrameSchema.nullable()), method(object({ sessionId: string() }), ShmRingStatsSchema.nullable()), method(object({
14193
- sessionId: string(),
14194
- config: DecoderSessionConfigSchema.partial()
14195
- }), _void()), method(object({ sessionId: string() }), DecoderStatsSchema), method(_void(), array(object({
14196
- sessionId: string(),
14197
- codec: string(),
14198
- outputFormat: string(),
14199
- createdAtMs: number()
14200
- })).readonly()), method(_void(), object({ backend: string() }), {
14140
+ })), method(_void(), object({ backend: string() }), {
14201
14141
  kind: "mutation",
14202
14142
  auth: "admin"
14203
14143
  });
@@ -16359,6 +16299,12 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
16359
16299
  kind: "mutation",
16360
16300
  auth: "admin"
16361
16301
  });
16302
+ var HUB_ADDRESS_ROLES = [
16303
+ "appConnections",
16304
+ "notificationTaps",
16305
+ "internal",
16306
+ "publicEndpoint"
16307
+ ];
16362
16308
  /**
16363
16309
  * Transport bounds for AI capability methods.
16364
16310
  *
@@ -18961,6 +18907,8 @@ var NcSystemEventKindSchema = _enum([
18961
18907
  "stream-offline",
18962
18908
  "node-online",
18963
18909
  "node-offline",
18910
+ "node-restarting",
18911
+ "node-updating",
18964
18912
  "node-inference-unavailable",
18965
18913
  "detection-blind",
18966
18914
  "addon-crash-loop",
@@ -20566,7 +20514,13 @@ var NcAlarmModeDelaysListSchema = array(object({
20566
20514
  * Absent = false (logged, not sent). Even when true it is not sent when that same sensor
20567
20515
  * is the one that starts the entry delay — the entry-delay notification already names it.
20568
20516
  */
20569
- notifySensorRewatched: boolean().optional()
20517
+ notifySensorRewatched: boolean().optional(),
20518
+ /**
20519
+ * D735: notify "ignored" when a sensor this arm bypassed really MOVED while armed (its own
20520
+ * change time is after the arm) and set nothing off. Absent = false (logged, not sent). A
20521
+ * re-sync, a recovery from `unavailable` or a duplicate is never announced, switch or not.
20522
+ */
20523
+ notifySensorIgnored: boolean().optional()
20570
20524
  })).max(8).refine(uniqueModes, { message: "modeDelays: at most one entry per arm mode" });
20571
20525
  var NcAlarmModeDelaysEditListSchema = array(object({
20572
20526
  mode: AlarmArmModeSchema,
@@ -20579,7 +20533,9 @@ var NcAlarmModeDelaysEditListSchema = array(object({
20579
20533
  /** D706: set the switch, or `null` to clear it (back to the default, false). */
20580
20534
  notifyDuringEntryDelay: boolean().nullable().optional(),
20581
20535
  /** D706: set the switch, or `null` to clear it (back to the default, false). */
20582
- notifySensorRewatched: boolean().nullable().optional()
20536
+ notifySensorRewatched: boolean().nullable().optional(),
20537
+ /** D735: set the switch, or `null` to clear it (back to the default, false). */
20538
+ notifySensorIgnored: boolean().nullable().optional()
20583
20539
  })).max(8).refine(uniqueModes, { message: "modeDelays: at most one edit per arm mode" });
20584
20540
  /** One switch of the alarm table: put ONE device on, or take it off, ONE mode's list. */
20585
20541
  var NcAlarmNonBlockingEditSchema = object({
@@ -21557,8 +21513,8 @@ Object.freeze(Object.fromEntries([{
21557
21513
  var CLUSTER_STEP_SETTING_FIELDS = [{
21558
21514
  stepId: "face-embedding",
21559
21515
  key: "minLandmarkFaceSize",
21560
- label: "Min face size for recognition (detection px)",
21561
- 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.",
21516
+ label: "Min face size to embed (detection-frame px)",
21517
+ 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.",
21562
21518
  type: "slider",
21563
21519
  min: 0,
21564
21520
  max: 64,
@@ -23478,6 +23434,34 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
23478
23434
  timestamp: number()
23479
23435
  });
23480
23436
  /**
23437
+ * A root model's boxes standing in for one crop-kind step's own inference
23438
+ * (D730) — see `runPipeline.suppliedRoot`.
23439
+ */
23440
+ var SuppliedRootOutputSchema = object({
23441
+ stepId: string(),
23442
+ /** The root model that drew the boxes — stamped on the result. */
23443
+ modelId: string(),
23444
+ detections: array(object({
23445
+ /** `[x1, y1, x2, y2]` in the pixels of the call's image. */
23446
+ bbox: tuple([
23447
+ number(),
23448
+ number(),
23449
+ number(),
23450
+ number()
23451
+ ]),
23452
+ score: number(),
23453
+ /**
23454
+ * Five facial landmarks in the same pixels — a face the step's own
23455
+ * detector already re-found inside a root face box (D730), so its
23456
+ * embedder child aligns it exactly as it aligns any detected face.
23457
+ */
23458
+ landmarks: array(object({
23459
+ x: number(),
23460
+ y: number()
23461
+ })).optional()
23462
+ })).min(1)
23463
+ });
23464
+ /**
23481
23465
  * Reference to the frame's retained NATIVE surface + the parent crop's placement
23482
23466
  * within the frame, so the executor can re-cut a leaf child ROI at native
23483
23467
  * resolution on the detail plane. See the `runPipeline` `nativeCropRef` field.
@@ -23525,7 +23509,7 @@ var FrameRefSchema = object({
23525
23509
  timestamp: number(),
23526
23510
  capturedAt: number().optional()
23527
23511
  });
23528
- var ModelFormatSchema$1 = _enum([
23512
+ var ModelFormatSchema$2 = _enum([
23529
23513
  "onnx",
23530
23514
  "coreml",
23531
23515
  "openvino",
@@ -23543,7 +23527,7 @@ var PipelineSlotSchema = _enum([
23543
23527
  var PipelineEngineChoiceSchema = object({
23544
23528
  runtime: literal("python"),
23545
23529
  backend: string(),
23546
- format: ModelFormatSchema$1,
23530
+ format: ModelFormatSchema$2,
23547
23531
  device: string().optional()
23548
23532
  });
23549
23533
  /**
@@ -23582,32 +23566,15 @@ var PipelineDefaultStepSchema = lazy(() => object({
23582
23566
  group: string().optional(),
23583
23567
  settings: record(string(), unknown()).optional()
23584
23568
  }));
23585
- var PipelineTemplateStepSchema = lazy(() => object({
23586
- addonId: string(),
23587
- enabled: boolean(),
23588
- modelId: string(),
23589
- children: array(PipelineTemplateStepSchema).readonly(),
23590
- settings: record(string(), unknown()).optional()
23591
- }));
23592
- var PipelineTemplateSchema$1 = object({
23593
- id: string(),
23594
- name: string(),
23595
- createdAt: string(),
23596
- updatedAt: string(),
23597
- engine: PipelineEngineChoiceSchema,
23598
- steps: array(PipelineTemplateStepSchema).readonly()
23599
- });
23600
23569
  var PipelineModelOptionSchema = object({
23601
23570
  id: string(),
23602
23571
  name: string(),
23603
- formats: record(string(), object({
23604
- downloaded: boolean(),
23605
- sizeMB: number()
23606
- })),
23572
+ formats: record(string(), PipelineModelFormatStatusSchema),
23607
23573
  group: ModelVariantGroupSchema.optional(),
23608
23574
  legacy: boolean().optional(),
23609
23575
  provider: ModelProviderIdSchema.optional(),
23610
- defaultConfidence: number().optional()
23576
+ defaultConfidence: number().optional(),
23577
+ suppliesSteps: array(RootStepSupplySchema).readonly().optional()
23611
23578
  });
23612
23579
  var ConfigFieldBridge = custom();
23613
23580
  var PipelineAddonSchemaSchema = object({
@@ -23769,6 +23736,22 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
23769
23736
  }), {
23770
23737
  kind: "mutation",
23771
23738
  auth: "admin"
23739
+ }), method(object({
23740
+ nodeId: string(),
23741
+ deviceIds: array(number()).readonly().optional(),
23742
+ dryRun: boolean()
23743
+ }), object({
23744
+ entries: array(object({
23745
+ deviceId: number(),
23746
+ keys: array(string()).readonly()
23747
+ })).readonly(),
23748
+ refused: array(object({
23749
+ deviceId: number(),
23750
+ reason: string()
23751
+ })).readonly()
23752
+ }), {
23753
+ kind: "mutation",
23754
+ auth: "admin"
23772
23755
  }), method(object({ nodeId: string() }), object({ unhealthy: array(object({
23773
23756
  /** `<backend>:<device>`, e.g. `openvino:gpu`. */
23774
23757
  deviceKey: string(),
@@ -23794,22 +23777,14 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
23794
23777
  }), method(_void(), PipelineSchemaSchema), method(_void(), array(PipelineDefaultStepSchema).readonly().nullable()), method(_void(), PipelineConfigBridge), method(_void(), ConfigUISchemaBridge), method(object({
23795
23778
  steps: array(PipelineStepInputSchema),
23796
23779
  deviceKey: string().optional()
23797
- }), PipelineValidationResultSchema), method(_void(), array(PipelineTemplateSchema$1).readonly()), method(object({
23798
- name: string(),
23799
- steps: array(PipelineTemplateStepSchema).readonly(),
23800
- engine: PipelineEngineChoiceSchema
23801
- }), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({
23802
- id: string(),
23803
- name: string().optional(),
23804
- steps: array(PipelineTemplateStepSchema).readonly().optional()
23805
- }), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({ id: string() }), _void(), { kind: "mutation" }), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
23780
+ }), PipelineValidationResultSchema), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
23806
23781
  addonId: string(),
23807
23782
  modelId: string(),
23808
- format: ModelFormatSchema$1
23783
+ format: ModelFormatSchema$2
23809
23784
  }), DownloadModelResultSchema, { kind: "mutation" }), method(object({
23810
23785
  addonId: string(),
23811
23786
  modelId: string(),
23812
- format: ModelFormatSchema$1
23787
+ format: ModelFormatSchema$2
23813
23788
  }), object({ success: literal(true) }), { kind: "mutation" }), method(object({
23814
23789
  steps: array(PipelineStepInputSchema).min(1),
23815
23790
  frame: FrameInputSchema.optional(),
@@ -23875,7 +23850,16 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
23875
23850
  * `device-not-servable`), and nothing reaches the camera's live
23876
23851
  * trace stream. Absent ⇒ unchanged behaviour.
23877
23852
  */
23878
- replay: literal(true).optional()
23853
+ replay: literal(true).optional(),
23854
+ /**
23855
+ * Root-supplied detections for the tree's ROOT step (D730). Set by
23856
+ * `runDetailSubtree` when the camera's root model supplies a crop-kind
23857
+ * step (a Frigate+ `license_plate` for `plate-detection`): the step is
23858
+ * NOT inferred, these boxes are its output, and its children (the plate
23859
+ * reader) run on them through their own crop policy. Boxes are in the
23860
+ * PIXELS of the image this call carries. Absent ⇒ the root step runs.
23861
+ */
23862
+ suppliedRoot: SuppliedRootOutputSchema.optional()
23879
23863
  }), PipelineRunResultBridge, { kind: "mutation" }), method(object({
23880
23864
  steps: array(PipelineStepInputSchema).min(1),
23881
23865
  frames: array(FrameInputSchema).min(1).max(255),
@@ -23957,6 +23941,375 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
23957
23941
  filename: string().optional(),
23958
23942
  settings: record(string(), unknown()).optional()
23959
23943
  }), AudioTestResultSchema, { kind: "mutation" }), method(_void(), ConfigUISchemaNullableBridge);
23944
+ /**
23945
+ * The wire shapes of the Auto tune plan and apply (D745), used by the
23946
+ * `pipeline-orchestrator` cap. The recommender's own types
23947
+ * (`recommend.ts`) are the TS face of the same data; these
23948
+ * schemas are what crosses the cap boundary.
23949
+ */
23950
+ var ModelFormatSchema$1 = _enum(MODEL_FORMATS);
23951
+ /** The operator's range for it. */
23952
+ var MIN_SESSIONS_PER_DEVICE_RANGE = {
23953
+ min: 1,
23954
+ max: 8
23955
+ };
23956
+ var HardwareClassIdSchema = _enum([
23957
+ "intel-core-ultra",
23958
+ "intel-n-series",
23959
+ "apple-m-base",
23960
+ "apple-m-pro",
23961
+ "unknown"
23962
+ ]);
23963
+ var AcceleratorKindSchema = _enum([
23964
+ "intel-npu",
23965
+ "intel-igpu",
23966
+ "x86-cpu",
23967
+ "arm-cpu",
23968
+ "apple-ane",
23969
+ "coral"
23970
+ ]);
23971
+ var RecommendationReasonSchema = discriminatedUnion("kind", [
23972
+ object({
23973
+ kind: literal("capacity"),
23974
+ sessions: number(),
23975
+ minSessions: number()
23976
+ }),
23977
+ object({
23978
+ kind: literal("tie-faster"),
23979
+ over: string(),
23980
+ recallDelta: number()
23981
+ }),
23982
+ object({
23983
+ kind: literal("stepped-down"),
23984
+ from: string(),
23985
+ to: string(),
23986
+ limitedBy: string()
23987
+ }),
23988
+ object({
23989
+ kind: literal("no-fit-lightest"),
23990
+ sessions: number(),
23991
+ minSessions: number()
23992
+ }),
23993
+ object({
23994
+ kind: literal("derived-latency"),
23995
+ modelId: string()
23996
+ }),
23997
+ object({ kind: literal("cpu-device") }),
23998
+ object({ kind: literal("coral-untouched") }),
23999
+ object({ kind: literal("device-disabled") }),
24000
+ object({ kind: literal("device-unavailable") }),
24001
+ object({ kind: literal("node-offline") }),
24002
+ object({ kind: literal("no-hardware-facts") }),
24003
+ object({
24004
+ kind: literal("no-measured-data"),
24005
+ hardwareClass: HardwareClassIdSchema
24006
+ }),
24007
+ object({
24008
+ kind: literal("no-family-build"),
24009
+ format: ModelFormatSchema$1
24010
+ })
24011
+ ]);
24012
+ var DeviceModelChoiceSchema = object({
24013
+ modelId: string(),
24014
+ p50Ms: number(),
24015
+ fps: number(),
24016
+ measured: boolean(),
24017
+ /** Parallel sessions at the camera rate with the headroom kept free: ⌊fps × (1 − headroom) / camera fps⌋. */
24018
+ capacitySessions: number(),
24019
+ personRecall: number()
24020
+ });
24021
+ var DeviceRecommendationSchema = object({
24022
+ deviceKey: string(),
24023
+ accelerator: AcceleratorKindSchema.nullable(),
24024
+ enabled: boolean(),
24025
+ available: boolean(),
24026
+ chosen: DeviceModelChoiceSchema.nullable(),
24027
+ reasons: array(RecommendationReasonSchema).readonly()
24028
+ });
24029
+ var NodeRecommendationSchema = object({
24030
+ nodeId: string(),
24031
+ reachable: boolean(),
24032
+ hardwareClass: HardwareClassIdSchema.nullable(),
24033
+ cpuModel: string().nullable(),
24034
+ skipped: boolean(),
24035
+ acceleratorModelId: string().nullable(),
24036
+ devices: array(DeviceRecommendationSchema).readonly(),
24037
+ reasons: array(RecommendationReasonSchema).readonly()
24038
+ });
24039
+ var ModelPinChangeSchema = object({
24040
+ stepId: string(),
24041
+ before: string().nullable(),
24042
+ after: string().nullable()
24043
+ });
24044
+ var NodeDeviceChangeSchema = object({
24045
+ nodeId: string(),
24046
+ deviceKey: string(),
24047
+ madeExplicit: boolean(),
24048
+ modelPins: array(ModelPinChangeSchema).readonly(),
24049
+ thresholds: array(object({
24050
+ stepId: string(),
24051
+ keys: array(string()).readonly()
24052
+ })).readonly()
24053
+ });
24054
+ var CameraOverrideClearSchema = object({
24055
+ deviceId: number(),
24056
+ source: _enum(["step-override", "wholesale"]),
24057
+ nodeId: string(),
24058
+ deviceKey: string().nullable(),
24059
+ stepId: string(),
24060
+ modelIdBefore: string().nullable(),
24061
+ keys: array(string()).readonly()
24062
+ });
24063
+ var DetectorStoreClearSchema = object({
24064
+ deviceId: number(),
24065
+ keys: array(string()).readonly()
24066
+ });
24067
+ var AutoTuneWarningSchema = discriminatedUnion("kind", [
24068
+ object({
24069
+ kind: literal("detector-store-cluster-wide"),
24070
+ skippedNodes: array(string()).readonly()
24071
+ }),
24072
+ object({
24073
+ kind: literal("detector-store-unreadable"),
24074
+ error: string()
24075
+ }),
24076
+ object({
24077
+ kind: literal("coral-enabled"),
24078
+ nodeId: string(),
24079
+ deviceKey: string()
24080
+ })
24081
+ ]);
24082
+ var AutoTuneOptionsSchema = object({
24083
+ /** Share of each accelerator's throughput kept free (0.3–0.5). */
24084
+ headroom: number().min(.3).max(.5).default(.4),
24085
+ /**
24086
+ * The least number of parallel sessions every device must sustain at the
24087
+ * camera rate with the headroom kept free (D755). The most accurate model
24088
+ * that reaches it wins.
24089
+ */
24090
+ minSessionsPerDevice: number().int().min(MIN_SESSIONS_PER_DEVICE_RANGE.min).max(MIN_SESSIONS_PER_DEVICE_RANGE.max).default(2)
24091
+ });
24092
+ var AutoTunePlanSchema = object({
24093
+ /** Hash of everything the apply will write — the apply refuses a different one. */
24094
+ planHash: string(),
24095
+ family: literal("yolov9"),
24096
+ headroom: number(),
24097
+ minSessionsPerDevice: number(),
24098
+ /** The detection rate a session is counted at (the fastest camera running the pipeline root). */
24099
+ cameraFps: number(),
24100
+ generatedAt: number(),
24101
+ nodes: array(NodeRecommendationSchema).readonly(),
24102
+ nodeChanges: array(NodeDeviceChangeSchema).readonly(),
24103
+ cameraClears: array(CameraOverrideClearSchema).readonly(),
24104
+ detectorStoreClears: array(DetectorStoreClearSchema).readonly(),
24105
+ warnings: array(AutoTuneWarningSchema).readonly()
24106
+ });
24107
+ var AutoTuneApplyInputSchema = object({
24108
+ planHash: string(),
24109
+ headroom: number().min(.3).max(.5).default(.4),
24110
+ minSessionsPerDevice: number().int().min(MIN_SESSIONS_PER_DEVICE_RANGE.min).max(MIN_SESSIONS_PER_DEVICE_RANGE.max).default(2)
24111
+ });
24112
+ var AutoTunePhaseResultSchema = object({
24113
+ phase: _enum([
24114
+ "download",
24115
+ "camera-overrides",
24116
+ "detector-thresholds",
24117
+ "node-models",
24118
+ "redispatch"
24119
+ ]),
24120
+ ok: boolean(),
24121
+ detail: string()
24122
+ });
24123
+ var AutoTuneApplyResultSchema = discriminatedUnion("kind", [
24124
+ object({
24125
+ kind: literal("applied"),
24126
+ planHash: string(),
24127
+ phases: array(AutoTunePhaseResultSchema).readonly()
24128
+ }),
24129
+ object({
24130
+ kind: literal("aborted"),
24131
+ phases: array(AutoTunePhaseResultSchema).readonly()
24132
+ }),
24133
+ object({
24134
+ kind: literal("stale"),
24135
+ plan: AutoTunePlanSchema
24136
+ }),
24137
+ object({
24138
+ kind: literal("refused"),
24139
+ reason: _enum(["apply-in-progress"])
24140
+ })
24141
+ ]);
24142
+ /**
24143
+ * Wire shapes of the Load balancing surface (D748): the session placement
24144
+ * policy, the atomic share write, the observed placement statistics, the
24145
+ * hardware share suggestion and the stale device pins.
24146
+ */
24147
+ /**
24148
+ * How a new detection session picks its node and device.
24149
+ * - `least-loaded` — the historical rule: lowest `attached / weight`, a
24150
+ * constant node order at a tie (D37). An idle node always ties at 0, so a
24151
+ * weight only bites once a node already holds a session.
24152
+ * - `share` — the share of PARALLEL sessions is held to the weights, and a
24153
+ * full or drowning node yields to a free one (D748).
24154
+ */
24155
+ var SessionPlacementPolicySchema = _enum(["least-loaded", "share"]);
24156
+ var LoadBalancingSharesInputSchema = object({
24157
+ /** nodeId → share (> 0). A node left out keeps its weight. */
24158
+ nodes: record(string(), number().positive()).default({}),
24159
+ /** nodeId → deviceKey → share (> 0). A device left out keeps its weight. */
24160
+ devices: record(string(), record(string(), number().positive())).default({})
24161
+ });
24162
+ var PlacementStatsInputSchema = object({
24163
+ /** Window the observed shares are averaged over (default 1 h, max 24 h). */
24164
+ windowMs: number().int().min(6e4).max(1440 * 60 * 1e3).default(3600 * 1e3) });
24165
+ var PlacementDeviceStatsSchema = object({
24166
+ deviceKey: string(),
24167
+ /** Sessions running on this device now. */
24168
+ sessionsNow: number(),
24169
+ /** Sessions started on this device inside the window. */
24170
+ sessionsStarted: number(),
24171
+ /** Time-weighted share of the node's parallel sessions over the window (0–1); null = no session ran. */
24172
+ observedShare: number().nullable()
24173
+ });
24174
+ var PlacementNodeStatsSchema = object({
24175
+ nodeId: string(),
24176
+ sessionsNow: number(),
24177
+ sessionsStarted: number(),
24178
+ /** Time-weighted share of the cluster's parallel sessions over the window (0–1); null = none ran. */
24179
+ observedShare: number().nullable(),
24180
+ /** Most sessions this node ran at once inside the window. */
24181
+ peakSessions: number(),
24182
+ /** Sessions a share election handed elsewhere because this node was full or drowning. */
24183
+ yieldsAway: number(),
24184
+ devices: array(PlacementDeviceStatsSchema).readonly()
24185
+ });
24186
+ /** A camera's device pin that the session path cannot honour. */
24187
+ var StaleDevicePinSchema = object({
24188
+ deviceId: number(),
24189
+ deviceKey: string(),
24190
+ /** `disabled` — the key exists on some node but is not enabled anywhere; `absent` — no node has it. */
24191
+ reason: _enum(["disabled", "absent"])
24192
+ });
24193
+ var PlacementStatsSchema = object({
24194
+ policy: SessionPlacementPolicySchema,
24195
+ windowMs: number(),
24196
+ /** How much of the window was actually observed (the hub keeps it in memory). */
24197
+ observedForMs: number(),
24198
+ sessionsNow: number(),
24199
+ /** Most parallel sessions across the cluster inside the window. */
24200
+ clusterPeakSessions: number(),
24201
+ nodes: array(PlacementNodeStatsSchema).readonly(),
24202
+ stalePins: array(StaleDevicePinSchema).readonly()
24203
+ });
24204
+ /**
24205
+ * Where an automatic share's capacity comes from (D755).
24206
+ * - `hardware` — the static capacity of each device at its Auto tune model:
24207
+ * the measured latency table for the node's hardware class.
24208
+ * - `benchmark` — the node's own measured capacity (node benchmark results).
24209
+ * A node with no results falls back to `hardware`, and says so.
24210
+ */
24211
+ var CapacitySourceSchema = _enum(["hardware", "benchmark"]);
24212
+ /** Why a node under the `benchmark` source was sized from hardware instead. */
24213
+ var CapacityFallbackSchema = _enum(["no-benchmark-results", "partial-benchmark-results"]);
24214
+ var SuggestSharesInputSchema = object({
24215
+ headroom: number().min(.3).max(.5).default(.4),
24216
+ /** Default `hardware`. */
24217
+ source: CapacitySourceSchema.default("hardware")
24218
+ });
24219
+ var SuggestedDeviceShareSchema = object({
24220
+ deviceKey: string(),
24221
+ /** Share of the node (0–100, rounded). */
24222
+ share: number(),
24223
+ modelId: string().nullable(),
24224
+ /** Inferences per second at that model, from the measured table; null when sized by a benchmark. */
24225
+ fps: number().nullable(),
24226
+ /** False for a table cell derived from another chip; true for a measured cell or a benchmark. */
24227
+ measured: boolean(),
24228
+ /**
24229
+ * Advisory session cap: ⌊fps × (1 − headroom) / camera fps⌋ from the table,
24230
+ * or the benchmark's measured max sessions. Never enforced.
24231
+ */
24232
+ suggestedMaxSessions: number().nullable()
24233
+ });
24234
+ var SuggestedNodeShareSchema = object({
24235
+ nodeId: string(),
24236
+ /** Share of the cluster (0–100, rounded); null = node skipped (offline, unknown hardware). */
24237
+ share: number().nullable(),
24238
+ /** Parallel sessions the node sustains at the suggested models with the headroom kept free. */
24239
+ capacitySessions: number(),
24240
+ devices: array(SuggestedDeviceShareSchema).readonly(),
24241
+ skippedReason: string().nullable(),
24242
+ /** What this node's capacity was read from; null when the node is skipped. */
24243
+ capacitySource: CapacitySourceSchema.nullable(),
24244
+ /** Set when the `benchmark` source was asked for and this node used `hardware`. */
24245
+ capacityFallback: CapacityFallbackSchema.nullable()
24246
+ });
24247
+ var SuggestSharesResultSchema = object({
24248
+ headroom: number(),
24249
+ /** The source asked for; each node says what it actually used. */
24250
+ source: CapacitySourceSchema,
24251
+ /** Camera detection rate the capacity is counted in (the fastest camera's fps). */
24252
+ cameraFps: number(),
24253
+ /** The Auto tune capacity floor the models were picked at. */
24254
+ minSessionsPerDevice: number(),
24255
+ nodes: array(SuggestedNodeShareSchema).readonly()
24256
+ });
24257
+ /**
24258
+ * Where the node and device shares come from (D750, D755).
24259
+ * - `hardware` (default) — computed by the system from each node's static
24260
+ * capacity (its accelerators at their Auto tune models, from the measured
24261
+ * latency table), recomputed whenever a node or device joins, leaves, is
24262
+ * switched on or off, or changes model. No load input.
24263
+ * - `benchmark` — the same, from each node's measured capacity (node
24264
+ * benchmark results); a node without results falls back to `hardware`.
24265
+ * - `manual` — the operator's stored sliders.
24266
+ * Either way a node or device that cannot take sessions gives its share to
24267
+ * the others in proportion; the stored values are never rewritten for that.
24268
+ */
24269
+ var ShareSourceSchema = _enum([
24270
+ "hardware",
24271
+ "benchmark",
24272
+ "manual"
24273
+ ]);
24274
+ var SetShareSourceInputSchema = object({ source: ShareSourceSchema });
24275
+ object({
24276
+ nodes: record(string(), number()),
24277
+ devices: record(string(), record(string(), number()))
24278
+ });
24279
+ var EffectiveDeviceShareSchema = object({
24280
+ deviceKey: string(),
24281
+ /** Can take sessions now (enabled, available, can run the root). */
24282
+ eligible: boolean(),
24283
+ /** The share the source assigns, as a percentage of the node's devices. */
24284
+ configuredPct: number(),
24285
+ /** The share actually used, after an ineligible device's share went to the others. */
24286
+ effectivePct: number()
24287
+ });
24288
+ var EffectiveNodeShareSchema = object({
24289
+ nodeId: string(),
24290
+ eligible: boolean(),
24291
+ configuredPct: number(),
24292
+ effectivePct: number(),
24293
+ /** Automatic sources: what this node's share was computed from; null under `manual` or before the first answer. */
24294
+ capacitySource: CapacitySourceSchema.nullable(),
24295
+ /** Automatic `benchmark`: why this node used `hardware` instead. */
24296
+ capacityFallback: CapacityFallbackSchema.nullable(),
24297
+ devices: array(EffectiveDeviceShareSchema).readonly()
24298
+ });
24299
+ var EffectiveSharesSchema = object({
24300
+ source: ShareSourceSchema,
24301
+ policy: SessionPlacementPolicySchema,
24302
+ /** An automatic source with no computed answer yet: the stored sliders are used meanwhile. */
24303
+ autoPending: boolean(),
24304
+ /** When the automatic shares were last computed (ms epoch); null = never. */
24305
+ computedAt: number().nullable(),
24306
+ /** What made the system recompute them last. */
24307
+ trigger: string().nullable(),
24308
+ nodes: array(EffectiveNodeShareSchema).readonly(),
24309
+ /** The relative weights the election reads (before eligibility). */
24310
+ nodeWeights: record(string(), number()),
24311
+ deviceWeights: record(string(), record(string(), number()))
24312
+ });
23960
24313
  object({
23961
24314
  activeCameras: number(),
23962
24315
  throttledCameras: number(),
@@ -24874,14 +25227,15 @@ var RunnerLocalLoadSchema = object({
24874
25227
  * Per-inference-device live load (multi-device C4). One entry per deviceKey
24875
25228
  * this runner currently has attached cameras on, so the orchestrator's second
24876
25229
  * `balance()` pass (over a node's devices) weights on real per-pool session
24877
- * counts. Empty on single-device / pre-multi-device runners. `queueDepthTotal`
24878
- * per device is 0 until the pool backlog gets a public accessor (follow-up).
25230
+ * counts. Empty on single-device / pre-multi-device runners. There is no
25231
+ * per-device queue depth: the inference pool's backlog has no accessor, and
25232
+ * a field that always read 0 was removed rather than shown as a measurement
25233
+ * (D762).
24879
25234
  */
24880
25235
  devices: array(object({
24881
25236
  deviceKey: string(),
24882
25237
  backend: string(),
24883
- attachedCameras: number(),
24884
- queueDepthTotal: number()
25238
+ attachedCameras: number()
24885
25239
  })).default([]),
24886
25240
  /** Hardware capability flags reported by this node. */
24887
25241
  hardware: object({
@@ -25017,7 +25371,22 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
25017
25371
  */
25018
25372
  cropJpeg: string().optional(),
25019
25373
  parent: DetailParentSchema,
25020
- steps: array(string()).optional()
25374
+ steps: array(string()).optional(),
25375
+ /**
25376
+ * The camera's root model already drew this step's boxes (D730): a
25377
+ * `license_plate` inside the parent vehicle. The named step is NOT
25378
+ * inferred — these FRAME-space boxes are its output — and its
25379
+ * requested children (the plate reader) run on them. Absent ⇒ every
25380
+ * requested step infers as before.
25381
+ */
25382
+ supplied: object({
25383
+ stepId: string(),
25384
+ modelId: string(),
25385
+ boxes: array(object({
25386
+ bbox: NativeCropBboxSchema,
25387
+ score: number()
25388
+ })).min(1)
25389
+ }).optional()
25021
25390
  }), object({ details: array(DetailResultSchema) }).nullable(), { kind: "mutation" }), method(object({
25022
25391
  /** Catalog step id, e.g. `clip-embedding`. */
25023
25392
  stepId: string(),
@@ -25080,14 +25449,6 @@ var CameraPipelineConfigSchema = object({
25080
25449
  settings: record(string(), unknown()).readonly().optional()
25081
25450
  }).nullable().optional()
25082
25451
  });
25083
- var PipelineTemplateSchema = object({
25084
- id: string(),
25085
- name: string(),
25086
- description: string().optional(),
25087
- config: CameraPipelineConfigSchema,
25088
- createdAt: string(),
25089
- updatedAt: string()
25090
- });
25091
25452
  var DeviceStepConfigSchema = object({
25092
25453
  modelId: string().optional(),
25093
25454
  settings: record(string(), unknown()).optional(),
@@ -25161,9 +25522,10 @@ var CameraStepOverridePatchSchema = object({
25161
25522
  modelId: string().optional(),
25162
25523
  settings: record(string(), unknown()).readonly().optional()
25163
25524
  });
25525
+ var CameraStepSettingsSchema = record(string(), record(string(), unknown()).readonly());
25164
25526
  var CameraPipelineSettingsSchema = object({
25165
- pinnedAgentNodeId: string().optional(),
25166
25527
  stepToggles: record(string(), boolean()).optional(),
25528
+ stepSettings: CameraStepSettingsSchema.optional(),
25167
25529
  stepOverridesByDevice: record(string(), record(string(), record(string(), CameraStepOverridePatchSchema))).optional(),
25168
25530
  pipelineByAgent: record(string(), CameraPipelineForAgentSchema).optional()
25169
25531
  });
@@ -25196,7 +25558,10 @@ var PipelineAssignmentSchema = object({
25196
25558
  });
25197
25559
  /**
25198
25560
  * Per-agent load summary surfaced to the load balancer + dashboards.
25199
- * Aggregated from each runner's `getLocalLoad` cap call.
25561
+ * Aggregated from each runner's `getLocalLoad` cap call. In the
25562
+ * `getAgentLoad` report, a single-device node's default-pool sessions (no
25563
+ * `deviceKey`) are credited to its one eligible device in `load.devices` —
25564
+ * the default pool IS that device (D745); the balancer's census stays raw.
25200
25565
  */
25201
25566
  var AgentLoadSummarySchema = object({
25202
25567
  nodeId: string(),
@@ -25285,26 +25650,27 @@ var CameraBrokerStatusSchema = object({
25285
25650
  width: number(),
25286
25651
  height: number(),
25287
25652
  subscribers: number(),
25288
- inFps: number(),
25289
- outFps: number()
25653
+ /**
25654
+ * Encoded packets/s the broker receives from the camera. null when the
25655
+ * broker's stats read failed — unknown, never 0 (a 0 here reads as a stall).
25656
+ * There is no output rate: decoding runs in the session decode workers, not
25657
+ * in the broker, so the broker's own decoded-frame rate is 0 on every live
25658
+ * camera and is not served (D758).
25659
+ */
25660
+ inFps: number().nullable()
25290
25661
  })).readonly(),
25291
25662
  webrtcSessions: number(),
25292
25663
  rtspRestream: boolean()
25293
25664
  });
25294
- /** Shared-memory ring statistics within the decoder block. */
25295
- var CameraDecoderShmSchema = object({
25296
- framesWritten: number(),
25297
- getFrameHits: number(),
25298
- getFrameMisses: number(),
25299
- budgetMb: number()
25300
- });
25301
- /** Decoder block — null when the decoder stage is unreachable or inactive. */
25302
- var CameraDecoderStatusSchema = object({
25303
- nodeId: string(),
25304
- formats: array(string()).readonly(),
25305
- sessionCount: number(),
25306
- shm: CameraDecoderShmSchema
25307
- });
25665
+ /**
25666
+ * Decoder block — WHERE decode runs (co-located with the detection node by
25667
+ * construction); null when the camera has no detection node. It carries no
25668
+ * frame counter: the shared-memory plane whose counters it used to serve is
25669
+ * gone, and those fields read 0 forever. Whether frames actually flow is read
25670
+ * from `detection.actualFps` (frames delivered to and processed by the
25671
+ * detector), never from a counter nothing feeds.
25672
+ */
25673
+ var CameraDecoderStatusSchema = object({ nodeId: string() });
25308
25674
  /** Motion block — null when motion detection is not active for this device. */
25309
25675
  var CameraMotionStatusSchema = object({
25310
25676
  enabled: boolean(),
@@ -25661,12 +26027,6 @@ method(object({
25661
26027
  }), object({ success: literal(true) }), {
25662
26028
  kind: "mutation",
25663
26029
  auth: "admin"
25664
- }), method(object({
25665
- agentNodeId: string(),
25666
- detectWeight: number().positive().nullable()
25667
- }), object({ success: literal(true) }), {
25668
- kind: "mutation",
25669
- auth: "admin"
25670
26030
  }), method(object({
25671
26031
  agentNodeId: string(),
25672
26032
  detect: boolean().nullable().optional(),
@@ -25708,6 +26068,15 @@ method(object({
25708
26068
  }), {
25709
26069
  kind: "mutation",
25710
26070
  auth: "admin"
26071
+ }), method(AutoTuneOptionsSchema, AutoTunePlanSchema, { auth: "admin" }), method(AutoTuneApplyInputSchema, AutoTuneApplyResultSchema, {
26072
+ kind: "mutation",
26073
+ auth: "admin"
26074
+ }), method(LoadBalancingSharesInputSchema, object({ success: literal(true) }), {
26075
+ kind: "mutation",
26076
+ auth: "admin"
26077
+ }), method(PlacementStatsInputSchema, PlacementStatsSchema, { auth: "admin" }), method(SuggestSharesInputSchema, SuggestSharesResultSchema, { auth: "admin" }), method(_void(), EffectiveSharesSchema, { auth: "admin" }), method(SetShareSourceInputSchema, object({ success: literal(true) }), {
26078
+ kind: "mutation",
26079
+ auth: "admin"
25711
26080
  }), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
25712
26081
  deviceId: number(),
25713
26082
  addonId: string(),
@@ -25724,6 +26093,13 @@ method(object({
25724
26093
  }), object({ success: literal(true) }), {
25725
26094
  kind: "mutation",
25726
26095
  auth: "admin"
26096
+ }), method(object({
26097
+ deviceId: number(),
26098
+ addonId: string(),
26099
+ settings: record(string(), unknown()).nullable()
26100
+ }), object({ success: literal(true) }), {
26101
+ kind: "mutation",
26102
+ auth: "admin"
25727
26103
  }), method(object({
25728
26104
  deviceId: number(),
25729
26105
  agentNodeId: string(),
@@ -25747,25 +26123,7 @@ method(object({
25747
26123
  }), method(_void(), DiskReconcileJobSchema, {
25748
26124
  kind: "mutation",
25749
26125
  auth: "admin"
25750
- }), method(_void(), DiskReconcileJobSchema, { auth: "admin" }), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
25751
- name: string(),
25752
- description: string().optional(),
25753
- config: CameraPipelineConfigSchema
25754
- }), PipelineTemplateSchema, {
25755
- kind: "mutation",
25756
- auth: "admin"
25757
- }), method(object({
25758
- id: string(),
25759
- name: string().optional(),
25760
- description: string().optional(),
25761
- config: CameraPipelineConfigSchema.optional()
25762
- }), PipelineTemplateSchema, {
25763
- kind: "mutation",
25764
- auth: "admin"
25765
- }), method(object({ id: string() }), object({ success: literal(true) }), {
25766
- kind: "mutation",
25767
- auth: "admin"
25768
- });
26126
+ }), method(_void(), DiskReconcileJobSchema, { auth: "admin" });
25769
26127
  /**
25770
26128
  * Cap → event-kind mapping for the SENSOR / CONTROL cap families — the table
25771
26129
  * `pipeline-analytics.listEventKinds` uses to turn a linked device's bound
@@ -28014,8 +28372,6 @@ var WebrtcStreamChoiceSchema = object({
28014
28372
  ]).nullable(),
28015
28373
  /** Input FPS from the camera (null for adaptive). */
28016
28374
  inputFps: number().nullable(),
28017
- /** Decoded FPS (null for adaptive). */
28018
- decodeFps: number().nullable(),
28019
28375
  /** Bitrate in kbps (null for adaptive). */
28020
28376
  bitrateKbps: number().nullable()
28021
28377
  });
@@ -28347,6 +28703,14 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
28347
28703
  */
28348
28704
  alive: boolean()
28349
28705
  })), method(object({
28706
+ deviceId: number().int().nonnegative(),
28707
+ sessionId: string(),
28708
+ downlinkMbps: number().nonnegative()
28709
+ }), object({
28710
+ outcome: _enum(["switching", "held"]),
28711
+ tier: CamProfileSchema.nullable(),
28712
+ reason: string()
28713
+ }), { kind: "mutation" }), method(object({
28350
28714
  deviceId: number().int().nonnegative(),
28351
28715
  sessionId: string()
28352
28716
  }), WebrtcSessionDebugSchema, { kind: "query" });
@@ -32158,7 +32522,8 @@ var ConnectionEndpointSchema = object({
32158
32522
  "lan-ipv6",
32159
32523
  "public",
32160
32524
  "loopback",
32161
- "app-link"
32525
+ "app-link",
32526
+ "custom"
32162
32527
  ]),
32163
32528
  /**
32164
32529
  * Originating-interface kind — `lan`/`wifi`/`docker`/`vpn`/`other`/
@@ -32227,7 +32592,7 @@ var GetConnectionEndpointsResultSchema = object({
32227
32592
  localPort: AdvertisedLocalPortSchema
32228
32593
  });
32229
32594
  /**
32230
- * The address flagged for notification links. `baseUrl: null` = AUTO, which
32595
+ * The address flagged for notification taps (`notificationTaps`). `baseUrl: null` = AUTO, which
32231
32596
  * since D709 is the CamStack app link; `resolved` reports the effective value,
32232
32597
  * so the UI can show it either way.
32233
32598
  */
@@ -32260,6 +32625,72 @@ var ViewerEndpointsSchema = object({
32260
32625
  /** What the ranking currently resolves to (may be empty if nothing is up). */
32261
32626
  resolved: array(string()).readonly()
32262
32627
  });
32628
+ /**
32629
+ * DEPRECATED compatibility shape of `getHubAddresses` (D729 amendment, kept
32630
+ * for addons built against it): `cluster` is the `internal` role, `browser`
32631
+ * the `publicEndpoint` role; `override` is the flagged address.
32632
+ */
32633
+ var HubAddressSnapshotSchema = object({
32634
+ override: string().nullable(),
32635
+ resolved: string().nullable(),
32636
+ source: _enum([
32637
+ "override",
32638
+ "auto",
32639
+ "none"
32640
+ ])
32641
+ });
32642
+ var HubAddressesSchema = object({
32643
+ cluster: HubAddressSnapshotSchema,
32644
+ browser: HubAddressSnapshotSchema
32645
+ });
32646
+ /**
32647
+ * What an address is used for (`hub-address.ts`, D734). `appConnections` is
32648
+ * many-valued; `notificationTaps`, `publicEndpoint` and `internal` are carried
32649
+ * by at most one address.
32650
+ */
32651
+ var HubAddressRoleSchema = _enum(HUB_ADDRESS_ROLES);
32652
+ var RoleSourceSchema = _enum([
32653
+ "flagged",
32654
+ "auto",
32655
+ "none"
32656
+ ]);
32657
+ /** One single-valued role: the flagged address, the one in use, and why. */
32658
+ var HubAddressRoleResolutionSchema = object({
32659
+ /** The address carrying the flag, or null = automatic. */
32660
+ flagged: string().nullable(),
32661
+ /** The address in use, or null when nothing qualifies (never loopback). */
32662
+ resolved: string().nullable(),
32663
+ source: RoleSourceSchema
32664
+ });
32665
+ var HubAppConnectionsResolutionSchema = object({
32666
+ /** The addresses flagged `appConnections`, or empty = automatic. */
32667
+ flagged: array(string()).readonly(),
32668
+ /** What the apps race right now. */
32669
+ resolved: array(string()).readonly(),
32670
+ source: RoleSourceSchema
32671
+ });
32672
+ var HubAddressBookSchema = object({
32673
+ rows: array(ConnectionEndpointSchema.extend({
32674
+ /** In the hub's detected palette right now. */
32675
+ detected: boolean(),
32676
+ /** Entered by the operator (removable). */
32677
+ custom: boolean(),
32678
+ /** The roles explicitly flagged on this address. */
32679
+ flags: array(HubAddressRoleSchema).readonly(),
32680
+ /** The roles this address serves right now — flagged or automatic. */
32681
+ inUse: array(HubAddressRoleSchema).readonly(),
32682
+ /** The roles this address may be flagged with. */
32683
+ eligible: array(HubAddressRoleSchema).readonly()
32684
+ })).readonly(),
32685
+ roles: object({
32686
+ appConnections: HubAppConnectionsResolutionSchema,
32687
+ notificationTaps: HubAddressRoleResolutionSchema,
32688
+ internal: HubAddressRoleResolutionSchema,
32689
+ publicEndpoint: HubAddressRoleResolutionSchema
32690
+ }),
32691
+ /** The `hub=` an app link carries (D709), or null. */
32692
+ appLinkHub: string().nullable()
32693
+ });
32263
32694
  var AllowedAddressesSchema = object({
32264
32695
  /**
32265
32696
  * Allowlist of interface addresses operators have explicitly opted
@@ -32303,10 +32734,27 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
32303
32734
  * tunnel always emits `https://` regardless. */
32304
32735
  scheme: _enum(["http", "https"]).optional(),
32305
32736
  /** Append the CamStack app link entry (`kind: 'app-link'`, D709) —
32306
- * an address notification links can be flagged with, not a hub
32737
+ * an address notification taps can be flagged with, not a hub
32307
32738
  * route. Default `false`: racers and rankers never see it. */
32308
32739
  includeAppLink: boolean().optional()
32309
- }), 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, {
32740
+ }), 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({
32741
+ baseUrl: string(),
32742
+ label: string().max(80)
32743
+ }), HubAddressBookSchema, {
32744
+ kind: "mutation",
32745
+ auth: "admin"
32746
+ }), method(object({ baseUrl: string() }), HubAddressBookSchema, {
32747
+ kind: "mutation",
32748
+ auth: "admin"
32749
+ }), method(object({
32750
+ role: HubAddressRoleSchema,
32751
+ baseUrl: string().nullable(),
32752
+ enabled: boolean(),
32753
+ acceptInsecureHttp: boolean().optional()
32754
+ }), HubAddressBookSchema, {
32755
+ kind: "mutation",
32756
+ auth: "admin"
32757
+ }), 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, {
32310
32758
  kind: "mutation",
32311
32759
  auth: "admin"
32312
32760
  }), method(object({
@@ -32764,7 +33212,8 @@ var MotionStatusSchema = object({
32764
33212
  * writes this slice (not even a boot seed), and neither does the runner's
32765
33213
  * phase machine: its phase is "a session is attached" for every on-motion
32766
33214
  * session, not motion, and it now has its own `DetectionPhaseTransition`.
32767
- * A provider's `isDetected` answers from the hub's slice.
33215
+ * A provider's `isDetected` and `getStatus` answer from the hub's slice
33216
+ * (`hubMotionNativeProvider`).
32768
33217
  * - **Sensors** (Home Assistant binary sensors, Homematic, Matter, Alexa
32769
33218
  * imports) — the provider pushes both edges itself, from the upstream
32770
33219
  * system's own state change. That is the sensor's own fact.
@@ -39311,6 +39760,16 @@ var zoneRulesCapability = {
39311
39760
  durability: "restored"
39312
39761
  };
39313
39762
  SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
39763
+ Object.freeze({
39764
+ person: .5,
39765
+ vehicle: .5,
39766
+ animal: .5
39767
+ });
39768
+ Object.freeze({
39769
+ person: .65,
39770
+ vehicle: .65,
39771
+ animal: .65
39772
+ });
39314
39773
  /**
39315
39774
  * Accessory device helpers — shared across drivers.
39316
39775
  *
@@ -42191,90 +42650,18 @@ Object.freeze({
42191
42650
  addonId: null,
42192
42651
  access: "create"
42193
42652
  },
42194
- "decoder.createSession": {
42195
- capName: "decoder",
42196
- capScope: "system",
42197
- addonId: null,
42198
- access: "view"
42199
- },
42200
- "decoder.destroySession": {
42201
- capName: "decoder",
42202
- capScope: "system",
42203
- addonId: null,
42204
- access: "delete"
42205
- },
42206
- "decoder.getFrame": {
42207
- capName: "decoder",
42208
- capScope: "system",
42209
- addonId: null,
42210
- access: "view"
42211
- },
42212
42653
  "decoder.getInfo": {
42213
42654
  capName: "decoder",
42214
42655
  capScope: "system",
42215
42656
  addonId: null,
42216
42657
  access: "view"
42217
42658
  },
42218
- "decoder.getShmStats": {
42219
- capName: "decoder",
42220
- capScope: "system",
42221
- addonId: null,
42222
- access: "view"
42223
- },
42224
- "decoder.getStats": {
42225
- capName: "decoder",
42226
- capScope: "system",
42227
- addonId: null,
42228
- access: "view"
42229
- },
42230
- "decoder.listActiveSessions": {
42231
- capName: "decoder",
42232
- capScope: "system",
42233
- addonId: null,
42234
- access: "view"
42235
- },
42236
- "decoder.openStream": {
42237
- capName: "decoder",
42238
- capScope: "system",
42239
- addonId: null,
42240
- access: "view"
42241
- },
42242
- "decoder.pullFrames": {
42243
- capName: "decoder",
42244
- capScope: "system",
42245
- addonId: null,
42246
- access: "view"
42247
- },
42248
- "decoder.pullHandles": {
42249
- capName: "decoder",
42250
- capScope: "system",
42251
- addonId: null,
42252
- access: "view"
42253
- },
42254
- "decoder.pushPacket": {
42255
- capName: "decoder",
42256
- capScope: "system",
42257
- addonId: null,
42258
- access: "view"
42259
- },
42260
42659
  "decoder.reprobeHwaccel": {
42261
42660
  capName: "decoder",
42262
42661
  capScope: "system",
42263
42662
  addonId: null,
42264
42663
  access: "create"
42265
42664
  },
42266
- "decoder.supportsCodec": {
42267
- capName: "decoder",
42268
- capScope: "system",
42269
- addonId: null,
42270
- access: "view"
42271
- },
42272
- "decoder.updateConfig": {
42273
- capName: "decoder",
42274
- capScope: "system",
42275
- addonId: null,
42276
- access: "view"
42277
- },
42278
42665
  "detectionPipeline.applyDeviceSettingsPatch": {
42279
42666
  capName: "detection-pipeline",
42280
42667
  capScope: "device",
@@ -43763,12 +44150,24 @@ Object.freeze({
43763
44150
  addonId: null,
43764
44151
  access: "view"
43765
44152
  },
44153
+ "localNetwork.addCustomAddress": {
44154
+ capName: "local-network",
44155
+ capScope: "system",
44156
+ addonId: null,
44157
+ access: "create"
44158
+ },
43766
44159
  "localNetwork.downloadCa": {
43767
44160
  capName: "local-network",
43768
44161
  capScope: "system",
43769
44162
  addonId: null,
43770
44163
  access: "view"
43771
44164
  },
44165
+ "localNetwork.getAddresses": {
44166
+ capName: "local-network",
44167
+ capScope: "system",
44168
+ addonId: null,
44169
+ access: "view"
44170
+ },
43772
44171
  "localNetwork.getAllowedAddresses": {
43773
44172
  capName: "local-network",
43774
44173
  capScope: "system",
@@ -43781,6 +44180,12 @@ Object.freeze({
43781
44180
  addonId: null,
43782
44181
  access: "view"
43783
44182
  },
44183
+ "localNetwork.getHubAddresses": {
44184
+ capName: "local-network",
44185
+ capScope: "system",
44186
+ addonId: null,
44187
+ access: "view"
44188
+ },
43784
44189
  "localNetwork.getNotificationEndpoint": {
43785
44190
  capName: "local-network",
43786
44191
  capScope: "system",
@@ -43817,6 +44222,12 @@ Object.freeze({
43817
44222
  addonId: null,
43818
44223
  access: "create"
43819
44224
  },
44225
+ "localNetwork.removeCustomAddress": {
44226
+ capName: "local-network",
44227
+ capScope: "system",
44228
+ addonId: null,
44229
+ access: "delete"
44230
+ },
43820
44231
  "localNetwork.resetAllowlistToBestMatch": {
43821
44232
  capName: "local-network",
43822
44233
  capScope: "system",
@@ -43829,6 +44240,12 @@ Object.freeze({
43829
44240
  addonId: null,
43830
44241
  access: "create"
43831
44242
  },
44243
+ "localNetwork.setAddressRole": {
44244
+ capName: "local-network",
44245
+ capScope: "system",
44246
+ addonId: null,
44247
+ access: "create"
44248
+ },
43832
44249
  "localNetwork.setAllowedAddresses": {
43833
44250
  capName: "local-network",
43834
44251
  capScope: "system",
@@ -45323,13 +45740,13 @@ Object.freeze({
45323
45740
  addonId: null,
45324
45741
  access: "delete"
45325
45742
  },
45326
- "pipelineExecutor.deleteModel": {
45743
+ "pipelineExecutor.clearModelBoundDeviceOverrides": {
45327
45744
  capName: "pipeline-executor",
45328
45745
  capScope: "system",
45329
45746
  addonId: null,
45330
45747
  access: "delete"
45331
45748
  },
45332
- "pipelineExecutor.deleteTemplate": {
45749
+ "pipelineExecutor.deleteModel": {
45333
45750
  capName: "pipeline-executor",
45334
45751
  capScope: "system",
45335
45752
  addonId: null,
@@ -45473,12 +45890,6 @@ Object.freeze({
45473
45890
  addonId: null,
45474
45891
  access: "view"
45475
45892
  },
45476
- "pipelineExecutor.listTemplates": {
45477
- capName: "pipeline-executor",
45478
- capScope: "system",
45479
- addonId: null,
45480
- access: "view"
45481
- },
45482
45893
  "pipelineExecutor.rearmInferenceDevice": {
45483
45894
  capName: "pipeline-executor",
45484
45895
  capScope: "system",
@@ -45503,12 +45914,6 @@ Object.freeze({
45503
45914
  addonId: null,
45504
45915
  access: "create"
45505
45916
  },
45506
- "pipelineExecutor.saveTemplate": {
45507
- capName: "pipeline-executor",
45508
- capScope: "system",
45509
- addonId: null,
45510
- access: "create"
45511
- },
45512
45917
  "pipelineExecutor.setVideoPipelineSteps": {
45513
45918
  capName: "pipeline-executor",
45514
45919
  capScope: "system",
@@ -45527,41 +45932,35 @@ Object.freeze({
45527
45932
  addonId: null,
45528
45933
  access: "create"
45529
45934
  },
45530
- "pipelineExecutor.updateTemplate": {
45531
- capName: "pipeline-executor",
45532
- capScope: "system",
45533
- addonId: null,
45534
- access: "create"
45535
- },
45536
45935
  "pipelineExecutor.validatePipeline": {
45537
45936
  capName: "pipeline-executor",
45538
45937
  capScope: "system",
45539
45938
  addonId: null,
45540
45939
  access: "view"
45541
45940
  },
45542
- "pipelineOrchestrator.applyDeviceSettingsPatch": {
45941
+ "pipelineOrchestrator.applyAutoTune": {
45543
45942
  capName: "pipeline-orchestrator",
45544
45943
  capScope: "system",
45545
45944
  addonId: null,
45546
45945
  access: "create"
45547
45946
  },
45548
- "pipelineOrchestrator.assignAudio": {
45947
+ "pipelineOrchestrator.applyDeviceSettingsPatch": {
45549
45948
  capName: "pipeline-orchestrator",
45550
45949
  capScope: "system",
45551
45950
  addonId: null,
45552
45951
  access: "create"
45553
45952
  },
45554
- "pipelineOrchestrator.assignPipeline": {
45953
+ "pipelineOrchestrator.assignAudio": {
45555
45954
  capName: "pipeline-orchestrator",
45556
45955
  capScope: "system",
45557
45956
  addonId: null,
45558
45957
  access: "create"
45559
45958
  },
45560
- "pipelineOrchestrator.deleteTemplate": {
45959
+ "pipelineOrchestrator.assignPipeline": {
45561
45960
  capName: "pipeline-orchestrator",
45562
45961
  capScope: "system",
45563
45962
  addonId: null,
45564
- access: "delete"
45963
+ access: "create"
45565
45964
  },
45566
45965
  "pipelineOrchestrator.getAgentLoad": {
45567
45966
  capName: "pipeline-orchestrator",
@@ -45653,6 +46052,12 @@ Object.freeze({
45653
46052
  addonId: null,
45654
46053
  access: "view"
45655
46054
  },
46055
+ "pipelineOrchestrator.getEffectiveShares": {
46056
+ capName: "pipeline-orchestrator",
46057
+ capScope: "system",
46058
+ addonId: null,
46059
+ access: "view"
46060
+ },
45656
46061
  "pipelineOrchestrator.getGlobalMetrics": {
45657
46062
  capName: "pipeline-orchestrator",
45658
46063
  capScope: "system",
@@ -45689,19 +46094,19 @@ Object.freeze({
45689
46094
  addonId: null,
45690
46095
  access: "view"
45691
46096
  },
45692
- "pipelineOrchestrator.getReconcileFromDiskStatus": {
46097
+ "pipelineOrchestrator.getPlacementStats": {
45693
46098
  capName: "pipeline-orchestrator",
45694
46099
  capScope: "system",
45695
46100
  addonId: null,
45696
46101
  access: "view"
45697
46102
  },
45698
- "pipelineOrchestrator.listAgentSettings": {
46103
+ "pipelineOrchestrator.getReconcileFromDiskStatus": {
45699
46104
  capName: "pipeline-orchestrator",
45700
46105
  capScope: "system",
45701
46106
  addonId: null,
45702
46107
  access: "view"
45703
46108
  },
45704
- "pipelineOrchestrator.listTemplates": {
46109
+ "pipelineOrchestrator.listAgentSettings": {
45705
46110
  capName: "pipeline-orchestrator",
45706
46111
  capScope: "system",
45707
46112
  addonId: null,
@@ -45713,6 +46118,12 @@ Object.freeze({
45713
46118
  addonId: null,
45714
46119
  access: "create"
45715
46120
  },
46121
+ "pipelineOrchestrator.planAutoTune": {
46122
+ capName: "pipeline-orchestrator",
46123
+ capScope: "system",
46124
+ addonId: null,
46125
+ access: "view"
46126
+ },
45716
46127
  "pipelineOrchestrator.rebalance": {
45717
46128
  capName: "pipeline-orchestrator",
45718
46129
  capScope: "system",
@@ -45755,12 +46166,6 @@ Object.freeze({
45755
46166
  addonId: null,
45756
46167
  access: "create"
45757
46168
  },
45758
- "pipelineOrchestrator.saveTemplate": {
45759
- capName: "pipeline-orchestrator",
45760
- capScope: "system",
45761
- addonId: null,
45762
- access: "create"
45763
- },
45764
46169
  "pipelineOrchestrator.setAgentCapabilities": {
45765
46170
  capName: "pipeline-orchestrator",
45766
46171
  capScope: "system",
@@ -45773,12 +46178,6 @@ Object.freeze({
45773
46178
  addonId: null,
45774
46179
  access: "create"
45775
46180
  },
45776
- "pipelineOrchestrator.setAgentDetectWeight": {
45777
- capName: "pipeline-orchestrator",
45778
- capScope: "system",
45779
- addonId: null,
45780
- access: "create"
45781
- },
45782
46181
  "pipelineOrchestrator.setAgentInferenceDevices": {
45783
46182
  capName: "pipeline-orchestrator",
45784
46183
  capScope: "system",
@@ -45815,6 +46214,12 @@ Object.freeze({
45815
46214
  addonId: null,
45816
46215
  access: "create"
45817
46216
  },
46217
+ "pipelineOrchestrator.setCameraStepSettings": {
46218
+ capName: "pipeline-orchestrator",
46219
+ capScope: "system",
46220
+ addonId: null,
46221
+ access: "create"
46222
+ },
45818
46223
  "pipelineOrchestrator.setCameraStepToggle": {
45819
46224
  capName: "pipeline-orchestrator",
45820
46225
  capScope: "system",
@@ -45833,25 +46238,37 @@ Object.freeze({
45833
46238
  addonId: null,
45834
46239
  access: "create"
45835
46240
  },
46241
+ "pipelineOrchestrator.setLoadBalancingShares": {
46242
+ capName: "pipeline-orchestrator",
46243
+ capScope: "system",
46244
+ addonId: null,
46245
+ access: "create"
46246
+ },
45836
46247
  "pipelineOrchestrator.setPipelineDevicePin": {
45837
46248
  capName: "pipeline-orchestrator",
45838
46249
  capScope: "system",
45839
46250
  addonId: null,
45840
46251
  access: "create"
45841
46252
  },
45842
- "pipelineOrchestrator.unassignAudio": {
46253
+ "pipelineOrchestrator.setShareSource": {
45843
46254
  capName: "pipeline-orchestrator",
45844
46255
  capScope: "system",
45845
46256
  addonId: null,
45846
46257
  access: "create"
45847
46258
  },
45848
- "pipelineOrchestrator.unassignPipeline": {
46259
+ "pipelineOrchestrator.suggestShares": {
46260
+ capName: "pipeline-orchestrator",
46261
+ capScope: "system",
46262
+ addonId: null,
46263
+ access: "view"
46264
+ },
46265
+ "pipelineOrchestrator.unassignAudio": {
45849
46266
  capName: "pipeline-orchestrator",
45850
46267
  capScope: "system",
45851
46268
  addonId: null,
45852
46269
  access: "create"
45853
46270
  },
45854
- "pipelineOrchestrator.updateTemplate": {
46271
+ "pipelineOrchestrator.unassignPipeline": {
45855
46272
  capName: "pipeline-orchestrator",
45856
46273
  capScope: "system",
45857
46274
  addonId: null,
@@ -47291,12 +47708,6 @@ Object.freeze({
47291
47708
  addonId: null,
47292
47709
  access: "view"
47293
47710
  },
47294
- "streamBroker.pullFrameHandles": {
47295
- capName: "stream-broker",
47296
- capScope: "system",
47297
- addonId: null,
47298
- access: "view"
47299
- },
47300
47711
  "streamBroker.regenerateRtspToken": {
47301
47712
  capName: "stream-broker",
47302
47713
  capScope: "system",
@@ -47363,12 +47774,6 @@ Object.freeze({
47363
47774
  addonId: null,
47364
47775
  access: "create"
47365
47776
  },
47366
- "streamBroker.subscribeFrames": {
47367
- capName: "stream-broker",
47368
- capScope: "system",
47369
- addonId: null,
47370
- access: "create"
47371
- },
47372
47777
  "streamBroker.unassignProfile": {
47373
47778
  capName: "stream-broker",
47374
47779
  capScope: "system",
@@ -47381,12 +47786,6 @@ Object.freeze({
47381
47786
  addonId: null,
47382
47787
  access: "create"
47383
47788
  },
47384
- "streamBroker.unsubscribeFrames": {
47385
- capName: "stream-broker",
47386
- capScope: "system",
47387
- addonId: null,
47388
- access: "create"
47389
- },
47390
47789
  "streamCatalog.getCatalog": {
47391
47790
  capName: "stream-catalog",
47392
47791
  capScope: "device",
@@ -48083,6 +48482,12 @@ Object.freeze({
48083
48482
  addonId: null,
48084
48483
  access: "create"
48085
48484
  },
48485
+ "webrtcSession.applyDownlinkProbe": {
48486
+ capName: "webrtc-session",
48487
+ capScope: "device",
48488
+ addonId: null,
48489
+ access: "create"
48490
+ },
48086
48491
  "webrtcSession.closeSession": {
48087
48492
  capName: "webrtc-session",
48088
48493
  capScope: "device",
@@ -49894,11 +50299,6 @@ Object.freeze({
49894
50299
  form: "single",
49895
50300
  optional: false
49896
50301
  }],
49897
- "decoder.createSession": [{
49898
- name: "deviceId",
49899
- form: "single",
49900
- optional: true
49901
- }],
49902
50302
  "detectionPipeline.applyDeviceSettingsPatch": [{
49903
50303
  name: "deviceId",
49904
50304
  form: "single",
@@ -51129,6 +51529,11 @@ Object.freeze({
51129
51529
  form: "single",
51130
51530
  optional: false
51131
51531
  }],
51532
+ "pipelineExecutor.clearModelBoundDeviceOverrides": [{
51533
+ name: "deviceIds",
51534
+ form: "array",
51535
+ optional: true
51536
+ }],
51132
51537
  "pipelineExecutor.runPipeline": [{
51133
51538
  name: "deviceId",
51134
51539
  form: "single",
@@ -51234,6 +51639,11 @@ Object.freeze({
51234
51639
  form: "single",
51235
51640
  optional: false
51236
51641
  }],
51642
+ "pipelineOrchestrator.setCameraStepSettings": [{
51643
+ name: "deviceId",
51644
+ form: "single",
51645
+ optional: false
51646
+ }],
51237
51647
  "pipelineOrchestrator.setCameraStepToggle": [{
51238
51648
  name: "deviceId",
51239
51649
  form: "single",
@@ -52005,6 +52415,11 @@ Object.freeze({
52005
52415
  form: "single",
52006
52416
  optional: false
52007
52417
  }],
52418
+ "webrtcSession.applyDownlinkProbe": [{
52419
+ name: "deviceId",
52420
+ form: "single",
52421
+ optional: false
52422
+ }],
52008
52423
  "webrtcSession.closeSession": [{
52009
52424
  name: "deviceId",
52010
52425
  form: "single",
@@ -52234,6 +52649,8 @@ new Map(Object.entries({
52234
52649
  "detection-blind": "device-events",
52235
52650
  "node-online": "system",
52236
52651
  "node-offline": "system",
52652
+ "node-restarting": "system",
52653
+ "node-updating": "system",
52237
52654
  "node-inference-unavailable": "system",
52238
52655
  "addon-crash-loop": "system",
52239
52656
  "addon-update-available": "system",
@@ -52311,6 +52728,7 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
52311
52728
  kinds: [
52312
52729
  "node-offline",
52313
52730
  "node-online",
52731
+ "node-restarting",
52314
52732
  "node-inference-unavailable"
52315
52733
  ]
52316
52734
  },
@@ -52332,6 +52750,7 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
52332
52750
  label: "Server & container updates",
52333
52751
  kinds: [
52334
52752
  "server-update-available",
52753
+ "node-updating",
52335
52754
  "server-updated",
52336
52755
  "wrapper-update-available"
52337
52756
  ]
@@ -52479,6 +52898,7 @@ var STATE_SUMMARY_SECTION_VARS = [
52479
52898
  kinds: [
52480
52899
  "node-offline",
52481
52900
  "node-online",
52901
+ "node-restarting",
52482
52902
  "node-inference-unavailable"
52483
52903
  ]
52484
52904
  },
@@ -52500,6 +52920,7 @@ var STATE_SUMMARY_SECTION_VARS = [
52500
52920
  example: "server 1.2.377 → 1.2.378",
52501
52921
  kinds: [
52502
52922
  "server-update-available",
52923
+ "node-updating",
52503
52924
  "server-updated",
52504
52925
  "wrapper-update-available"
52505
52926
  ]
@@ -52532,7 +52953,7 @@ var STATE_SUMMARY_VARS = [
52532
52953
  {
52533
52954
  name: "summarySection",
52534
52955
  label: "Summary: this section",
52535
- description: "The section a per-section summary row is about (D698); on a summary sent as one message, every section it reports, comma-separated.",
52956
+ description: "The section a per-section summary row is about; on a summary sent as one message, every section it reports, comma-separated.",
52536
52957
  example: "Batterie scariche",
52537
52958
  group: "system",
52538
52959
  families: ["rule"],