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