@camstack/addon-provider-homeassistant 1.2.162 → 1.2.163

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.
@@ -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-C16NCZR2.mjs
5372
+ //#region ../types/dist/sleep-B0JG7-_F.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
@@ -8451,8 +8367,8 @@ function buildAddonRouteProvider(id, routes) {
8451
8367
  const reply = buildCapturingReply(envelope);
8452
8368
  const request = {
8453
8369
  params: {
8454
- ...input.params,
8455
- ...match.params
8370
+ ...match.params,
8371
+ ...input.params
8456
8372
  },
8457
8373
  query: input.query,
8458
8374
  body: input.body,
@@ -10461,70 +10377,6 @@ var StorageLocationDeclarationSchema = object({
10461
10377
  "backup"
10462
10378
  ]).optional()
10463
10379
  });
10464
- var DecoderStatsSchema = object({
10465
- inputFps: number(),
10466
- outputFps: number(),
10467
- avgDecodeTimeMs: number(),
10468
- droppedFrames: number(),
10469
- /**
10470
- * Pull-mode adaptive-fps telemetry (optional — only pull sessions run the
10471
- * lag-driven controller; push sessions omit these). `lagMs` is the EWMA of
10472
- * the decoder's real-time drift (rising = falling behind live); `adaptiveFps`
10473
- * is the current lag-throttled emit rate (≤ `effectiveFps` ceiling).
10474
- */
10475
- lagMs: number().optional(),
10476
- effectiveFps: number().optional(),
10477
- adaptiveFps: number().optional()
10478
- });
10479
- var DecoderSessionConfigSchema = object({
10480
- codec: string(),
10481
- maxFps: number().default(0),
10482
- outputFormat: _enum([
10483
- "jpeg",
10484
- "rgb",
10485
- "bgr",
10486
- "yuv420",
10487
- "gray"
10488
- ]).default("jpeg"),
10489
- scale: number().default(1),
10490
- width: number().optional(),
10491
- height: number().optional(),
10492
- /**
10493
- * Identifier of the camera this decoder session serves. Optional
10494
- * because the cap is generic (any caller could request decode), but
10495
- * stream-broker passes it so decoder logs include `deviceId` for
10496
- * per-camera filtering when diagnosing failures (e.g. node-av
10497
- * sendPacket errors on a single hung camera).
10498
- */
10499
- deviceId: number().int().nonnegative().optional(),
10500
- /**
10501
- * Free-form tag for log scoping. Stream-broker uses
10502
- * `broker:<deviceId>/<profile>`. Decoder session logger surfaces it
10503
- * on every line so `grep tag=broker:5/high` filters one camera
10504
- * profile cleanly.
10505
- */
10506
- tag: string().optional(),
10507
- /**
10508
- * Where the session delivers decoded frames (Phase 5 / D9):
10509
- *
10510
- * - `'callback'` (default) — the legacy pixel path: decoded frames are
10511
- * buffered as `DecodedFrame`s and drained via `pullFrames`.
10512
- * - `'shm'` — the shared-memory frame plane: decoded frames are written
10513
- * into an OS shared-memory ring and drained as zero-pixel
10514
- * `FrameHandle`s via `pullHandles`. A session is one mode or the
10515
- * other — `pullFrames` returns nothing for an `'shm'` session and
10516
- * `pullHandles` returns nothing for a `'callback'` session.
10517
- */
10518
- frameSink: _enum(["callback", "shm"]).default("callback"),
10519
- /**
10520
- * Per-camera decoder DEBUG facility. When `true`, a pull-mode session emits
10521
- * a throttled (~1Hz) structured `decoder debug` line (effective/adaptive fps,
10522
- * real-time lag, dropped-frame delta, avg decode time, hwaccel). Mirrors the
10523
- * stream-broker's `streamingDebug` gate — off by default so production logs
10524
- * stay quiet and the emit path pays zero per-frame cost when disabled.
10525
- */
10526
- debug: boolean().optional()
10527
- });
10528
10380
  /**
10529
10381
  * Per-component log CHANNELS — the gate a hot path consults, and the registry
10530
10382
  * an addon declares its channels in.
@@ -10675,7 +10527,18 @@ var LABEL_SUPPLY_STEP_IDS = [
10675
10527
  ];
10676
10528
  /** Steps whose box a root detection can BE. */
10677
10529
  var CROP_SUPPLY_STEP_IDS = ["plate-detection", "face-detection"];
10678
- [...LABEL_SUPPLY_STEP_IDS, ...CROP_SUPPLY_STEP_IDS];
10530
+ /**
10531
+ * Steps whose per-detection MASK a root detection can carry (D737). The live
10532
+ * mask step is `segmentation` — a frame-plane refiner that runs its own model
10533
+ * once per detection crop. (`instance-segmentation` is a dormant step id that
10534
+ * no camera tree carries.)
10535
+ */
10536
+ var MASK_SUPPLY_STEP_IDS = ["segmentation"];
10537
+ [
10538
+ ...LABEL_SUPPLY_STEP_IDS,
10539
+ ...CROP_SUPPLY_STEP_IDS,
10540
+ ...MASK_SUPPLY_STEP_IDS
10541
+ ];
10679
10542
  var MODEL_FORMATS = [
10680
10543
  "onnx",
10681
10544
  "coreml",
@@ -10704,7 +10567,53 @@ var ModelFormatEntrySchema = object({
10704
10567
  /** Multi-file payload (directory members or sibling files). */
10705
10568
  files: array(string()).readonly().optional(),
10706
10569
  /** Runtime(s) that can use this format. If omitted, inferred from ModelFormat key */
10707
- runtimes: array(_enum(["python"])).readonly().optional()
10570
+ runtimes: array(_enum(["python"])).readonly().optional(),
10571
+ /**
10572
+ * Content revision of the artefact, for one hosted OFF the CamStack mirror.
10573
+ * A format on the mirror leaves it unset: its revision (the sha256 of its
10574
+ * weight file) comes from the downloader's generated table, kept in step
10575
+ * with the mirror by `scripts/check-hosted-model-revisions.ts` (D744). A
10576
+ * node records the revision it downloaded next to the file
10577
+ * (`<file>.revision`); a copy with no record or a different one is stale
10578
+ * unless its weight file hashes to the revision, and a stale copy is
10579
+ * downloaded again, the old one serving until the new one is complete. No
10580
+ * revision at all ⇒ a file on disk is current, whatever it holds (D743).
10581
+ */
10582
+ revision: string().min(1).optional()
10583
+ });
10584
+ /**
10585
+ * What a node holds for one (model, format) (D746). `current` is a complete
10586
+ * copy at its catalog revision — exactly what `downloaded: true` means.
10587
+ * `stale` is bytes on disk that are not (yet) proven current under D743/D744:
10588
+ * no or a different revision record, or a missing sibling. `missing` is no
10589
+ * copy. `downloaded` alone folds `stale` into "not downloaded", which hid
10590
+ * reclaimable bytes and a copy about to be replaced.
10591
+ */
10592
+ var ModelOnDiskStateSchema = _enum([
10593
+ "current",
10594
+ "stale",
10595
+ "missing"
10596
+ ]);
10597
+ /**
10598
+ * The numeric precision of one format's BUILD (D746) — reported only when the
10599
+ * build states it (file-name token, an INT8 variant, an EdgeTPU compile, a
10600
+ * CamStack Core ML export). Absent means "not stated", never "fp32".
10601
+ */
10602
+ var ModelFormatPrecisionSchema = _enum([
10603
+ "fp32",
10604
+ "fp16",
10605
+ "int8"
10606
+ ]);
10607
+ /**
10608
+ * One format of one model as a node's `pipelineExecutor.getSchema` reports it.
10609
+ * `onDisk` / `precision` are optional for version skew: a runner that predates
10610
+ * them omits them, and a reader falls back to `downloaded`.
10611
+ */
10612
+ var PipelineModelFormatStatusSchema = object({
10613
+ downloaded: boolean(),
10614
+ sizeMB: number(),
10615
+ onDisk: ModelOnDiskStateSchema.optional(),
10616
+ precision: ModelFormatPrecisionSchema.optional()
10708
10617
  });
10709
10618
  /**
10710
10619
  * Extra file that must be downloaded alongside the model (e.g., labels JSON, dict.txt).
@@ -10818,25 +10727,36 @@ var ModelLicenseSchema = preprocess((value) => typeof value === "string" ? { wei
10818
10727
  * - `crop`: the root draws the box the step would have found (`license_plate`
10819
10728
  * for plate-detection, `face` for face-detection). The box becomes a detail
10820
10729
  * child of the `parentMacro` detection that contains it — never a track.
10730
+ * - `mask`: the root's decode emits an instance mask with every detection (a
10731
+ * YOLO26-seg root, D737) — the `segmentation` step's result, carried on the
10732
+ * detection in the shape that step produces. Derived from the model's
10733
+ * postprocessor on read, never stored by an import.
10821
10734
  */
10822
- var RootStepSupplySchema = discriminatedUnion("kind", [object({
10823
- kind: literal("label"),
10824
- stepId: _enum(LABEL_SUPPLY_STEP_IDS),
10825
- labelToEffect: record(string(), string()),
10826
- uncovered: array(string()).readonly()
10827
- }), object({
10828
- kind: literal("crop"),
10829
- stepId: _enum(CROP_SUPPLY_STEP_IDS),
10830
- rootLabels: array(string()).readonly(),
10831
- parentMacro: _enum(["vehicle", "person"]),
10832
- childClass: _enum(["plate", "face"]),
10833
- /**
10834
- * The root's smaller input side, stamped on read by `rootSuppliesOf` from
10835
- * the model entry — what a step's `minRootInputPx` gate judges. Never
10836
- * stored by an import.
10837
- */
10838
- rootInputPx: number().int().positive().optional()
10839
- })]);
10735
+ var RootStepSupplySchema = discriminatedUnion("kind", [
10736
+ object({
10737
+ kind: literal("label"),
10738
+ stepId: _enum(LABEL_SUPPLY_STEP_IDS),
10739
+ labelToEffect: record(string(), string()),
10740
+ uncovered: array(string()).readonly()
10741
+ }),
10742
+ object({
10743
+ kind: literal("crop"),
10744
+ stepId: _enum(CROP_SUPPLY_STEP_IDS),
10745
+ rootLabels: array(string()).readonly(),
10746
+ parentMacro: _enum(["vehicle", "person"]),
10747
+ childClass: _enum(["plate", "face"]),
10748
+ /**
10749
+ * The root's smaller input side, stamped on read by `rootSuppliesOf` from
10750
+ * the model entry — what a step's `minRootInputPx` gate judges. Never
10751
+ * stored by an import.
10752
+ */
10753
+ rootInputPx: number().int().positive().optional()
10754
+ }),
10755
+ object({
10756
+ kind: literal("mask"),
10757
+ stepId: _enum(MASK_SUPPLY_STEP_IDS)
10758
+ })
10759
+ ]);
10840
10760
  var ModelCatalogEntrySchema = object({
10841
10761
  id: string(),
10842
10762
  name: string(),
@@ -10902,6 +10822,35 @@ var ModelCatalogEntrySchema = object({
10902
10822
  */
10903
10823
  defaultConfidence: number().min(0).max(1).optional(),
10904
10824
  /**
10825
+ * Per-MODEL default of the per-class confidence floors (`minConfidence<Macro>`
10826
+ * on a detector step), keyed by macro class: `{ person: 0.45 }`. A class
10827
+ * absent here runs at the step slider's global default. The same row shape
10828
+ * the floor measurement produces (`model-floors.json`: modelId → floors), so
10829
+ * a measured table is copied in as-is. An operator override is bound to the
10830
+ * model it was made for and does not survive a model change (D738). A custom
10831
+ * / imported model may declare it; without it, the global defaults apply.
10832
+ */
10833
+ defaultClassFloors: record(string(), number().min(0).max(1)).optional(),
10834
+ /**
10835
+ * The inference precision this model's OpenVINO IR needs on an Intel GPU.
10836
+ * Absent ⇒ the device default (f16 on a GPU). Set to `'f32'` for an FP32 IR
10837
+ * that produces invalid output at f16 — measured 2026-10-07 for YOLO26
10838
+ * base IRs (`yolo26s`: 0 true / 146 false positives; `yolo26m*`: NaN
10839
+ * scores) on the Core Ultra iGPU and the N100. Threaded to the pool as
10840
+ * `PoolModelConfig.gpuInferencePrecision`; the pool sets
10841
+ * INFERENCE_PRECISION_HINT on a GPU only. Costs ~60% latency on the GPU.
10842
+ */
10843
+ gpuInferencePrecision: _enum(["f32", "f16"]).optional(),
10844
+ /**
10845
+ * ROOT detectors only: per supplied step (`animal-classifier`, …), the
10846
+ * minimum DETECTION score from which this root's own fine label (species,
10847
+ * vehicle type — D736 root supply) is taken (D741). Below it the detection
10848
+ * keeps its macro class without the fine label. `1` = never take it from
10849
+ * this root. Absent ⇒ no floor beyond the macro floor. The supplied step's
10850
+ * `minConfidence` slider, bound to the ROOT model, overrides it.
10851
+ */
10852
+ suppliedLabelFloors: record(string(), number().min(0).max(1)).optional(),
10853
+ /**
10905
10854
  * When true, the executor produces a landmark-aligned crop (similarity warp
10906
10855
  * onto the canonical template) before this step runs, instead of a plain
10907
10856
  * axis-aligned bbox crop. Required for face-recognition embedders (ArcFace):
@@ -12642,13 +12591,6 @@ var BrokerRtspClientSchema = object({
12642
12591
  lastRtpAt: number(),
12643
12592
  bytesSent: number()
12644
12593
  });
12645
- var BrokerDecodedClientSchema = object({
12646
- tag: string(),
12647
- subscribedAt: number(),
12648
- maxFps: number(),
12649
- framesDelivered: number(),
12650
- framesDropped: number()
12651
- });
12652
12594
  var BrokerAudioClientSchema = object({
12653
12595
  tag: string(),
12654
12596
  subscribedAt: number(),
@@ -12740,7 +12682,6 @@ var BrokerEncodedClientSchema = object({
12740
12682
  });
12741
12683
  var BrokerClientsSchema = object({
12742
12684
  rtsp: array(BrokerRtspClientSchema).readonly(),
12743
- decoded: array(BrokerDecodedClientSchema).readonly(),
12744
12685
  audio: array(BrokerAudioClientSchema).readonly(),
12745
12686
  encoded: array(BrokerEncodedClientSchema).readonly(),
12746
12687
  pipeClients: number(),
@@ -13109,11 +13050,7 @@ method(object({
13109
13050
  auth: "admin"
13110
13051
  }), method(object({ brokerId: string() }), BrokerClientsSchema), method(object({
13111
13052
  brokerId: string(),
13112
- channel: _enum([
13113
- "rtsp",
13114
- "decoded",
13115
- "audio"
13116
- ]),
13053
+ channel: _enum(["rtsp", "audio"]),
13117
13054
  handle: string()
13118
13055
  }), object({ killed: boolean() }), {
13119
13056
  kind: "mutation",
@@ -13148,10 +13085,7 @@ method(object({
13148
13085
  }), method(SubscribeAudioChunksInputSchema, SubscribeAudioChunksResultSchema, { kind: "mutation" }), method(object({
13149
13086
  subscriptionId: string(),
13150
13087
  maxCount: number().int().positive().default(8)
13151
- }), array(DecodedAudioChunkSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(SubscribeFramesInputSchema, SubscribeFramesResultSchema, { kind: "mutation" }), method(object({
13152
- subscriptionId: string(),
13153
- maxCount: number().int().positive().default(4)
13154
- }), array(FrameHandleSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(object({
13088
+ }), array(DecodedAudioChunkSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(object({
13155
13089
  brokerId: string(),
13156
13090
  seconds: number().min(0).max(30)
13157
13091
  }), _void(), {
@@ -14410,54 +14344,12 @@ id: union([string(), number()]) }), {
14410
14344
  kind: "mutation",
14411
14345
  auth: "admin"
14412
14346
  });
14413
- /**
14414
- * shm ring usage stats for a `frameSink: 'shm'` decoder session —
14415
- * exposed via `decoder.getShmStats` so downstream consumers can
14416
- * observe ring pressure (slot count, byte budget, hit/miss ratio).
14417
- */
14418
- var ShmRingStatsSchema = object({
14419
- sessionId: string(),
14420
- slotCount: number().int(),
14421
- slotByteLength: number().int(),
14422
- segmentBytes: number().int(),
14423
- budgetMb: number().int(),
14424
- framesWritten: number().int(),
14425
- getFrameHits: number().int(),
14426
- getFrameMisses: number().int()
14427
- });
14428
- method(object({ codec: string() }), boolean()), method(_void(), object({
14347
+ method(_void(), object({
14429
14348
  id: string(),
14430
14349
  name: string(),
14431
- isPullMode: boolean().optional(),
14432
- priority: number().optional(),
14433
14350
  hwaccel: string().optional(),
14434
14351
  probedBestHwaccel: string().optional()
14435
- })), method(DecoderSessionConfigSchema, object({
14436
- sessionId: string(),
14437
- nodeId: string()
14438
- })), method(object({ sessionId: string() }), _void()), method(object({
14439
- sessionId: string(),
14440
- packet: EncodedPacketSchema
14441
- }), _void()), method(object({
14442
- sessionId: string(),
14443
- url: string()
14444
- }), _void()), method(object({
14445
- sessionId: string(),
14446
- maxCount: number().default(1),
14447
- waitMs: number().optional()
14448
- }), array(DecodedFrameSchema)), method(object({
14449
- sessionId: string(),
14450
- maxCount: number().default(1),
14451
- waitMs: number().optional()
14452
- }), array(FrameHandleSchema)), method(object({ handle: FrameHandleSchema }), DecodedFrameSchema.nullable()), method(object({ sessionId: string() }), ShmRingStatsSchema.nullable()), method(object({
14453
- sessionId: string(),
14454
- config: DecoderSessionConfigSchema.partial()
14455
- }), _void()), method(object({ sessionId: string() }), DecoderStatsSchema), method(_void(), array(object({
14456
- sessionId: string(),
14457
- codec: string(),
14458
- outputFormat: string(),
14459
- createdAtMs: number()
14460
- })).readonly()), method(_void(), object({ backend: string() }), {
14352
+ })), method(_void(), object({ backend: string() }), {
14461
14353
  kind: "mutation",
14462
14354
  auth: "admin"
14463
14355
  });
@@ -15691,6 +15583,10 @@ var DeviceInfoSchema = object({
15691
15583
  isCamera: boolean(),
15692
15584
  /** Current config values — serializable snapshot */
15693
15585
  config: record(string(), unknown()),
15586
+ /** Paths inside `config` the device's schema declares secret (D783) —
15587
+ * what the non-admin redaction withholds. Paths, never values. Absent
15588
+ * when the owning runner has not reported them. */
15589
+ secretConfigPaths: array(string()).optional(),
15694
15590
  /** Hardware + identity blob (manufacturer / model / firmware / sn /
15695
15591
  * uid / mac / …). Populated by drivers; editable via setMetadata. */
15696
15592
  metadata: record(string(), unknown()).nullable().optional(),
@@ -15896,7 +15792,13 @@ var DeviceRegisterPayloadSchema = object({
15896
15792
  * call (workers re-register on init), so probe-driven updates
15897
15793
  * (e.g. PTZ flag flipping after the abilities probe) propagate. */
15898
15794
  features: array(string()).optional(),
15899
- config: record(string(), unknown())
15795
+ config: record(string(), unknown()),
15796
+ /** Config paths the device's own schema DECLARES secret
15797
+ * (`.meta({ secret: true })` — dotted, `[]` for array items, e.g.
15798
+ * `connection.password`). Re-published on every register; the non-admin
15799
+ * redaction withholds them at any depth (D783). Optional: an older runner
15800
+ * omits it and the keyword backstop applies. */
15801
+ secretConfigPaths: array(string()).optional()
15900
15802
  });
15901
15803
  var DeviceRemovePayloadSchema = object({ deviceId: number() });
15902
15804
  var DevicePersistConfigPayloadSchema = object({
@@ -17555,7 +17457,14 @@ var LoginMethodContributionSchema = discriminatedUnion("kind", [
17555
17457
  icon: string().optional(),
17556
17458
  /** Addon-owned HTTP route the button navigates to (GET). */
17557
17459
  startUrl: string(),
17558
- stage: LoginStageEnum
17460
+ stage: LoginStageEnum,
17461
+ /**
17462
+ * The provider names an external identity a signed-in user can link to
17463
+ * their own account (D782): `auth.listLinkableProviders` /
17464
+ * `beginExternalLink` offer exactly the redirect methods that set this,
17465
+ * whatever their id. Absent / false — a login button only (magic-link).
17466
+ */
17467
+ linkable: boolean().optional()
17559
17468
  }),
17560
17469
  object({
17561
17470
  kind: literal("widget"),
@@ -21975,8 +21884,8 @@ Object.freeze(Object.fromEntries([{
21975
21884
  var CLUSTER_STEP_SETTING_FIELDS = [{
21976
21885
  stepId: "face-embedding",
21977
21886
  key: "minLandmarkFaceSize",
21978
- label: "Min face size for recognition (detection px)",
21979
- 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.",
21887
+ label: "Min face size to embed (detection-frame px)",
21888
+ 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.",
21980
21889
  type: "slider",
21981
21890
  min: 0,
21982
21891
  max: 64,
@@ -23028,7 +22937,13 @@ var RetrainFrameSchema = object({
23028
22937
  sizeBytes: number().int(),
23029
22938
  width: number().int(),
23030
22939
  height: number().int(),
23031
- copiedAt: number()
22940
+ copiedAt: number(),
22941
+ /** When the CAMERA captured the frame. Absent on a copy taken before D785. */
22942
+ capturedAt: number().optional(),
22943
+ /** The operator's "every subject in this frame is boxed". Detector
22944
+ * evaluation keeps only complete frames: an unboxed subject would count as
22945
+ * a false positive. */
22946
+ complete: boolean()
23032
22947
  });
23033
22948
  /** Why a copy-on-select could not be honoured — named, never a silent skip. */
23034
22949
  var RetrainCopyRefusalSchema = _enum([
@@ -23049,6 +22964,51 @@ var RetrainFrameListSchema = object({
23049
22964
  /** What the page pre-selects — the native key frame when one survives. */
23050
22965
  autoPickMediaId: number().int().optional()
23051
22966
  });
22967
+ /**
22968
+ * Which frames an annotated export carries. Every field narrows; an empty
22969
+ * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
22970
+ * list owned by whoever trains (the training orchestrator), so `frameIds` is
22971
+ * the primitive a version export uses; `batchId` re-selects what an earlier
22972
+ * export carried (`exportedInBatch`).
22973
+ */
22974
+ var RetrainExportFilterSchema = object({
22975
+ deviceIds: array(number()).optional(),
22976
+ frameIds: array(string()).max(2e4).optional(),
22977
+ batchId: string().optional(),
22978
+ /** Only frames the operator marked complete (all subjects boxed). */
22979
+ completeOnly: boolean().optional()
22980
+ });
22981
+ /**
22982
+ * `frames`: the full frame copies, boxes in `annotations.json`.
22983
+ * `crops`: additionally one JPEG per subject, cut with the runtime detail-crop
22984
+ * convention — the classifier layout.
22985
+ */
22986
+ var RetrainExportLayoutSchema = _enum(["frames", "crops"]);
22987
+ /**
22988
+ * Where `writeRetrainArchive` streams the tar: one HTTP request whose body is
22989
+ * the archive, sent chunk by chunk. Covers a presigned PUT and a provider
22990
+ * addon's data-plane upload route alike. Headers are sent verbatim and never
22991
+ * logged.
22992
+ */
22993
+ var RetrainArchiveTargetSchema = object({
22994
+ kind: literal("http"),
22995
+ method: _enum(["PUT", "POST"]),
22996
+ url: string().url(),
22997
+ headers: record(string(), string()).optional()
22998
+ });
22999
+ var RetrainArchiveResultSchema = object({
23000
+ batchId: string(),
23001
+ frames: number().int(),
23002
+ crops: number().int(),
23003
+ annotations: number().int(),
23004
+ /** Frames planned but not shipped (unreadable copy, path too long). */
23005
+ missing: number().int(),
23006
+ bytes: number().int(),
23007
+ /** sha256 of the exact bytes sent. */
23008
+ sha256: string(),
23009
+ /** The target's HTTP status. */
23010
+ status: number().int()
23011
+ });
23052
23012
  /** What the operator asked the assist to look for. */
23053
23013
  var RetrainAssistSubjectSchema = discriminatedUnion("kind", [object({
23054
23014
  kind: literal("package"),
@@ -23843,9 +23803,25 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
23843
23803
  }), RetrainTransitionResultSchema, {
23844
23804
  kind: "mutation",
23845
23805
  auth: "admin"
23846
- }), method(object({ deviceIds: array(number()).optional() }), object({ url: string() }), {
23806
+ }), method(RetrainExportFilterSchema.extend({ layout: RetrainExportLayoutSchema.optional() }), object({ url: string() }), {
23847
23807
  kind: "query",
23848
23808
  auth: "admin"
23809
+ }), method(object({
23810
+ deviceId: number(),
23811
+ trackId: string(),
23812
+ frameId: string(),
23813
+ complete: boolean()
23814
+ }), RetrainFrameSchema, {
23815
+ kind: "mutation",
23816
+ auth: "admin"
23817
+ }), method(object({
23818
+ filter: RetrainExportFilterSchema,
23819
+ layout: RetrainExportLayoutSchema,
23820
+ target: RetrainArchiveTargetSchema
23821
+ }), RetrainArchiveResultSchema, {
23822
+ kind: "mutation",
23823
+ auth: "admin",
23824
+ timeoutMs: 60 * 6e4
23849
23825
  }), method(object({
23850
23826
  /** Which of the three event tables owns the row. */
23851
23827
  ownerType: EventOwnerTypeSchema,
@@ -23971,7 +23947,7 @@ var FrameRefSchema = object({
23971
23947
  timestamp: number(),
23972
23948
  capturedAt: number().optional()
23973
23949
  });
23974
- var ModelFormatSchema$1 = _enum([
23950
+ var ModelFormatSchema$2 = _enum([
23975
23951
  "onnx",
23976
23952
  "coreml",
23977
23953
  "openvino",
@@ -23989,7 +23965,7 @@ var PipelineSlotSchema = _enum([
23989
23965
  var PipelineEngineChoiceSchema = object({
23990
23966
  runtime: literal("python"),
23991
23967
  backend: string(),
23992
- format: ModelFormatSchema$1,
23968
+ format: ModelFormatSchema$2,
23993
23969
  device: string().optional()
23994
23970
  });
23995
23971
  /**
@@ -24028,28 +24004,10 @@ var PipelineDefaultStepSchema = lazy(() => object({
24028
24004
  group: string().optional(),
24029
24005
  settings: record(string(), unknown()).optional()
24030
24006
  }));
24031
- var PipelineTemplateStepSchema = lazy(() => object({
24032
- addonId: string(),
24033
- enabled: boolean(),
24034
- modelId: string(),
24035
- children: array(PipelineTemplateStepSchema).readonly(),
24036
- settings: record(string(), unknown()).optional()
24037
- }));
24038
- var PipelineTemplateSchema$1 = object({
24039
- id: string(),
24040
- name: string(),
24041
- createdAt: string(),
24042
- updatedAt: string(),
24043
- engine: PipelineEngineChoiceSchema,
24044
- steps: array(PipelineTemplateStepSchema).readonly()
24045
- });
24046
24007
  var PipelineModelOptionSchema = object({
24047
24008
  id: string(),
24048
24009
  name: string(),
24049
- formats: record(string(), object({
24050
- downloaded: boolean(),
24051
- sizeMB: number()
24052
- })),
24010
+ formats: record(string(), PipelineModelFormatStatusSchema),
24053
24011
  group: ModelVariantGroupSchema.optional(),
24054
24012
  legacy: boolean().optional(),
24055
24013
  provider: ModelProviderIdSchema.optional(),
@@ -24216,6 +24174,22 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
24216
24174
  }), {
24217
24175
  kind: "mutation",
24218
24176
  auth: "admin"
24177
+ }), method(object({
24178
+ nodeId: string(),
24179
+ deviceIds: array(number()).readonly().optional(),
24180
+ dryRun: boolean()
24181
+ }), object({
24182
+ entries: array(object({
24183
+ deviceId: number(),
24184
+ keys: array(string()).readonly()
24185
+ })).readonly(),
24186
+ refused: array(object({
24187
+ deviceId: number(),
24188
+ reason: string()
24189
+ })).readonly()
24190
+ }), {
24191
+ kind: "mutation",
24192
+ auth: "admin"
24219
24193
  }), method(object({ nodeId: string() }), object({ unhealthy: array(object({
24220
24194
  /** `<backend>:<device>`, e.g. `openvino:gpu`. */
24221
24195
  deviceKey: string(),
@@ -24241,22 +24215,14 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
24241
24215
  }), method(_void(), PipelineSchemaSchema), method(_void(), array(PipelineDefaultStepSchema).readonly().nullable()), method(_void(), PipelineConfigBridge), method(_void(), ConfigUISchemaBridge), method(object({
24242
24216
  steps: array(PipelineStepInputSchema),
24243
24217
  deviceKey: string().optional()
24244
- }), PipelineValidationResultSchema), method(_void(), array(PipelineTemplateSchema$1).readonly()), method(object({
24245
- name: string(),
24246
- steps: array(PipelineTemplateStepSchema).readonly(),
24247
- engine: PipelineEngineChoiceSchema
24248
- }), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({
24249
- id: string(),
24250
- name: string().optional(),
24251
- steps: array(PipelineTemplateStepSchema).readonly().optional()
24252
- }), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({ id: string() }), _void(), { kind: "mutation" }), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
24218
+ }), PipelineValidationResultSchema), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
24253
24219
  addonId: string(),
24254
24220
  modelId: string(),
24255
- format: ModelFormatSchema$1
24221
+ format: ModelFormatSchema$2
24256
24222
  }), DownloadModelResultSchema, { kind: "mutation" }), method(object({
24257
24223
  addonId: string(),
24258
24224
  modelId: string(),
24259
- format: ModelFormatSchema$1
24225
+ format: ModelFormatSchema$2
24260
24226
  }), object({ success: literal(true) }), { kind: "mutation" }), method(object({
24261
24227
  steps: array(PipelineStepInputSchema).min(1),
24262
24228
  frame: FrameInputSchema.optional(),
@@ -24413,6 +24379,375 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
24413
24379
  filename: string().optional(),
24414
24380
  settings: record(string(), unknown()).optional()
24415
24381
  }), AudioTestResultSchema, { kind: "mutation" }), method(_void(), ConfigUISchemaNullableBridge);
24382
+ /**
24383
+ * The wire shapes of the Auto tune plan and apply (D745), used by the
24384
+ * `pipeline-orchestrator` cap. The recommender's own types
24385
+ * (`recommend.ts`) are the TS face of the same data; these
24386
+ * schemas are what crosses the cap boundary.
24387
+ */
24388
+ var ModelFormatSchema$1 = _enum(MODEL_FORMATS);
24389
+ /** The operator's range for it. */
24390
+ var MIN_SESSIONS_PER_DEVICE_RANGE = {
24391
+ min: 1,
24392
+ max: 8
24393
+ };
24394
+ var HardwareClassIdSchema = _enum([
24395
+ "intel-core-ultra",
24396
+ "intel-n-series",
24397
+ "apple-m-base",
24398
+ "apple-m-pro",
24399
+ "unknown"
24400
+ ]);
24401
+ var AcceleratorKindSchema = _enum([
24402
+ "intel-npu",
24403
+ "intel-igpu",
24404
+ "x86-cpu",
24405
+ "arm-cpu",
24406
+ "apple-ane",
24407
+ "coral"
24408
+ ]);
24409
+ var RecommendationReasonSchema = discriminatedUnion("kind", [
24410
+ object({
24411
+ kind: literal("capacity"),
24412
+ sessions: number(),
24413
+ minSessions: number()
24414
+ }),
24415
+ object({
24416
+ kind: literal("tie-faster"),
24417
+ over: string(),
24418
+ recallDelta: number()
24419
+ }),
24420
+ object({
24421
+ kind: literal("stepped-down"),
24422
+ from: string(),
24423
+ to: string(),
24424
+ limitedBy: string()
24425
+ }),
24426
+ object({
24427
+ kind: literal("no-fit-lightest"),
24428
+ sessions: number(),
24429
+ minSessions: number()
24430
+ }),
24431
+ object({
24432
+ kind: literal("derived-latency"),
24433
+ modelId: string()
24434
+ }),
24435
+ object({ kind: literal("cpu-device") }),
24436
+ object({ kind: literal("coral-untouched") }),
24437
+ object({ kind: literal("device-disabled") }),
24438
+ object({ kind: literal("device-unavailable") }),
24439
+ object({ kind: literal("node-offline") }),
24440
+ object({ kind: literal("no-hardware-facts") }),
24441
+ object({
24442
+ kind: literal("no-measured-data"),
24443
+ hardwareClass: HardwareClassIdSchema
24444
+ }),
24445
+ object({
24446
+ kind: literal("no-family-build"),
24447
+ format: ModelFormatSchema$1
24448
+ })
24449
+ ]);
24450
+ var DeviceModelChoiceSchema = object({
24451
+ modelId: string(),
24452
+ p50Ms: number(),
24453
+ fps: number(),
24454
+ measured: boolean(),
24455
+ /** Parallel sessions at the camera rate with the headroom kept free: ⌊fps × (1 − headroom) / camera fps⌋. */
24456
+ capacitySessions: number(),
24457
+ personRecall: number()
24458
+ });
24459
+ var DeviceRecommendationSchema = object({
24460
+ deviceKey: string(),
24461
+ accelerator: AcceleratorKindSchema.nullable(),
24462
+ enabled: boolean(),
24463
+ available: boolean(),
24464
+ chosen: DeviceModelChoiceSchema.nullable(),
24465
+ reasons: array(RecommendationReasonSchema).readonly()
24466
+ });
24467
+ var NodeRecommendationSchema = object({
24468
+ nodeId: string(),
24469
+ reachable: boolean(),
24470
+ hardwareClass: HardwareClassIdSchema.nullable(),
24471
+ cpuModel: string().nullable(),
24472
+ skipped: boolean(),
24473
+ acceleratorModelId: string().nullable(),
24474
+ devices: array(DeviceRecommendationSchema).readonly(),
24475
+ reasons: array(RecommendationReasonSchema).readonly()
24476
+ });
24477
+ var ModelPinChangeSchema = object({
24478
+ stepId: string(),
24479
+ before: string().nullable(),
24480
+ after: string().nullable()
24481
+ });
24482
+ var NodeDeviceChangeSchema = object({
24483
+ nodeId: string(),
24484
+ deviceKey: string(),
24485
+ madeExplicit: boolean(),
24486
+ modelPins: array(ModelPinChangeSchema).readonly(),
24487
+ thresholds: array(object({
24488
+ stepId: string(),
24489
+ keys: array(string()).readonly()
24490
+ })).readonly()
24491
+ });
24492
+ var CameraOverrideClearSchema = object({
24493
+ deviceId: number(),
24494
+ source: _enum(["step-override", "wholesale"]),
24495
+ nodeId: string(),
24496
+ deviceKey: string().nullable(),
24497
+ stepId: string(),
24498
+ modelIdBefore: string().nullable(),
24499
+ keys: array(string()).readonly()
24500
+ });
24501
+ var DetectorStoreClearSchema = object({
24502
+ deviceId: number(),
24503
+ keys: array(string()).readonly()
24504
+ });
24505
+ var AutoTuneWarningSchema = discriminatedUnion("kind", [
24506
+ object({
24507
+ kind: literal("detector-store-cluster-wide"),
24508
+ skippedNodes: array(string()).readonly()
24509
+ }),
24510
+ object({
24511
+ kind: literal("detector-store-unreadable"),
24512
+ error: string()
24513
+ }),
24514
+ object({
24515
+ kind: literal("coral-enabled"),
24516
+ nodeId: string(),
24517
+ deviceKey: string()
24518
+ })
24519
+ ]);
24520
+ var AutoTuneOptionsSchema = object({
24521
+ /** Share of each accelerator's throughput kept free (0.3–0.5). */
24522
+ headroom: number().min(.3).max(.5).default(.4),
24523
+ /**
24524
+ * The least number of parallel sessions every device must sustain at the
24525
+ * camera rate with the headroom kept free (D755). The most accurate model
24526
+ * that reaches it wins.
24527
+ */
24528
+ minSessionsPerDevice: number().int().min(MIN_SESSIONS_PER_DEVICE_RANGE.min).max(MIN_SESSIONS_PER_DEVICE_RANGE.max).default(2)
24529
+ });
24530
+ var AutoTunePlanSchema = object({
24531
+ /** Hash of everything the apply will write — the apply refuses a different one. */
24532
+ planHash: string(),
24533
+ family: literal("yolov9"),
24534
+ headroom: number(),
24535
+ minSessionsPerDevice: number(),
24536
+ /** The detection rate a session is counted at (the fastest camera running the pipeline root). */
24537
+ cameraFps: number(),
24538
+ generatedAt: number(),
24539
+ nodes: array(NodeRecommendationSchema).readonly(),
24540
+ nodeChanges: array(NodeDeviceChangeSchema).readonly(),
24541
+ cameraClears: array(CameraOverrideClearSchema).readonly(),
24542
+ detectorStoreClears: array(DetectorStoreClearSchema).readonly(),
24543
+ warnings: array(AutoTuneWarningSchema).readonly()
24544
+ });
24545
+ var AutoTuneApplyInputSchema = object({
24546
+ planHash: string(),
24547
+ headroom: number().min(.3).max(.5).default(.4),
24548
+ minSessionsPerDevice: number().int().min(MIN_SESSIONS_PER_DEVICE_RANGE.min).max(MIN_SESSIONS_PER_DEVICE_RANGE.max).default(2)
24549
+ });
24550
+ var AutoTunePhaseResultSchema = object({
24551
+ phase: _enum([
24552
+ "download",
24553
+ "camera-overrides",
24554
+ "detector-thresholds",
24555
+ "node-models",
24556
+ "redispatch"
24557
+ ]),
24558
+ ok: boolean(),
24559
+ detail: string()
24560
+ });
24561
+ var AutoTuneApplyResultSchema = discriminatedUnion("kind", [
24562
+ object({
24563
+ kind: literal("applied"),
24564
+ planHash: string(),
24565
+ phases: array(AutoTunePhaseResultSchema).readonly()
24566
+ }),
24567
+ object({
24568
+ kind: literal("aborted"),
24569
+ phases: array(AutoTunePhaseResultSchema).readonly()
24570
+ }),
24571
+ object({
24572
+ kind: literal("stale"),
24573
+ plan: AutoTunePlanSchema
24574
+ }),
24575
+ object({
24576
+ kind: literal("refused"),
24577
+ reason: _enum(["apply-in-progress"])
24578
+ })
24579
+ ]);
24580
+ /**
24581
+ * Wire shapes of the Load balancing surface (D748): the session placement
24582
+ * policy, the atomic share write, the observed placement statistics, the
24583
+ * hardware share suggestion and the stale device pins.
24584
+ */
24585
+ /**
24586
+ * How a new detection session picks its node and device.
24587
+ * - `least-loaded` — the historical rule: lowest `attached / weight`, a
24588
+ * constant node order at a tie (D37). An idle node always ties at 0, so a
24589
+ * weight only bites once a node already holds a session.
24590
+ * - `share` — the share of PARALLEL sessions is held to the weights, and a
24591
+ * full or drowning node yields to a free one (D748).
24592
+ */
24593
+ var SessionPlacementPolicySchema = _enum(["least-loaded", "share"]);
24594
+ var LoadBalancingSharesInputSchema = object({
24595
+ /** nodeId → share (> 0). A node left out keeps its weight. */
24596
+ nodes: record(string(), number().positive()).default({}),
24597
+ /** nodeId → deviceKey → share (> 0). A device left out keeps its weight. */
24598
+ devices: record(string(), record(string(), number().positive())).default({})
24599
+ });
24600
+ var PlacementStatsInputSchema = object({
24601
+ /** Window the observed shares are averaged over (default 1 h, max 24 h). */
24602
+ windowMs: number().int().min(6e4).max(1440 * 60 * 1e3).default(3600 * 1e3) });
24603
+ var PlacementDeviceStatsSchema = object({
24604
+ deviceKey: string(),
24605
+ /** Sessions running on this device now. */
24606
+ sessionsNow: number(),
24607
+ /** Sessions started on this device inside the window. */
24608
+ sessionsStarted: number(),
24609
+ /** Time-weighted share of the node's parallel sessions over the window (0–1); null = no session ran. */
24610
+ observedShare: number().nullable()
24611
+ });
24612
+ var PlacementNodeStatsSchema = object({
24613
+ nodeId: string(),
24614
+ sessionsNow: number(),
24615
+ sessionsStarted: number(),
24616
+ /** Time-weighted share of the cluster's parallel sessions over the window (0–1); null = none ran. */
24617
+ observedShare: number().nullable(),
24618
+ /** Most sessions this node ran at once inside the window. */
24619
+ peakSessions: number(),
24620
+ /** Sessions a share election handed elsewhere because this node was full or drowning. */
24621
+ yieldsAway: number(),
24622
+ devices: array(PlacementDeviceStatsSchema).readonly()
24623
+ });
24624
+ /** A camera's device pin that the session path cannot honour. */
24625
+ var StaleDevicePinSchema = object({
24626
+ deviceId: number(),
24627
+ deviceKey: string(),
24628
+ /** `disabled` — the key exists on some node but is not enabled anywhere; `absent` — no node has it. */
24629
+ reason: _enum(["disabled", "absent"])
24630
+ });
24631
+ var PlacementStatsSchema = object({
24632
+ policy: SessionPlacementPolicySchema,
24633
+ windowMs: number(),
24634
+ /** How much of the window was actually observed (the hub keeps it in memory). */
24635
+ observedForMs: number(),
24636
+ sessionsNow: number(),
24637
+ /** Most parallel sessions across the cluster inside the window. */
24638
+ clusterPeakSessions: number(),
24639
+ nodes: array(PlacementNodeStatsSchema).readonly(),
24640
+ stalePins: array(StaleDevicePinSchema).readonly()
24641
+ });
24642
+ /**
24643
+ * Where an automatic share's capacity comes from (D755).
24644
+ * - `hardware` — the static capacity of each device at its Auto tune model:
24645
+ * the measured latency table for the node's hardware class.
24646
+ * - `benchmark` — the node's own measured capacity (node benchmark results).
24647
+ * A node with no results falls back to `hardware`, and says so.
24648
+ */
24649
+ var CapacitySourceSchema = _enum(["hardware", "benchmark"]);
24650
+ /** Why a node under the `benchmark` source was sized from hardware instead. */
24651
+ var CapacityFallbackSchema = _enum(["no-benchmark-results", "partial-benchmark-results"]);
24652
+ var SuggestSharesInputSchema = object({
24653
+ headroom: number().min(.3).max(.5).default(.4),
24654
+ /** Default `hardware`. */
24655
+ source: CapacitySourceSchema.default("hardware")
24656
+ });
24657
+ var SuggestedDeviceShareSchema = object({
24658
+ deviceKey: string(),
24659
+ /** Share of the node (0–100, rounded). */
24660
+ share: number(),
24661
+ modelId: string().nullable(),
24662
+ /** Inferences per second at that model, from the measured table; null when sized by a benchmark. */
24663
+ fps: number().nullable(),
24664
+ /** False for a table cell derived from another chip; true for a measured cell or a benchmark. */
24665
+ measured: boolean(),
24666
+ /**
24667
+ * Advisory session cap: ⌊fps × (1 − headroom) / camera fps⌋ from the table,
24668
+ * or the benchmark's measured max sessions. Never enforced.
24669
+ */
24670
+ suggestedMaxSessions: number().nullable()
24671
+ });
24672
+ var SuggestedNodeShareSchema = object({
24673
+ nodeId: string(),
24674
+ /** Share of the cluster (0–100, rounded); null = node skipped (offline, unknown hardware). */
24675
+ share: number().nullable(),
24676
+ /** Parallel sessions the node sustains at the suggested models with the headroom kept free. */
24677
+ capacitySessions: number(),
24678
+ devices: array(SuggestedDeviceShareSchema).readonly(),
24679
+ skippedReason: string().nullable(),
24680
+ /** What this node's capacity was read from; null when the node is skipped. */
24681
+ capacitySource: CapacitySourceSchema.nullable(),
24682
+ /** Set when the `benchmark` source was asked for and this node used `hardware`. */
24683
+ capacityFallback: CapacityFallbackSchema.nullable()
24684
+ });
24685
+ var SuggestSharesResultSchema = object({
24686
+ headroom: number(),
24687
+ /** The source asked for; each node says what it actually used. */
24688
+ source: CapacitySourceSchema,
24689
+ /** Camera detection rate the capacity is counted in (the fastest camera's fps). */
24690
+ cameraFps: number(),
24691
+ /** The Auto tune capacity floor the models were picked at. */
24692
+ minSessionsPerDevice: number(),
24693
+ nodes: array(SuggestedNodeShareSchema).readonly()
24694
+ });
24695
+ /**
24696
+ * Where the node and device shares come from (D750, D755).
24697
+ * - `hardware` (default) — computed by the system from each node's static
24698
+ * capacity (its accelerators at their Auto tune models, from the measured
24699
+ * latency table), recomputed whenever a node or device joins, leaves, is
24700
+ * switched on or off, or changes model. No load input.
24701
+ * - `benchmark` — the same, from each node's measured capacity (node
24702
+ * benchmark results); a node without results falls back to `hardware`.
24703
+ * - `manual` — the operator's stored sliders.
24704
+ * Either way a node or device that cannot take sessions gives its share to
24705
+ * the others in proportion; the stored values are never rewritten for that.
24706
+ */
24707
+ var ShareSourceSchema = _enum([
24708
+ "hardware",
24709
+ "benchmark",
24710
+ "manual"
24711
+ ]);
24712
+ var SetShareSourceInputSchema = object({ source: ShareSourceSchema });
24713
+ object({
24714
+ nodes: record(string(), number()),
24715
+ devices: record(string(), record(string(), number()))
24716
+ });
24717
+ var EffectiveDeviceShareSchema = object({
24718
+ deviceKey: string(),
24719
+ /** Can take sessions now (enabled, available, can run the root). */
24720
+ eligible: boolean(),
24721
+ /** The share the source assigns, as a percentage of the node's devices. */
24722
+ configuredPct: number(),
24723
+ /** The share actually used, after an ineligible device's share went to the others. */
24724
+ effectivePct: number()
24725
+ });
24726
+ var EffectiveNodeShareSchema = object({
24727
+ nodeId: string(),
24728
+ eligible: boolean(),
24729
+ configuredPct: number(),
24730
+ effectivePct: number(),
24731
+ /** Automatic sources: what this node's share was computed from; null under `manual` or before the first answer. */
24732
+ capacitySource: CapacitySourceSchema.nullable(),
24733
+ /** Automatic `benchmark`: why this node used `hardware` instead. */
24734
+ capacityFallback: CapacityFallbackSchema.nullable(),
24735
+ devices: array(EffectiveDeviceShareSchema).readonly()
24736
+ });
24737
+ var EffectiveSharesSchema = object({
24738
+ source: ShareSourceSchema,
24739
+ policy: SessionPlacementPolicySchema,
24740
+ /** An automatic source with no computed answer yet: the stored sliders are used meanwhile. */
24741
+ autoPending: boolean(),
24742
+ /** When the automatic shares were last computed (ms epoch); null = never. */
24743
+ computedAt: number().nullable(),
24744
+ /** What made the system recompute them last. */
24745
+ trigger: string().nullable(),
24746
+ nodes: array(EffectiveNodeShareSchema).readonly(),
24747
+ /** The relative weights the election reads (before eligibility). */
24748
+ nodeWeights: record(string(), number()),
24749
+ deviceWeights: record(string(), record(string(), number()))
24750
+ });
24416
24751
  object({
24417
24752
  activeCameras: number(),
24418
24753
  throttledCameras: number(),
@@ -25330,14 +25665,15 @@ var RunnerLocalLoadSchema = object({
25330
25665
  * Per-inference-device live load (multi-device C4). One entry per deviceKey
25331
25666
  * this runner currently has attached cameras on, so the orchestrator's second
25332
25667
  * `balance()` pass (over a node's devices) weights on real per-pool session
25333
- * counts. Empty on single-device / pre-multi-device runners. `queueDepthTotal`
25334
- * per device is 0 until the pool backlog gets a public accessor (follow-up).
25668
+ * counts. Empty on single-device / pre-multi-device runners. There is no
25669
+ * per-device queue depth: the inference pool's backlog has no accessor, and
25670
+ * a field that always read 0 was removed rather than shown as a measurement
25671
+ * (D762).
25335
25672
  */
25336
25673
  devices: array(object({
25337
25674
  deviceKey: string(),
25338
25675
  backend: string(),
25339
- attachedCameras: number(),
25340
- queueDepthTotal: number()
25676
+ attachedCameras: number()
25341
25677
  })).default([]),
25342
25678
  /** Hardware capability flags reported by this node. */
25343
25679
  hardware: object({
@@ -25551,14 +25887,6 @@ var CameraPipelineConfigSchema = object({
25551
25887
  settings: record(string(), unknown()).readonly().optional()
25552
25888
  }).nullable().optional()
25553
25889
  });
25554
- var PipelineTemplateSchema = object({
25555
- id: string(),
25556
- name: string(),
25557
- description: string().optional(),
25558
- config: CameraPipelineConfigSchema,
25559
- createdAt: string(),
25560
- updatedAt: string()
25561
- });
25562
25890
  var DeviceStepConfigSchema = object({
25563
25891
  modelId: string().optional(),
25564
25892
  settings: record(string(), unknown()).optional(),
@@ -25632,9 +25960,10 @@ var CameraStepOverridePatchSchema = object({
25632
25960
  modelId: string().optional(),
25633
25961
  settings: record(string(), unknown()).readonly().optional()
25634
25962
  });
25963
+ var CameraStepSettingsSchema = record(string(), record(string(), unknown()).readonly());
25635
25964
  var CameraPipelineSettingsSchema = object({
25636
- pinnedAgentNodeId: string().optional(),
25637
25965
  stepToggles: record(string(), boolean()).optional(),
25966
+ stepSettings: CameraStepSettingsSchema.optional(),
25638
25967
  stepOverridesByDevice: record(string(), record(string(), record(string(), CameraStepOverridePatchSchema))).optional(),
25639
25968
  pipelineByAgent: record(string(), CameraPipelineForAgentSchema).optional()
25640
25969
  });
@@ -25667,7 +25996,10 @@ var PipelineAssignmentSchema = object({
25667
25996
  });
25668
25997
  /**
25669
25998
  * Per-agent load summary surfaced to the load balancer + dashboards.
25670
- * Aggregated from each runner's `getLocalLoad` cap call.
25999
+ * Aggregated from each runner's `getLocalLoad` cap call. In the
26000
+ * `getAgentLoad` report, a single-device node's default-pool sessions (no
26001
+ * `deviceKey`) are credited to its one eligible device in `load.devices` —
26002
+ * the default pool IS that device (D745); the balancer's census stays raw.
25671
26003
  */
25672
26004
  var AgentLoadSummarySchema = object({
25673
26005
  nodeId: string(),
@@ -25756,26 +26088,27 @@ var CameraBrokerStatusSchema = object({
25756
26088
  width: number(),
25757
26089
  height: number(),
25758
26090
  subscribers: number(),
25759
- inFps: number(),
25760
- outFps: number()
26091
+ /**
26092
+ * Encoded packets/s the broker receives from the camera. null when the
26093
+ * broker's stats read failed — unknown, never 0 (a 0 here reads as a stall).
26094
+ * There is no output rate: decoding runs in the session decode workers, not
26095
+ * in the broker, so the broker's own decoded-frame rate is 0 on every live
26096
+ * camera and is not served (D758).
26097
+ */
26098
+ inFps: number().nullable()
25761
26099
  })).readonly(),
25762
26100
  webrtcSessions: number(),
25763
26101
  rtspRestream: boolean()
25764
26102
  });
25765
- /** Shared-memory ring statistics within the decoder block. */
25766
- var CameraDecoderShmSchema = object({
25767
- framesWritten: number(),
25768
- getFrameHits: number(),
25769
- getFrameMisses: number(),
25770
- budgetMb: number()
25771
- });
25772
- /** Decoder block — null when the decoder stage is unreachable or inactive. */
25773
- var CameraDecoderStatusSchema = object({
25774
- nodeId: string(),
25775
- formats: array(string()).readonly(),
25776
- sessionCount: number(),
25777
- shm: CameraDecoderShmSchema
25778
- });
26103
+ /**
26104
+ * Decoder block — WHERE decode runs (co-located with the detection node by
26105
+ * construction); null when the camera has no detection node. It carries no
26106
+ * frame counter: the shared-memory plane whose counters it used to serve is
26107
+ * gone, and those fields read 0 forever. Whether frames actually flow is read
26108
+ * from `detection.actualFps` (frames delivered to and processed by the
26109
+ * detector), never from a counter nothing feeds.
26110
+ */
26111
+ var CameraDecoderStatusSchema = object({ nodeId: string() });
25779
26112
  /** Motion block — null when motion detection is not active for this device. */
25780
26113
  var CameraMotionStatusSchema = object({
25781
26114
  enabled: boolean(),
@@ -26132,12 +26465,6 @@ method(object({
26132
26465
  }), object({ success: literal(true) }), {
26133
26466
  kind: "mutation",
26134
26467
  auth: "admin"
26135
- }), method(object({
26136
- agentNodeId: string(),
26137
- detectWeight: number().positive().nullable()
26138
- }), object({ success: literal(true) }), {
26139
- kind: "mutation",
26140
- auth: "admin"
26141
26468
  }), method(object({
26142
26469
  agentNodeId: string(),
26143
26470
  detect: boolean().nullable().optional(),
@@ -26179,6 +26506,15 @@ method(object({
26179
26506
  }), {
26180
26507
  kind: "mutation",
26181
26508
  auth: "admin"
26509
+ }), method(AutoTuneOptionsSchema, AutoTunePlanSchema, { auth: "admin" }), method(AutoTuneApplyInputSchema, AutoTuneApplyResultSchema, {
26510
+ kind: "mutation",
26511
+ auth: "admin"
26512
+ }), method(LoadBalancingSharesInputSchema, object({ success: literal(true) }), {
26513
+ kind: "mutation",
26514
+ auth: "admin"
26515
+ }), method(PlacementStatsInputSchema, PlacementStatsSchema, { auth: "admin" }), method(SuggestSharesInputSchema, SuggestSharesResultSchema, { auth: "admin" }), method(_void(), EffectiveSharesSchema, { auth: "admin" }), method(SetShareSourceInputSchema, object({ success: literal(true) }), {
26516
+ kind: "mutation",
26517
+ auth: "admin"
26182
26518
  }), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
26183
26519
  deviceId: number(),
26184
26520
  addonId: string(),
@@ -26195,6 +26531,13 @@ method(object({
26195
26531
  }), object({ success: literal(true) }), {
26196
26532
  kind: "mutation",
26197
26533
  auth: "admin"
26534
+ }), method(object({
26535
+ deviceId: number(),
26536
+ addonId: string(),
26537
+ settings: record(string(), unknown()).nullable()
26538
+ }), object({ success: literal(true) }), {
26539
+ kind: "mutation",
26540
+ auth: "admin"
26198
26541
  }), method(object({
26199
26542
  deviceId: number(),
26200
26543
  agentNodeId: string(),
@@ -26218,25 +26561,7 @@ method(object({
26218
26561
  }), method(_void(), DiskReconcileJobSchema, {
26219
26562
  kind: "mutation",
26220
26563
  auth: "admin"
26221
- }), method(_void(), DiskReconcileJobSchema, { auth: "admin" }), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
26222
- name: string(),
26223
- description: string().optional(),
26224
- config: CameraPipelineConfigSchema
26225
- }), PipelineTemplateSchema, {
26226
- kind: "mutation",
26227
- auth: "admin"
26228
- }), method(object({
26229
- id: string(),
26230
- name: string().optional(),
26231
- description: string().optional(),
26232
- config: CameraPipelineConfigSchema.optional()
26233
- }), PipelineTemplateSchema, {
26234
- kind: "mutation",
26235
- auth: "admin"
26236
- }), method(object({ id: string() }), object({ success: literal(true) }), {
26237
- kind: "mutation",
26238
- auth: "admin"
26239
- });
26564
+ }), method(_void(), DiskReconcileJobSchema, { auth: "admin" });
26240
26565
  /**
26241
26566
  * Cap → event-kind mapping for the SENSOR / CONTROL cap families — the table
26242
26567
  * `pipeline-analytics.listEventKinds` uses to turn a linked device's bound
@@ -26826,7 +27151,19 @@ var SsoBridgeClaimsSchema = object({
26826
27151
  * editing a descriptor must not retroactively extend or shorten a link the
26827
27152
  * operator already consented to.
26828
27153
  */
26829
- refreshTtl: union([number().int().positive(), literal("never")]).optional()
27154
+ refreshTtl: union([number().int().positive(), literal("never")]).optional(),
27155
+ /**
27156
+ * Opaque handle of a hub-side LINK intent (D782). Set by an OIDC callback
27157
+ * that was started from a signed-in user's "Link" button: the finish then
27158
+ * links this identity to the intent's user instead of signing anyone in.
27159
+ * The handle carries no user id — the hub resolves it, single-use.
27160
+ */
27161
+ linkIntent: string().optional(),
27162
+ /**
27163
+ * Verified `iss` of the id_token behind an OIDC login bridge (D782). A
27164
+ * subject is unique only per issuer, so a link is bound to it.
27165
+ */
27166
+ issuer: string().optional()
26830
27167
  });
26831
27168
  method(object({
26832
27169
  claims: SsoBridgeClaimsSchema,
@@ -28485,8 +28822,6 @@ var WebrtcStreamChoiceSchema = object({
28485
28822
  ]).nullable(),
28486
28823
  /** Input FPS from the camera (null for adaptive). */
28487
28824
  inputFps: number().nullable(),
28488
- /** Decoded FPS (null for adaptive). */
28489
- decodeFps: number().nullable(),
28490
28825
  /** Bitrate in kbps (null for adaptive). */
28491
28826
  bitrateKbps: number().nullable()
28492
28827
  });
@@ -28763,7 +29098,22 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
28763
29098
  * field their hints were silently stripped by the schema and the
28764
29099
  * adaptive ladder started blind on the client's display size.
28765
29100
  */
28766
- hints: webrtcClientHintsSchema.optional()
29101
+ hints: webrtcClientHintsSchema.optional(),
29102
+ /**
29103
+ * Talk-back (D771): relay the PEER's audio to the device's speaker
29104
+ * through the `intercom` cap's push-talk triple. When `true` and the
29105
+ * offer lets the peer send audio, the answer's audio is `sendrecv`
29106
+ * and every inbound frame goes to `intercom.pushTalkAudio` for this
29107
+ * `deviceId`; absent/false answers `sendonly`, as for every viewer.
29108
+ *
29109
+ * TRUSTED-CALLER ONLY. Set by the Alexa export for an Echo on a camera
29110
+ * with `intercom`, when the linked user may control that camera. The
29111
+ * hub STRIPS it from every request-bound call (a browser), exactly as
29112
+ * it overwrites `relayOnly` — a viewer's talk permission is the
29113
+ * intercom cap's own surface (share tokens gate it there), and this
29114
+ * flag must not become a second door to the camera's speaker.
29115
+ */
29116
+ talkback: boolean().optional()
28767
29117
  }), object({
28768
29118
  sessionId: string(),
28769
29119
  sdpAnswer: string()
@@ -29137,6 +29487,59 @@ var AddonAutoUpdateSchema = ChannelWithInheritSchema;
29137
29487
  var RestartAddonResultSchema = unknown();
29138
29488
  var InstallPackageResultSchema = unknown();
29139
29489
  var ReloadPackagesResultSchema = unknown();
29490
+ /**
29491
+ * What an uninstall did on ONE node.
29492
+ * - `uninstalled` — removed: runner(s) stopped, caps gone, code deleted.
29493
+ * - `not-installed` — the node did not have it (nothing to do).
29494
+ * - `refused` — protected / bootstrap package; nothing touched.
29495
+ * - `failed` — attempted and did not complete; `error` says why.
29496
+ * - `pending-reconnect` — the node is OFFLINE: its record was pruned so the
29497
+ * back-fill never returns the package, and the stale-addon sweep removes the
29498
+ * copy when the node registers again (only once the hub no longer has it).
29499
+ */
29500
+ var UninstallNodeOutcomeSchema = _enum([
29501
+ "uninstalled",
29502
+ "not-installed",
29503
+ "refused",
29504
+ "failed",
29505
+ "pending-reconnect"
29506
+ ]);
29507
+ var UninstallNodeResultSchema = object({
29508
+ nodeId: string(),
29509
+ outcome: UninstallNodeOutcomeSchema,
29510
+ error: string().optional(),
29511
+ addonIds: array(string()).readonly(),
29512
+ runnersStopped: array(string()).readonly(),
29513
+ warnings: array(string()).readonly()
29514
+ });
29515
+ var UninstallPackageResultSchema = object({
29516
+ /** Every targeted node ended `uninstalled`, `not-installed` or `pending-reconnect`. */
29517
+ success: boolean(),
29518
+ packageName: string(),
29519
+ results: array(UninstallNodeResultSchema).readonly()
29520
+ });
29521
+ /**
29522
+ * `unreachable` lists online agents whose status read FAILED — absence from
29523
+ * `installations` is only "not installed" for a node that answered (D315).
29524
+ */
29525
+ var PackageInstallationsSchema = object({
29526
+ installations: array(object({
29527
+ packageName: string(),
29528
+ nodeId: string(),
29529
+ nodeName: string(),
29530
+ isHub: boolean(),
29531
+ isOnline: boolean(),
29532
+ version: string().nullable(),
29533
+ addonIds: array(string()).readonly(),
29534
+ source: _enum(["live", "recorded"]),
29535
+ /** The hub installs this package too. `false` on an agent row = an orphan. */
29536
+ onHub: boolean()
29537
+ })).readonly(),
29538
+ unreachable: array(object({
29539
+ nodeId: string(),
29540
+ error: string()
29541
+ })).readonly()
29542
+ });
29140
29543
  var BulkUpdateItemStatusSchema = _enum([
29141
29544
  "queued",
29142
29545
  "updating",
@@ -29219,10 +29622,14 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
29219
29622
  }), method(object({ packageName: string() }), InstallPackageResultSchema, {
29220
29623
  kind: "mutation",
29221
29624
  auth: "admin"
29222
- }), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({ packageName: string() }), unknown(), {
29625
+ }), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({
29626
+ packageName: string().min(1),
29627
+ nodeId: string().optional(),
29628
+ everywhere: boolean().optional()
29629
+ }), UninstallPackageResultSchema, {
29223
29630
  kind: "mutation",
29224
29631
  auth: "admin"
29225
- }), method(_void(), ReloadPackagesResultSchema, {
29632
+ }), method(object({ packageName: string().optional() }), PackageInstallationsSchema, { auth: "admin" }), method(_void(), ReloadPackagesResultSchema, {
29226
29633
  kind: "mutation",
29227
29634
  auth: "admin"
29228
29635
  }), method(object({ query: string().optional() }), array(SearchResultSchema)), method(object({ nodeId: string().optional() }), array(PackageUpdateSchema).readonly(), { auth: "admin" }), method(object({
@@ -39158,6 +39565,32 @@ var TotpStatusSchema = object({
39158
39565
  /** Null when no row exists OR the row is still pending confirmation. */
39159
39566
  confirmedAt: number().nullable()
39160
39567
  });
39568
+ /**
39569
+ * user-management — singleton capability for user accounts, API keys,
39570
+ * and scoped tokens.
39571
+ *
39572
+ * v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
39573
+ * — the subset check on `setUserScopes` / `createScopedToken` is moot
39574
+ * because non-admins never reach these. If/when we open non-admin
39575
+ * delegation, structural caller-scope subset check goes inside the
39576
+ * provider.
39577
+ */
39578
+ var ExternalIdentitySchema = object({
39579
+ /** Login-method id of the provider instance, e.g. `auth-oidc/authentik`. */
39580
+ provider: string(),
39581
+ /** The IdP's stable subject (`sub`) for this account. */
39582
+ subject: string(),
39583
+ /** The verified `iss` of the IdP the identity was linked under — `sub` is unique only per issuer. */
39584
+ issuer: string(),
39585
+ userId: string(),
39586
+ /** What the IdP called the account at link time (username / email) — display only. */
39587
+ label: string().optional(),
39588
+ linkedAt: number()
39589
+ });
39590
+ var ExternalIdentityKeySchema = object({
39591
+ provider: string().min(1),
39592
+ subject: string().min(1)
39593
+ });
39161
39594
  method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserInputSchema, UserSummarySchema, {
39162
39595
  kind: "mutation",
39163
39596
  auth: "admin",
@@ -39271,7 +39704,22 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
39271
39704
  userId: string(),
39272
39705
  username: string(),
39273
39706
  scopes: array(TokenScopeSchema)
39274
- }).nullable(), { access: "view" }), method(_void(), array(OauthSessionSummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: boolean() }), {
39707
+ }).nullable(), { access: "view" }), method(object({ userId: string() }), array(ExternalIdentitySchema), { auth: "admin" }), method(ExternalIdentityKeySchema, object({
39708
+ userId: string(),
39709
+ issuer: string()
39710
+ }).nullable(), { auth: "admin" }), method(ExternalIdentityKeySchema.extend({
39711
+ userId: string(),
39712
+ issuer: string().min(1),
39713
+ label: string().optional()
39714
+ }), object({ success: literal(true) }), {
39715
+ kind: "mutation",
39716
+ auth: "admin",
39717
+ access: "create"
39718
+ }), method(ExternalIdentityKeySchema.extend({ userId: string() }), object({ success: boolean() }), {
39719
+ kind: "mutation",
39720
+ auth: "admin",
39721
+ access: "delete"
39722
+ }), method(_void(), array(OauthSessionSummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: boolean() }), {
39275
39723
  kind: "mutation",
39276
39724
  auth: "admin",
39277
39725
  access: "delete"
@@ -39973,6 +40421,16 @@ var zoneRulesCapability = {
39973
40421
  durability: "restored"
39974
40422
  };
39975
40423
  SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
40424
+ Object.freeze({
40425
+ person: .5,
40426
+ vehicle: .5,
40427
+ animal: .5
40428
+ });
40429
+ Object.freeze({
40430
+ person: .65,
40431
+ vehicle: .65,
40432
+ animal: .65
40433
+ });
39976
40434
  /**
39977
40435
  * Accessory device helpers — shared across drivers.
39978
40436
  *
@@ -41671,6 +42129,12 @@ Object.freeze({
41671
42129
  addonId: null,
41672
42130
  access: "view"
41673
42131
  },
42132
+ "addons.listInstallations": {
42133
+ capName: "addons",
42134
+ capScope: "system",
42135
+ addonId: null,
42136
+ access: "view"
42137
+ },
41674
42138
  "addons.listJobs": {
41675
42139
  capName: "addons",
41676
42140
  capScope: "system",
@@ -42853,90 +43317,18 @@ Object.freeze({
42853
43317
  addonId: null,
42854
43318
  access: "create"
42855
43319
  },
42856
- "decoder.createSession": {
42857
- capName: "decoder",
42858
- capScope: "system",
42859
- addonId: null,
42860
- access: "view"
42861
- },
42862
- "decoder.destroySession": {
42863
- capName: "decoder",
42864
- capScope: "system",
42865
- addonId: null,
42866
- access: "delete"
42867
- },
42868
- "decoder.getFrame": {
42869
- capName: "decoder",
42870
- capScope: "system",
42871
- addonId: null,
42872
- access: "view"
42873
- },
42874
43320
  "decoder.getInfo": {
42875
43321
  capName: "decoder",
42876
43322
  capScope: "system",
42877
43323
  addonId: null,
42878
43324
  access: "view"
42879
43325
  },
42880
- "decoder.getShmStats": {
42881
- capName: "decoder",
42882
- capScope: "system",
42883
- addonId: null,
42884
- access: "view"
42885
- },
42886
- "decoder.getStats": {
42887
- capName: "decoder",
42888
- capScope: "system",
42889
- addonId: null,
42890
- access: "view"
42891
- },
42892
- "decoder.listActiveSessions": {
42893
- capName: "decoder",
42894
- capScope: "system",
42895
- addonId: null,
42896
- access: "view"
42897
- },
42898
- "decoder.openStream": {
42899
- capName: "decoder",
42900
- capScope: "system",
42901
- addonId: null,
42902
- access: "view"
42903
- },
42904
- "decoder.pullFrames": {
42905
- capName: "decoder",
42906
- capScope: "system",
42907
- addonId: null,
42908
- access: "view"
42909
- },
42910
- "decoder.pullHandles": {
42911
- capName: "decoder",
42912
- capScope: "system",
42913
- addonId: null,
42914
- access: "view"
42915
- },
42916
- "decoder.pushPacket": {
42917
- capName: "decoder",
42918
- capScope: "system",
42919
- addonId: null,
42920
- access: "view"
42921
- },
42922
43326
  "decoder.reprobeHwaccel": {
42923
43327
  capName: "decoder",
42924
43328
  capScope: "system",
42925
43329
  addonId: null,
42926
43330
  access: "create"
42927
43331
  },
42928
- "decoder.supportsCodec": {
42929
- capName: "decoder",
42930
- capScope: "system",
42931
- addonId: null,
42932
- access: "view"
42933
- },
42934
- "decoder.updateConfig": {
42935
- capName: "decoder",
42936
- capScope: "system",
42937
- addonId: null,
42938
- access: "view"
42939
- },
42940
43332
  "detectionPipeline.applyDeviceSettingsPatch": {
42941
43333
  capName: "detection-pipeline",
42942
43334
  capScope: "device",
@@ -45967,6 +46359,12 @@ Object.freeze({
45967
46359
  addonId: null,
45968
46360
  access: "create"
45969
46361
  },
46362
+ "pipelineAnalytics.setRetrainFrameComplete": {
46363
+ capName: "pipeline-analytics",
46364
+ capScope: "device",
46365
+ addonId: null,
46366
+ access: "create"
46367
+ },
45970
46368
  "pipelineAnalytics.setTrackFlags": {
45971
46369
  capName: "pipeline-analytics",
45972
46370
  capScope: "device",
@@ -46003,6 +46401,12 @@ Object.freeze({
46003
46401
  addonId: null,
46004
46402
  access: "delete"
46005
46403
  },
46404
+ "pipelineAnalytics.writeRetrainArchive": {
46405
+ capName: "pipeline-analytics",
46406
+ capScope: "device",
46407
+ addonId: null,
46408
+ access: "create"
46409
+ },
46006
46410
  "pipelineExecutor.cacheFrameInPool": {
46007
46411
  capName: "pipeline-executor",
46008
46412
  capScope: "system",
@@ -46015,13 +46419,13 @@ Object.freeze({
46015
46419
  addonId: null,
46016
46420
  access: "delete"
46017
46421
  },
46018
- "pipelineExecutor.deleteModel": {
46422
+ "pipelineExecutor.clearModelBoundDeviceOverrides": {
46019
46423
  capName: "pipeline-executor",
46020
46424
  capScope: "system",
46021
46425
  addonId: null,
46022
46426
  access: "delete"
46023
46427
  },
46024
- "pipelineExecutor.deleteTemplate": {
46428
+ "pipelineExecutor.deleteModel": {
46025
46429
  capName: "pipeline-executor",
46026
46430
  capScope: "system",
46027
46431
  addonId: null,
@@ -46165,12 +46569,6 @@ Object.freeze({
46165
46569
  addonId: null,
46166
46570
  access: "view"
46167
46571
  },
46168
- "pipelineExecutor.listTemplates": {
46169
- capName: "pipeline-executor",
46170
- capScope: "system",
46171
- addonId: null,
46172
- access: "view"
46173
- },
46174
46572
  "pipelineExecutor.rearmInferenceDevice": {
46175
46573
  capName: "pipeline-executor",
46176
46574
  capScope: "system",
@@ -46195,12 +46593,6 @@ Object.freeze({
46195
46593
  addonId: null,
46196
46594
  access: "create"
46197
46595
  },
46198
- "pipelineExecutor.saveTemplate": {
46199
- capName: "pipeline-executor",
46200
- capScope: "system",
46201
- addonId: null,
46202
- access: "create"
46203
- },
46204
46596
  "pipelineExecutor.setVideoPipelineSteps": {
46205
46597
  capName: "pipeline-executor",
46206
46598
  capScope: "system",
@@ -46219,41 +46611,35 @@ Object.freeze({
46219
46611
  addonId: null,
46220
46612
  access: "create"
46221
46613
  },
46222
- "pipelineExecutor.updateTemplate": {
46223
- capName: "pipeline-executor",
46224
- capScope: "system",
46225
- addonId: null,
46226
- access: "create"
46227
- },
46228
46614
  "pipelineExecutor.validatePipeline": {
46229
46615
  capName: "pipeline-executor",
46230
46616
  capScope: "system",
46231
46617
  addonId: null,
46232
46618
  access: "view"
46233
46619
  },
46234
- "pipelineOrchestrator.applyDeviceSettingsPatch": {
46620
+ "pipelineOrchestrator.applyAutoTune": {
46235
46621
  capName: "pipeline-orchestrator",
46236
46622
  capScope: "system",
46237
46623
  addonId: null,
46238
46624
  access: "create"
46239
46625
  },
46240
- "pipelineOrchestrator.assignAudio": {
46626
+ "pipelineOrchestrator.applyDeviceSettingsPatch": {
46241
46627
  capName: "pipeline-orchestrator",
46242
46628
  capScope: "system",
46243
46629
  addonId: null,
46244
46630
  access: "create"
46245
46631
  },
46246
- "pipelineOrchestrator.assignPipeline": {
46632
+ "pipelineOrchestrator.assignAudio": {
46247
46633
  capName: "pipeline-orchestrator",
46248
46634
  capScope: "system",
46249
46635
  addonId: null,
46250
46636
  access: "create"
46251
46637
  },
46252
- "pipelineOrchestrator.deleteTemplate": {
46638
+ "pipelineOrchestrator.assignPipeline": {
46253
46639
  capName: "pipeline-orchestrator",
46254
46640
  capScope: "system",
46255
46641
  addonId: null,
46256
- access: "delete"
46642
+ access: "create"
46257
46643
  },
46258
46644
  "pipelineOrchestrator.getAgentLoad": {
46259
46645
  capName: "pipeline-orchestrator",
@@ -46345,6 +46731,12 @@ Object.freeze({
46345
46731
  addonId: null,
46346
46732
  access: "view"
46347
46733
  },
46734
+ "pipelineOrchestrator.getEffectiveShares": {
46735
+ capName: "pipeline-orchestrator",
46736
+ capScope: "system",
46737
+ addonId: null,
46738
+ access: "view"
46739
+ },
46348
46740
  "pipelineOrchestrator.getGlobalMetrics": {
46349
46741
  capName: "pipeline-orchestrator",
46350
46742
  capScope: "system",
@@ -46381,19 +46773,19 @@ Object.freeze({
46381
46773
  addonId: null,
46382
46774
  access: "view"
46383
46775
  },
46384
- "pipelineOrchestrator.getReconcileFromDiskStatus": {
46776
+ "pipelineOrchestrator.getPlacementStats": {
46385
46777
  capName: "pipeline-orchestrator",
46386
46778
  capScope: "system",
46387
46779
  addonId: null,
46388
46780
  access: "view"
46389
46781
  },
46390
- "pipelineOrchestrator.listAgentSettings": {
46782
+ "pipelineOrchestrator.getReconcileFromDiskStatus": {
46391
46783
  capName: "pipeline-orchestrator",
46392
46784
  capScope: "system",
46393
46785
  addonId: null,
46394
46786
  access: "view"
46395
46787
  },
46396
- "pipelineOrchestrator.listTemplates": {
46788
+ "pipelineOrchestrator.listAgentSettings": {
46397
46789
  capName: "pipeline-orchestrator",
46398
46790
  capScope: "system",
46399
46791
  addonId: null,
@@ -46405,6 +46797,12 @@ Object.freeze({
46405
46797
  addonId: null,
46406
46798
  access: "create"
46407
46799
  },
46800
+ "pipelineOrchestrator.planAutoTune": {
46801
+ capName: "pipeline-orchestrator",
46802
+ capScope: "system",
46803
+ addonId: null,
46804
+ access: "view"
46805
+ },
46408
46806
  "pipelineOrchestrator.rebalance": {
46409
46807
  capName: "pipeline-orchestrator",
46410
46808
  capScope: "system",
@@ -46447,12 +46845,6 @@ Object.freeze({
46447
46845
  addonId: null,
46448
46846
  access: "create"
46449
46847
  },
46450
- "pipelineOrchestrator.saveTemplate": {
46451
- capName: "pipeline-orchestrator",
46452
- capScope: "system",
46453
- addonId: null,
46454
- access: "create"
46455
- },
46456
46848
  "pipelineOrchestrator.setAgentCapabilities": {
46457
46849
  capName: "pipeline-orchestrator",
46458
46850
  capScope: "system",
@@ -46465,12 +46857,6 @@ Object.freeze({
46465
46857
  addonId: null,
46466
46858
  access: "create"
46467
46859
  },
46468
- "pipelineOrchestrator.setAgentDetectWeight": {
46469
- capName: "pipeline-orchestrator",
46470
- capScope: "system",
46471
- addonId: null,
46472
- access: "create"
46473
- },
46474
46860
  "pipelineOrchestrator.setAgentInferenceDevices": {
46475
46861
  capName: "pipeline-orchestrator",
46476
46862
  capScope: "system",
@@ -46507,6 +46893,12 @@ Object.freeze({
46507
46893
  addonId: null,
46508
46894
  access: "create"
46509
46895
  },
46896
+ "pipelineOrchestrator.setCameraStepSettings": {
46897
+ capName: "pipeline-orchestrator",
46898
+ capScope: "system",
46899
+ addonId: null,
46900
+ access: "create"
46901
+ },
46510
46902
  "pipelineOrchestrator.setCameraStepToggle": {
46511
46903
  capName: "pipeline-orchestrator",
46512
46904
  capScope: "system",
@@ -46525,25 +46917,37 @@ Object.freeze({
46525
46917
  addonId: null,
46526
46918
  access: "create"
46527
46919
  },
46920
+ "pipelineOrchestrator.setLoadBalancingShares": {
46921
+ capName: "pipeline-orchestrator",
46922
+ capScope: "system",
46923
+ addonId: null,
46924
+ access: "create"
46925
+ },
46528
46926
  "pipelineOrchestrator.setPipelineDevicePin": {
46529
46927
  capName: "pipeline-orchestrator",
46530
46928
  capScope: "system",
46531
46929
  addonId: null,
46532
46930
  access: "create"
46533
46931
  },
46534
- "pipelineOrchestrator.unassignAudio": {
46932
+ "pipelineOrchestrator.setShareSource": {
46535
46933
  capName: "pipeline-orchestrator",
46536
46934
  capScope: "system",
46537
46935
  addonId: null,
46538
46936
  access: "create"
46539
46937
  },
46540
- "pipelineOrchestrator.unassignPipeline": {
46938
+ "pipelineOrchestrator.suggestShares": {
46939
+ capName: "pipeline-orchestrator",
46940
+ capScope: "system",
46941
+ addonId: null,
46942
+ access: "view"
46943
+ },
46944
+ "pipelineOrchestrator.unassignAudio": {
46541
46945
  capName: "pipeline-orchestrator",
46542
46946
  capScope: "system",
46543
46947
  addonId: null,
46544
46948
  access: "create"
46545
46949
  },
46546
- "pipelineOrchestrator.updateTemplate": {
46950
+ "pipelineOrchestrator.unassignPipeline": {
46547
46951
  capName: "pipeline-orchestrator",
46548
46952
  capScope: "system",
46549
46953
  addonId: null,
@@ -47983,12 +48387,6 @@ Object.freeze({
47983
48387
  addonId: null,
47984
48388
  access: "view"
47985
48389
  },
47986
- "streamBroker.pullFrameHandles": {
47987
- capName: "stream-broker",
47988
- capScope: "system",
47989
- addonId: null,
47990
- access: "view"
47991
- },
47992
48390
  "streamBroker.regenerateRtspToken": {
47993
48391
  capName: "stream-broker",
47994
48392
  capScope: "system",
@@ -48055,12 +48453,6 @@ Object.freeze({
48055
48453
  addonId: null,
48056
48454
  access: "create"
48057
48455
  },
48058
- "streamBroker.subscribeFrames": {
48059
- capName: "stream-broker",
48060
- capScope: "system",
48061
- addonId: null,
48062
- access: "create"
48063
- },
48064
48456
  "streamBroker.unassignProfile": {
48065
48457
  capName: "stream-broker",
48066
48458
  capScope: "system",
@@ -48073,12 +48465,6 @@ Object.freeze({
48073
48465
  addonId: null,
48074
48466
  access: "create"
48075
48467
  },
48076
- "streamBroker.unsubscribeFrames": {
48077
- capName: "stream-broker",
48078
- capScope: "system",
48079
- addonId: null,
48080
- access: "create"
48081
- },
48082
48468
  "streamCatalog.getCatalog": {
48083
48469
  capName: "stream-catalog",
48084
48470
  capScope: "device",
@@ -48373,18 +48759,36 @@ Object.freeze({
48373
48759
  addonId: null,
48374
48760
  access: "delete"
48375
48761
  },
48762
+ "userManagement.findUserByExternalIdentity": {
48763
+ capName: "user-management",
48764
+ capScope: "system",
48765
+ addonId: null,
48766
+ access: "view"
48767
+ },
48376
48768
  "userManagement.getTotpStatus": {
48377
48769
  capName: "user-management",
48378
48770
  capScope: "system",
48379
48771
  addonId: null,
48380
48772
  access: "view"
48381
48773
  },
48774
+ "userManagement.linkExternalIdentity": {
48775
+ capName: "user-management",
48776
+ capScope: "system",
48777
+ addonId: null,
48778
+ access: "create"
48779
+ },
48382
48780
  "userManagement.listApiKeys": {
48383
48781
  capName: "user-management",
48384
48782
  capScope: "system",
48385
48783
  addonId: null,
48386
48784
  access: "view"
48387
48785
  },
48786
+ "userManagement.listExternalIdentities": {
48787
+ capName: "user-management",
48788
+ capScope: "system",
48789
+ addonId: null,
48790
+ access: "view"
48791
+ },
48388
48792
  "userManagement.listOauthSessions": {
48389
48793
  capName: "user-management",
48390
48794
  capScope: "system",
@@ -48463,6 +48867,12 @@ Object.freeze({
48463
48867
  addonId: null,
48464
48868
  access: "create"
48465
48869
  },
48870
+ "userManagement.unlinkExternalIdentity": {
48871
+ capName: "user-management",
48872
+ capScope: "system",
48873
+ addonId: null,
48874
+ access: "delete"
48875
+ },
48466
48876
  "userManagement.updateUser": {
48467
48877
  capName: "user-management",
48468
48878
  capScope: "system",
@@ -50592,11 +51002,6 @@ Object.freeze({
50592
51002
  form: "single",
50593
51003
  optional: false
50594
51004
  }],
50595
- "decoder.createSession": [{
50596
- name: "deviceId",
50597
- form: "single",
50598
- optional: true
50599
- }],
50600
51005
  "detectionPipeline.applyDeviceSettingsPatch": [{
50601
51006
  name: "deviceId",
50602
51007
  form: "single",
@@ -51807,6 +52212,11 @@ Object.freeze({
51807
52212
  form: "single",
51808
52213
  optional: false
51809
52214
  }],
52215
+ "pipelineAnalytics.setRetrainFrameComplete": [{
52216
+ name: "deviceId",
52217
+ form: "single",
52218
+ optional: false
52219
+ }],
51810
52220
  "pipelineAnalytics.setTrackFlags": [{
51811
52221
  name: "deviceId",
51812
52222
  form: "single",
@@ -51827,6 +52237,11 @@ Object.freeze({
51827
52237
  form: "single",
51828
52238
  optional: false
51829
52239
  }],
52240
+ "pipelineExecutor.clearModelBoundDeviceOverrides": [{
52241
+ name: "deviceIds",
52242
+ form: "array",
52243
+ optional: true
52244
+ }],
51830
52245
  "pipelineExecutor.runPipeline": [{
51831
52246
  name: "deviceId",
51832
52247
  form: "single",
@@ -51932,6 +52347,11 @@ Object.freeze({
51932
52347
  form: "single",
51933
52348
  optional: false
51934
52349
  }],
52350
+ "pipelineOrchestrator.setCameraStepSettings": [{
52351
+ name: "deviceId",
52352
+ form: "single",
52353
+ optional: false
52354
+ }],
51935
52355
  "pipelineOrchestrator.setCameraStepToggle": [{
51936
52356
  name: "deviceId",
51937
52357
  form: "single",