@camstack/addon-export-hap 1.2.151 → 1.2.152

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.
@@ -38,7 +38,7 @@ var __copyProps = (to, from, except, desc) => {
38
38
  var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
39
39
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
40
40
  //#endregion
41
- //#region ../types/dist/event-category-BGmz_oxW.mjs
41
+ //#region ../types/dist/event-category-B_0XEcLF.mjs
42
42
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
43
43
  EventCategory["SystemBoot"] = "system.boot";
44
44
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -539,15 +539,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
539
539
  EventCategory["AgentWsDisconnected"] = "agent.ws.disconnected";
540
540
  EventCategory["AgentBackupActivated"] = "agent.backup.activated";
541
541
  EventCategory["OrchestrationSettingsUpdated"] = "orchestration.settings-updated";
542
- /**
543
- * Per-agent hwaccel preference changed (user override set, cleared, or
544
- * re-probed). Observability event — decoders pull the current pref at
545
- * `createSession`, so running sessions keep their current backend until
546
- * they rotate naturally (camera add/remove, stream restart). Future
547
- * work can wire a listener in stream-broker that force-rotates live
548
- * sessions; for now this event powers logs + admin-UI toast feedback.
549
- */
550
- EventCategory["PipelineAgentHwaccelChanged"] = "pipeline.agent-hwaccel-changed";
551
542
  EventCategory["MotionAnalysis"] = "detection.motion-analysis";
552
543
  /** All raw motion zones from CCL before minArea filter — for UI debug overlay. */
553
544
  EventCategory["MotionZonesRaw"] = "detection.motion-zones-raw";
@@ -5418,7 +5409,7 @@ var ZodIssueCode = {
5418
5409
  var ZodFirstPartyTypeKind;
5419
5410
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5420
5411
  //#endregion
5421
- //#region ../types/dist/sleep-C16NCZR2.mjs
5412
+ //#region ../types/dist/sleep-BNeXenvr.mjs
5422
5413
  /**
5423
5414
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5424
5415
  * window to float samples (D455).
@@ -6784,32 +6775,12 @@ object({
6784
6775
  audioCodec: string().optional(),
6785
6776
  metadata: record(string(), unknown()).readonly().optional()
6786
6777
  });
6787
- var EncodedPacketSchema = object({
6788
- type: _enum(["video", "audio"]),
6789
- data: _instanceof(Uint8Array),
6790
- pts: number(),
6791
- dts: number(),
6792
- keyframe: boolean(),
6793
- codec: string()
6794
- });
6795
- var DecodedFrameSchema = object({
6796
- data: _instanceof(Uint8Array),
6797
- width: number(),
6798
- height: number(),
6799
- format: _enum([
6800
- "jpeg",
6801
- "rgb",
6802
- "bgr",
6803
- "yuv420",
6804
- "gray"
6805
- ]),
6806
- timestamp: number()
6807
- });
6808
6778
  /**
6809
6779
  * Wire schema for `FrameHandle` — a zero-pixel, serialisable reference to a
6810
6780
  * frame in a shared-memory ring (Phase 5 / D9). Mirrors the `FrameHandle` TS
6811
- * interface in `interfaces/frame-handle.ts` field-for-field so a decoder cap
6812
- * method (`pullHandles`) can carry handles over tRPC / Moleculer.
6781
+ * interface in `interfaces/frame-handle.ts` field-for-field so a cap method
6782
+ * (the runner's native-crop and pipeline-executor inputs) can carry handles
6783
+ * over tRPC / Moleculer.
6813
6784
  *
6814
6785
  * The `satisfies` assertion below pins this schema to the interface: if a
6815
6786
  * field is added to / removed from `FrameHandle` without a matching schema
@@ -6835,50 +6806,6 @@ var FrameHandleSchema = object({
6835
6806
  slotCount: number().int().positive()
6836
6807
  });
6837
6808
  /**
6838
- * Pixel format a frame-handle subscriber can request from the broker
6839
- * (Phase 5 / D9). The packed, raster subset of `FrameFormat` — the formats a
6840
- * `frameSink: 'shm'` decoder session can write into a `FrameRing` slot.
6841
- * `jpeg` is excluded: a variable-length stream is not a fixed-stride ring
6842
- * payload, and no decoded-frame consumer requests it over the shm plane.
6843
- */
6844
- var FrameHandleFormatSchema = _enum([
6845
- "rgb",
6846
- "bgr",
6847
- "yuv420",
6848
- "gray"
6849
- ]);
6850
- /**
6851
- * Input for `stream-broker.subscribeFrames` (Phase 5 / D9). A consumer asks the
6852
- * broker for a `FrameHandle` stream of one `format`; the broker maintains one
6853
- * shared-memory ring per `(brokerId, format)` actually requested, so a `gray`
6854
- * subscriber (motion) and an `rgb` subscriber (detection) each read the format
6855
- * they asked for with no broker-side conversion.
6856
- */
6857
- var SubscribeFramesInputSchema = object({
6858
- brokerId: string(),
6859
- format: FrameHandleFormatSchema,
6860
- /**
6861
- * Optional reader-side cadence hint in frames per second. The broker does
6862
- * NOT throttle — latest-wins ring reads drop frames implicitly for a slow
6863
- * consumer. The value is echoed back in `SubscribeFramesResult.maxFps` so
6864
- * the consumer can pace its own `pullFrameHandles` polling.
6865
- */
6866
- maxFps: number().positive().optional(),
6867
- /** Short caller-identity tag (`motion`, `detection`, …) for diagnostics. */
6868
- tag: string().optional()
6869
- });
6870
- /**
6871
- * Result of `stream-broker.subscribeFrames`. The consumer then polls
6872
- * `pullFrameHandles({ subscriptionId, maxCount })` and feeds each returned
6873
- * `FrameHandle` to a `FrameRingReader`.
6874
- */
6875
- var SubscribeFramesResultSchema = object({
6876
- /** Opaque id the consumer passes to `pullFrameHandles` / `unsubscribeFrames`. */
6877
- subscriptionId: string(),
6878
- /** Reader-side cadence hint (frames/s) — echoes `SubscribeFramesInput.maxFps`. */
6879
- maxFps: number().nonnegative()
6880
- });
6881
- /**
6882
6809
  * Wire schema for a decoded audio chunk (Phase 5 / D9). Mirrors the
6883
6810
  * `DecodedAudioChunk` TS interface in `interfaces/stream-broker.ts`: PCM
6884
6811
  * sample bytes plus the track parameters a consumer needs to interpret them.
@@ -6886,8 +6813,8 @@ var SubscribeFramesResultSchema = object({
6886
6813
  * Audio chunks are tiny (a ~500ms AudioCodecSession window is a few KB of
6887
6814
  * Float32 PCM), so unlike video frames they ship their bytes INLINE over
6888
6815
  * tRPC / Moleculer — no shared-memory plane. `data` is typed `Uint8Array`
6889
- * (the wire-serialisable supertype of `Buffer`) to match `DecodedFrameSchema`
6890
- * / `EncodedPacketSchema`'s precedent; a `Buffer` is assignable to it.
6816
+ * (the wire-serialisable supertype of `Buffer`); a `Buffer` is assignable to
6817
+ * it.
6891
6818
  */
6892
6819
  var AudioChunkFormatSchema = _enum(AUDIO_CHUNK_FORMATS);
6893
6820
  var DecodedAudioChunkSchema = object({
@@ -6905,11 +6832,10 @@ var DecodedAudioChunkSchema = object({
6905
6832
  format: AudioChunkFormatSchema.optional()
6906
6833
  });
6907
6834
  /**
6908
- * Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9). The
6909
- * handle-free, ship-bytes-inline analogue of `subscribeFrames`: a consumer
6910
- * asks the broker for the decoded audio-chunk stream of one broker; the
6911
- * broker keeps a per-subscription bounded FIFO queue the consumer drains via
6912
- * `pullAudioChunks`.
6835
+ * Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9). Audio ships
6836
+ * its bytes inline: a consumer asks the broker for the decoded audio-chunk
6837
+ * stream of one broker; the broker keeps a per-subscription bounded FIFO queue
6838
+ * the consumer drains via `pullAudioChunks`.
6913
6839
  */
6914
6840
  var SubscribeAudioChunksInputSchema = object({
6915
6841
  brokerId: string(),
@@ -6940,9 +6866,7 @@ var BrokerStatsSchema = object({
6940
6866
  "stopped"
6941
6867
  ]),
6942
6868
  inputFps: number(),
6943
- decodeFps: number(),
6944
6869
  encodedSubscribers: number(),
6945
- decodedSubscribers: number(),
6946
6870
  uptimeMs: number(),
6947
6871
  bitrateKbps: number(),
6948
6872
  idrIntervalMs: number(),
@@ -6955,14 +6879,6 @@ var BrokerStatsSchema = object({
6955
6879
  preBufferMs: number(),
6956
6880
  preBufferPackets: number(),
6957
6881
  /**
6958
- * Moleculer node id of the decoder provider currently servicing this
6959
- * stream's decoded subscribers. `null` until the deferred decoder is
6960
- * created (no decoded clients yet, or codec not detected). Surfaces the
6961
- * runtime decoder placement so the UI can show "Decoder: <agent>" without
6962
- * a separate cap call per broker.
6963
- */
6964
- decoderNodeId: string().nullable(),
6965
- /**
6966
6882
  * Detected audio track parameters from the RTSP DESCRIBE / SDP. `null`
6967
6883
  * when the stream has no audio track or the broker is in cold start.
6968
6884
  * `supported = false` means the codec was detected but the local
@@ -11084,70 +11000,6 @@ var StorageLocationDeclarationSchema = object({
11084
11000
  "backup"
11085
11001
  ]).optional()
11086
11002
  });
11087
- var DecoderStatsSchema = object({
11088
- inputFps: number(),
11089
- outputFps: number(),
11090
- avgDecodeTimeMs: number(),
11091
- droppedFrames: number(),
11092
- /**
11093
- * Pull-mode adaptive-fps telemetry (optional — only pull sessions run the
11094
- * lag-driven controller; push sessions omit these). `lagMs` is the EWMA of
11095
- * the decoder's real-time drift (rising = falling behind live); `adaptiveFps`
11096
- * is the current lag-throttled emit rate (≤ `effectiveFps` ceiling).
11097
- */
11098
- lagMs: number().optional(),
11099
- effectiveFps: number().optional(),
11100
- adaptiveFps: number().optional()
11101
- });
11102
- var DecoderSessionConfigSchema = object({
11103
- codec: string(),
11104
- maxFps: number().default(0),
11105
- outputFormat: _enum([
11106
- "jpeg",
11107
- "rgb",
11108
- "bgr",
11109
- "yuv420",
11110
- "gray"
11111
- ]).default("jpeg"),
11112
- scale: number().default(1),
11113
- width: number().optional(),
11114
- height: number().optional(),
11115
- /**
11116
- * Identifier of the camera this decoder session serves. Optional
11117
- * because the cap is generic (any caller could request decode), but
11118
- * stream-broker passes it so decoder logs include `deviceId` for
11119
- * per-camera filtering when diagnosing failures (e.g. node-av
11120
- * sendPacket errors on a single hung camera).
11121
- */
11122
- deviceId: number().int().nonnegative().optional(),
11123
- /**
11124
- * Free-form tag for log scoping. Stream-broker uses
11125
- * `broker:<deviceId>/<profile>`. Decoder session logger surfaces it
11126
- * on every line so `grep tag=broker:5/high` filters one camera
11127
- * profile cleanly.
11128
- */
11129
- tag: string().optional(),
11130
- /**
11131
- * Where the session delivers decoded frames (Phase 5 / D9):
11132
- *
11133
- * - `'callback'` (default) — the legacy pixel path: decoded frames are
11134
- * buffered as `DecodedFrame`s and drained via `pullFrames`.
11135
- * - `'shm'` — the shared-memory frame plane: decoded frames are written
11136
- * into an OS shared-memory ring and drained as zero-pixel
11137
- * `FrameHandle`s via `pullHandles`. A session is one mode or the
11138
- * other — `pullFrames` returns nothing for an `'shm'` session and
11139
- * `pullHandles` returns nothing for a `'callback'` session.
11140
- */
11141
- frameSink: _enum(["callback", "shm"]).default("callback"),
11142
- /**
11143
- * Per-camera decoder DEBUG facility. When `true`, a pull-mode session emits
11144
- * a throttled (~1Hz) structured `decoder debug` line (effective/adaptive fps,
11145
- * real-time lag, dropped-frame delta, avg decode time, hwaccel). Mirrors the
11146
- * stream-broker's `streamingDebug` gate — off by default so production logs
11147
- * stay quiet and the emit path pays zero per-frame cost when disabled.
11148
- */
11149
- debug: boolean().optional()
11150
- });
11151
11003
  /**
11152
11004
  * Per-component log CHANNELS — the gate a hot path consults, and the registry
11153
11005
  * an addon declares its channels in.
@@ -13382,13 +13234,6 @@ var BrokerRtspClientSchema = object({
13382
13234
  lastRtpAt: number(),
13383
13235
  bytesSent: number()
13384
13236
  });
13385
- var BrokerDecodedClientSchema = object({
13386
- tag: string(),
13387
- subscribedAt: number(),
13388
- maxFps: number(),
13389
- framesDelivered: number(),
13390
- framesDropped: number()
13391
- });
13392
13237
  var BrokerAudioClientSchema = object({
13393
13238
  tag: string(),
13394
13239
  subscribedAt: number(),
@@ -13480,7 +13325,6 @@ var BrokerEncodedClientSchema = object({
13480
13325
  });
13481
13326
  var BrokerClientsSchema = object({
13482
13327
  rtsp: array(BrokerRtspClientSchema).readonly(),
13483
- decoded: array(BrokerDecodedClientSchema).readonly(),
13484
13328
  audio: array(BrokerAudioClientSchema).readonly(),
13485
13329
  encoded: array(BrokerEncodedClientSchema).readonly(),
13486
13330
  pipeClients: number(),
@@ -13849,11 +13693,7 @@ method(object({
13849
13693
  auth: "admin"
13850
13694
  }), method(object({ brokerId: string() }), BrokerClientsSchema), method(object({
13851
13695
  brokerId: string(),
13852
- channel: _enum([
13853
- "rtsp",
13854
- "decoded",
13855
- "audio"
13856
- ]),
13696
+ channel: _enum(["rtsp", "audio"]),
13857
13697
  handle: string()
13858
13698
  }), object({ killed: boolean() }), {
13859
13699
  kind: "mutation",
@@ -13888,10 +13728,7 @@ method(object({
13888
13728
  }), method(SubscribeAudioChunksInputSchema, SubscribeAudioChunksResultSchema, { kind: "mutation" }), method(object({
13889
13729
  subscriptionId: string(),
13890
13730
  maxCount: number().int().positive().default(8)
13891
- }), array(DecodedAudioChunkSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(SubscribeFramesInputSchema, SubscribeFramesResultSchema, { kind: "mutation" }), method(object({
13892
- subscriptionId: string(),
13893
- maxCount: number().int().positive().default(4)
13894
- }), array(FrameHandleSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(object({
13731
+ }), array(DecodedAudioChunkSchema).readonly()), method(object({ subscriptionId: string() }), object({ released: boolean() }), { kind: "mutation" }), method(object({
13895
13732
  brokerId: string(),
13896
13733
  seconds: number().min(0).max(30)
13897
13734
  }), _void(), {
@@ -15104,54 +14941,12 @@ var HWACCEL_OPTIONS = [
15104
14941
  label: "DRM (Linux generic)"
15105
14942
  }
15106
14943
  ];
15107
- /**
15108
- * shm ring usage stats for a `frameSink: 'shm'` decoder session —
15109
- * exposed via `decoder.getShmStats` so downstream consumers can
15110
- * observe ring pressure (slot count, byte budget, hit/miss ratio).
15111
- */
15112
- var ShmRingStatsSchema = object({
15113
- sessionId: string(),
15114
- slotCount: number().int(),
15115
- slotByteLength: number().int(),
15116
- segmentBytes: number().int(),
15117
- budgetMb: number().int(),
15118
- framesWritten: number().int(),
15119
- getFrameHits: number().int(),
15120
- getFrameMisses: number().int()
15121
- });
15122
- method(object({ codec: string() }), boolean()), method(_void(), object({
14944
+ method(_void(), object({
15123
14945
  id: string(),
15124
14946
  name: string(),
15125
- isPullMode: boolean().optional(),
15126
- priority: number().optional(),
15127
14947
  hwaccel: string().optional(),
15128
14948
  probedBestHwaccel: string().optional()
15129
- })), method(DecoderSessionConfigSchema, object({
15130
- sessionId: string(),
15131
- nodeId: string()
15132
- })), method(object({ sessionId: string() }), _void()), method(object({
15133
- sessionId: string(),
15134
- packet: EncodedPacketSchema
15135
- }), _void()), method(object({
15136
- sessionId: string(),
15137
- url: string()
15138
- }), _void()), method(object({
15139
- sessionId: string(),
15140
- maxCount: number().default(1),
15141
- waitMs: number().optional()
15142
- }), array(DecodedFrameSchema)), method(object({
15143
- sessionId: string(),
15144
- maxCount: number().default(1),
15145
- waitMs: number().optional()
15146
- }), array(FrameHandleSchema)), method(object({ handle: FrameHandleSchema }), DecodedFrameSchema.nullable()), method(object({ sessionId: string() }), ShmRingStatsSchema.nullable()), method(object({
15147
- sessionId: string(),
15148
- config: DecoderSessionConfigSchema.partial()
15149
- }), _void()), method(object({ sessionId: string() }), DecoderStatsSchema), method(_void(), array(object({
15150
- sessionId: string(),
15151
- codec: string(),
15152
- outputFormat: string(),
15153
- createdAtMs: number()
15154
- })).readonly()), method(_void(), object({ backend: string() }), {
14949
+ })), method(_void(), object({ backend: string() }), {
15155
14950
  kind: "mutation",
15156
14951
  auth: "admin"
15157
14952
  });
@@ -22196,8 +21991,8 @@ Object.freeze(Object.fromEntries([{
22196
21991
  var CLUSTER_STEP_SETTING_FIELDS = [{
22197
21992
  stepId: "face-embedding",
22198
21993
  key: "minLandmarkFaceSize",
22199
- label: "Min face size for recognition (detection px)",
22200
- 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.",
21994
+ label: "Min face size to embed (detection-frame px)",
21995
+ 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.",
22201
21996
  type: "slider",
22202
21997
  min: 0,
22203
21998
  max: 64,
@@ -24249,21 +24044,6 @@ var PipelineDefaultStepSchema = lazy(() => object({
24249
24044
  group: string().optional(),
24250
24045
  settings: record(string(), unknown()).optional()
24251
24046
  }));
24252
- var PipelineTemplateStepSchema = lazy(() => object({
24253
- addonId: string(),
24254
- enabled: boolean(),
24255
- modelId: string(),
24256
- children: array(PipelineTemplateStepSchema).readonly(),
24257
- settings: record(string(), unknown()).optional()
24258
- }));
24259
- var PipelineTemplateSchema$1 = object({
24260
- id: string(),
24261
- name: string(),
24262
- createdAt: string(),
24263
- updatedAt: string(),
24264
- engine: PipelineEngineChoiceSchema,
24265
- steps: array(PipelineTemplateStepSchema).readonly()
24266
- });
24267
24047
  var PipelineModelOptionSchema = object({
24268
24048
  id: string(),
24269
24049
  name: string(),
@@ -24475,15 +24255,7 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
24475
24255
  }), method(_void(), PipelineSchemaSchema), method(_void(), array(PipelineDefaultStepSchema).readonly().nullable()), method(_void(), PipelineConfigBridge), method(_void(), ConfigUISchemaBridge), method(object({
24476
24256
  steps: array(PipelineStepInputSchema),
24477
24257
  deviceKey: string().optional()
24478
- }), PipelineValidationResultSchema), method(_void(), array(PipelineTemplateSchema$1).readonly()), method(object({
24479
- name: string(),
24480
- steps: array(PipelineTemplateStepSchema).readonly(),
24481
- engine: PipelineEngineChoiceSchema
24482
- }), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({
24483
- id: string(),
24484
- name: string().optional(),
24485
- steps: array(PipelineTemplateStepSchema).readonly().optional()
24486
- }), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({ id: string() }), _void(), { kind: "mutation" }), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
24258
+ }), PipelineValidationResultSchema), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
24487
24259
  addonId: string(),
24488
24260
  modelId: string(),
24489
24261
  format: ModelFormatSchema$2
@@ -24648,148 +24420,17 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
24648
24420
  settings: record(string(), unknown()).optional()
24649
24421
  }), AudioTestResultSchema, { kind: "mutation" }), method(_void(), ConfigUISchemaNullableBridge);
24650
24422
  /**
24651
- * Wire shapes of the Load balancing surface (D748): the session placement
24652
- * policy, the atomic share write, the observed placement statistics, the
24653
- * hardware share suggestion and the stale device pins.
24654
- */
24655
- /**
24656
- * How a new detection session picks its node and device.
24657
- * - `least-loaded` — the historical rule: lowest `attached / weight`, a
24658
- * constant node order at a tie (D37). An idle node always ties at 0, so a
24659
- * weight only bites once a node already holds a session.
24660
- * - `share` — the share of PARALLEL sessions is held to the weights, and a
24661
- * full or drowning node yields to a free one (D748).
24662
- */
24663
- var SessionPlacementPolicySchema = _enum(["least-loaded", "share"]);
24664
- var LoadBalancingSharesInputSchema = object({
24665
- /** nodeId → share (> 0). A node left out keeps its weight. */
24666
- nodes: record(string(), number().positive()).default({}),
24667
- /** nodeId → deviceKey → share (> 0). A device left out keeps its weight. */
24668
- devices: record(string(), record(string(), number().positive())).default({})
24669
- });
24670
- var PlacementStatsInputSchema = object({
24671
- /** Window the observed shares are averaged over (default 1 h, max 24 h). */
24672
- windowMs: number().int().min(6e4).max(1440 * 60 * 1e3).default(3600 * 1e3) });
24673
- var PlacementDeviceStatsSchema = object({
24674
- deviceKey: string(),
24675
- /** Sessions running on this device now. */
24676
- sessionsNow: number(),
24677
- /** Sessions started on this device inside the window. */
24678
- sessionsStarted: number(),
24679
- /** Time-weighted share of the node's parallel sessions over the window (0–1); null = no session ran. */
24680
- observedShare: number().nullable()
24681
- });
24682
- var PlacementNodeStatsSchema = object({
24683
- nodeId: string(),
24684
- sessionsNow: number(),
24685
- sessionsStarted: number(),
24686
- /** Time-weighted share of the cluster's parallel sessions over the window (0–1); null = none ran. */
24687
- observedShare: number().nullable(),
24688
- /** Most sessions this node ran at once inside the window. */
24689
- peakSessions: number(),
24690
- /** Sessions a share election handed elsewhere because this node was full or drowning. */
24691
- yieldsAway: number(),
24692
- devices: array(PlacementDeviceStatsSchema).readonly()
24693
- });
24694
- /** A camera's device pin that the session path cannot honour. */
24695
- var StaleDevicePinSchema = object({
24696
- deviceId: number(),
24697
- deviceKey: string(),
24698
- /** `disabled` — the key exists on some node but is not enabled anywhere; `absent` — no node has it. */
24699
- reason: _enum(["disabled", "absent"])
24700
- });
24701
- var PlacementStatsSchema = object({
24702
- policy: SessionPlacementPolicySchema,
24703
- windowMs: number(),
24704
- /** How much of the window was actually observed (the hub keeps it in memory). */
24705
- observedForMs: number(),
24706
- sessionsNow: number(),
24707
- /** Most parallel sessions across the cluster inside the window. */
24708
- clusterPeakSessions: number(),
24709
- nodes: array(PlacementNodeStatsSchema).readonly(),
24710
- stalePins: array(StaleDevicePinSchema).readonly()
24711
- });
24712
- var SuggestSharesInputSchema = object({ headroom: number().min(.3).max(.5).default(.4) });
24713
- var SuggestedDeviceShareSchema = object({
24714
- deviceKey: string(),
24715
- /** Share of the node (0–100, rounded). */
24716
- share: number(),
24717
- modelId: string().nullable(),
24718
- /** Inferences per second at that model, from the measured table. */
24719
- fps: number().nullable(),
24720
- measured: boolean(),
24721
- /** Advisory session cap: ⌊fps × (1 − headroom) / camera fps⌋. Never enforced. */
24722
- suggestedMaxSessions: number().nullable()
24723
- });
24724
- var SuggestedNodeShareSchema = object({
24725
- nodeId: string(),
24726
- /** Share of the cluster (0–100, rounded); null = node skipped (offline, unknown hardware). */
24727
- share: number().nullable(),
24728
- /** Parallel sessions the node sustains at the suggested models with the headroom kept free. */
24729
- capacitySessions: number(),
24730
- devices: array(SuggestedDeviceShareSchema).readonly(),
24731
- skippedReason: string().nullable()
24732
- });
24733
- var SuggestSharesResultSchema = object({
24734
- headroom: number(),
24735
- /** Camera detection rate the capacity is counted in (the fastest camera's fps). */
24736
- cameraFps: number(),
24737
- /** How many share → model → capacity rounds ran before the shares stopped moving (≤ 3). */
24738
- iterations: number(),
24739
- nodes: array(SuggestedNodeShareSchema).readonly()
24740
- });
24741
- /**
24742
- * Where the node and device shares come from (D750).
24743
- * - `auto` — computed by the system from the cluster's measured capacity at
24744
- * the Auto tune models, and recomputed whenever a node or device joins,
24745
- * leaves, is switched on or off, or changes model.
24746
- * - `manual` — the operator's stored sliders. A node or device that cannot
24747
- * take sessions gives its share to the others in proportion; the stored
24748
- * values are never rewritten for that.
24749
- */
24750
- var ShareSourceSchema = _enum(["auto", "manual"]);
24751
- var SetShareSourceInputSchema = object({ source: ShareSourceSchema });
24752
- object({
24753
- nodes: record(string(), number()),
24754
- devices: record(string(), record(string(), number()))
24755
- });
24756
- var EffectiveDeviceShareSchema = object({
24757
- deviceKey: string(),
24758
- /** Can take sessions now (enabled, available, can run the root). */
24759
- eligible: boolean(),
24760
- /** The share the source assigns, as a percentage of the node's devices. */
24761
- configuredPct: number(),
24762
- /** The share actually used, after an ineligible device's share went to the others. */
24763
- effectivePct: number()
24764
- });
24765
- var EffectiveNodeShareSchema = object({
24766
- nodeId: string(),
24767
- eligible: boolean(),
24768
- configuredPct: number(),
24769
- effectivePct: number(),
24770
- devices: array(EffectiveDeviceShareSchema).readonly()
24771
- });
24772
- var EffectiveSharesSchema = object({
24773
- source: ShareSourceSchema,
24774
- policy: SessionPlacementPolicySchema,
24775
- /** `auto` with no computed answer yet: the stored sliders are used meanwhile. */
24776
- autoPending: boolean(),
24777
- /** When the automatic shares were last computed (ms epoch); null = never. */
24778
- computedAt: number().nullable(),
24779
- /** What made the system recompute them last. */
24780
- trigger: string().nullable(),
24781
- nodes: array(EffectiveNodeShareSchema).readonly(),
24782
- /** The relative weights the election reads (before eligibility). */
24783
- nodeWeights: record(string(), number()),
24784
- deviceWeights: record(string(), record(string(), number()))
24785
- });
24786
- /**
24787
24423
  * The wire shapes of the Auto tune plan and apply (D745), used by the
24788
24424
  * `pipeline-orchestrator` cap. The recommender's own types
24789
- * (`recommend.ts`, `demand.ts`) are the TS face of the same data; these
24425
+ * (`recommend.ts`) are the TS face of the same data; these
24790
24426
  * schemas are what crosses the cap boundary.
24791
24427
  */
24792
24428
  var ModelFormatSchema$1 = _enum(MODEL_FORMATS);
24429
+ /** The operator's range for it. */
24430
+ var MIN_SESSIONS_PER_DEVICE_RANGE = {
24431
+ min: 1,
24432
+ max: 8
24433
+ };
24793
24434
  var HardwareClassIdSchema = _enum([
24794
24435
  "intel-core-ultra",
24795
24436
  "intel-n-series",
@@ -24807,8 +24448,9 @@ var AcceleratorKindSchema = _enum([
24807
24448
  ]);
24808
24449
  var RecommendationReasonSchema = discriminatedUnion("kind", [
24809
24450
  object({
24810
- kind: literal("fits"),
24811
- utilisation: number()
24451
+ kind: literal("capacity"),
24452
+ sessions: number(),
24453
+ minSessions: number()
24812
24454
  }),
24813
24455
  object({
24814
24456
  kind: literal("tie-faster"),
@@ -24823,16 +24465,13 @@ var RecommendationReasonSchema = discriminatedUnion("kind", [
24823
24465
  }),
24824
24466
  object({
24825
24467
  kind: literal("no-fit-lightest"),
24826
- utilisation: number()
24468
+ sessions: number(),
24469
+ minSessions: number()
24827
24470
  }),
24828
24471
  object({
24829
24472
  kind: literal("derived-latency"),
24830
24473
  modelId: string()
24831
24474
  }),
24832
- object({
24833
- kind: literal("estimated-load"),
24834
- observedForMs: number().nullable()
24835
- }),
24836
24475
  object({ kind: literal("cpu-device") }),
24837
24476
  object({ kind: literal("coral-untouched") }),
24838
24477
  object({ kind: literal("device-disabled") }),
@@ -24848,28 +24487,13 @@ var RecommendationReasonSchema = discriminatedUnion("kind", [
24848
24487
  format: ModelFormatSchema$1
24849
24488
  })
24850
24489
  ]);
24851
- var DeviceDemandSchema = object({
24852
- nodeId: string(),
24853
- deviceKey: string(),
24854
- demandFps: number(),
24855
- maxCameraFps: number(),
24856
- alwaysOnCameras: number(),
24857
- onMotionSessions: number(),
24858
- onMotionSource: _enum([
24859
- "observed-24h",
24860
- "estimate",
24861
- "none"
24862
- ]),
24863
- observedForMs: number().nullable(),
24864
- /** How on-motion sessions were charged: per-device observation, or split by share (D748). */
24865
- placement: SessionPlacementPolicySchema
24866
- });
24867
24490
  var DeviceModelChoiceSchema = object({
24868
24491
  modelId: string(),
24869
24492
  p50Ms: number(),
24870
24493
  fps: number(),
24871
24494
  measured: boolean(),
24872
- utilisation: number(),
24495
+ /** Parallel sessions at the camera rate with the headroom kept free: ⌊fps × (1 − headroom) / camera fps⌋. */
24496
+ capacitySessions: number(),
24873
24497
  personRecall: number()
24874
24498
  });
24875
24499
  var DeviceRecommendationSchema = object({
@@ -24877,7 +24501,6 @@ var DeviceRecommendationSchema = object({
24877
24501
  accelerator: AcceleratorKindSchema.nullable(),
24878
24502
  enabled: boolean(),
24879
24503
  available: boolean(),
24880
- demand: DeviceDemandSchema.nullable(),
24881
24504
  chosen: DeviceModelChoiceSchema.nullable(),
24882
24505
  reasons: array(RecommendationReasonSchema).readonly()
24883
24506
  });
@@ -24938,20 +24561,20 @@ var AutoTuneOptionsSchema = object({
24938
24561
  /** Share of each accelerator's throughput kept free (0.3–0.5). */
24939
24562
  headroom: number().min(.3).max(.5).default(.4),
24940
24563
  /**
24941
- * What-if shares (D748): plan as if these node/device shares were stored
24942
- * and the policy were `share`. Absent = the stored shares under the stored
24943
- * policy. A what-if plan is for display; apply always re-plans from what
24944
- * is stored.
24564
+ * The least number of parallel sessions every device must sustain at the
24565
+ * camera rate with the headroom kept free (D755). The most accurate model
24566
+ * that reaches it wins.
24945
24567
  */
24946
- shares: LoadBalancingSharesInputSchema.optional()
24568
+ minSessionsPerDevice: number().int().min(MIN_SESSIONS_PER_DEVICE_RANGE.min).max(MIN_SESSIONS_PER_DEVICE_RANGE.max).default(2)
24947
24569
  });
24948
24570
  var AutoTunePlanSchema = object({
24949
24571
  /** Hash of everything the apply will write — the apply refuses a different one. */
24950
24572
  planHash: string(),
24951
24573
  family: literal("yolov9"),
24952
24574
  headroom: number(),
24953
- /** Planned under what-if shares (D748): for display — apply refuses it as stale. */
24954
- whatIf: boolean(),
24575
+ minSessionsPerDevice: number(),
24576
+ /** The detection rate a session is counted at (the fastest camera running the pipeline root). */
24577
+ cameraFps: number(),
24955
24578
  generatedAt: number(),
24956
24579
  nodes: array(NodeRecommendationSchema).readonly(),
24957
24580
  nodeChanges: array(NodeDeviceChangeSchema).readonly(),
@@ -24961,7 +24584,8 @@ var AutoTunePlanSchema = object({
24961
24584
  });
24962
24585
  var AutoTuneApplyInputSchema = object({
24963
24586
  planHash: string(),
24964
- headroom: number().min(.3).max(.5).default(.4)
24587
+ headroom: number().min(.3).max(.5).default(.4),
24588
+ minSessionsPerDevice: number().int().min(MIN_SESSIONS_PER_DEVICE_RANGE.min).max(MIN_SESSIONS_PER_DEVICE_RANGE.max).default(2)
24965
24589
  });
24966
24590
  var AutoTunePhaseResultSchema = object({
24967
24591
  phase: _enum([
@@ -24993,6 +24617,177 @@ var AutoTuneApplyResultSchema = discriminatedUnion("kind", [
24993
24617
  reason: _enum(["apply-in-progress"])
24994
24618
  })
24995
24619
  ]);
24620
+ /**
24621
+ * Wire shapes of the Load balancing surface (D748): the session placement
24622
+ * policy, the atomic share write, the observed placement statistics, the
24623
+ * hardware share suggestion and the stale device pins.
24624
+ */
24625
+ /**
24626
+ * How a new detection session picks its node and device.
24627
+ * - `least-loaded` — the historical rule: lowest `attached / weight`, a
24628
+ * constant node order at a tie (D37). An idle node always ties at 0, so a
24629
+ * weight only bites once a node already holds a session.
24630
+ * - `share` — the share of PARALLEL sessions is held to the weights, and a
24631
+ * full or drowning node yields to a free one (D748).
24632
+ */
24633
+ var SessionPlacementPolicySchema = _enum(["least-loaded", "share"]);
24634
+ var LoadBalancingSharesInputSchema = object({
24635
+ /** nodeId → share (> 0). A node left out keeps its weight. */
24636
+ nodes: record(string(), number().positive()).default({}),
24637
+ /** nodeId → deviceKey → share (> 0). A device left out keeps its weight. */
24638
+ devices: record(string(), record(string(), number().positive())).default({})
24639
+ });
24640
+ var PlacementStatsInputSchema = object({
24641
+ /** Window the observed shares are averaged over (default 1 h, max 24 h). */
24642
+ windowMs: number().int().min(6e4).max(1440 * 60 * 1e3).default(3600 * 1e3) });
24643
+ var PlacementDeviceStatsSchema = object({
24644
+ deviceKey: string(),
24645
+ /** Sessions running on this device now. */
24646
+ sessionsNow: number(),
24647
+ /** Sessions started on this device inside the window. */
24648
+ sessionsStarted: number(),
24649
+ /** Time-weighted share of the node's parallel sessions over the window (0–1); null = no session ran. */
24650
+ observedShare: number().nullable()
24651
+ });
24652
+ var PlacementNodeStatsSchema = object({
24653
+ nodeId: string(),
24654
+ sessionsNow: number(),
24655
+ sessionsStarted: number(),
24656
+ /** Time-weighted share of the cluster's parallel sessions over the window (0–1); null = none ran. */
24657
+ observedShare: number().nullable(),
24658
+ /** Most sessions this node ran at once inside the window. */
24659
+ peakSessions: number(),
24660
+ /** Sessions a share election handed elsewhere because this node was full or drowning. */
24661
+ yieldsAway: number(),
24662
+ devices: array(PlacementDeviceStatsSchema).readonly()
24663
+ });
24664
+ /** A camera's device pin that the session path cannot honour. */
24665
+ var StaleDevicePinSchema = object({
24666
+ deviceId: number(),
24667
+ deviceKey: string(),
24668
+ /** `disabled` — the key exists on some node but is not enabled anywhere; `absent` — no node has it. */
24669
+ reason: _enum(["disabled", "absent"])
24670
+ });
24671
+ var PlacementStatsSchema = object({
24672
+ policy: SessionPlacementPolicySchema,
24673
+ windowMs: number(),
24674
+ /** How much of the window was actually observed (the hub keeps it in memory). */
24675
+ observedForMs: number(),
24676
+ sessionsNow: number(),
24677
+ /** Most parallel sessions across the cluster inside the window. */
24678
+ clusterPeakSessions: number(),
24679
+ nodes: array(PlacementNodeStatsSchema).readonly(),
24680
+ stalePins: array(StaleDevicePinSchema).readonly()
24681
+ });
24682
+ /**
24683
+ * Where an automatic share's capacity comes from (D755).
24684
+ * - `hardware` — the static capacity of each device at its Auto tune model:
24685
+ * the measured latency table for the node's hardware class.
24686
+ * - `benchmark` — the node's own measured capacity (node benchmark results).
24687
+ * A node with no results falls back to `hardware`, and says so.
24688
+ */
24689
+ var CapacitySourceSchema = _enum(["hardware", "benchmark"]);
24690
+ /** Why a node under the `benchmark` source was sized from hardware instead. */
24691
+ var CapacityFallbackSchema = _enum(["no-benchmark-results", "partial-benchmark-results"]);
24692
+ var SuggestSharesInputSchema = object({
24693
+ headroom: number().min(.3).max(.5).default(.4),
24694
+ /** Default `hardware`. */
24695
+ source: CapacitySourceSchema.default("hardware")
24696
+ });
24697
+ var SuggestedDeviceShareSchema = object({
24698
+ deviceKey: string(),
24699
+ /** Share of the node (0–100, rounded). */
24700
+ share: number(),
24701
+ modelId: string().nullable(),
24702
+ /** Inferences per second at that model, from the measured table; null when sized by a benchmark. */
24703
+ fps: number().nullable(),
24704
+ /** False for a table cell derived from another chip; true for a measured cell or a benchmark. */
24705
+ measured: boolean(),
24706
+ /**
24707
+ * Advisory session cap: ⌊fps × (1 − headroom) / camera fps⌋ from the table,
24708
+ * or the benchmark's measured max sessions. Never enforced.
24709
+ */
24710
+ suggestedMaxSessions: number().nullable()
24711
+ });
24712
+ var SuggestedNodeShareSchema = object({
24713
+ nodeId: string(),
24714
+ /** Share of the cluster (0–100, rounded); null = node skipped (offline, unknown hardware). */
24715
+ share: number().nullable(),
24716
+ /** Parallel sessions the node sustains at the suggested models with the headroom kept free. */
24717
+ capacitySessions: number(),
24718
+ devices: array(SuggestedDeviceShareSchema).readonly(),
24719
+ skippedReason: string().nullable(),
24720
+ /** What this node's capacity was read from; null when the node is skipped. */
24721
+ capacitySource: CapacitySourceSchema.nullable(),
24722
+ /** Set when the `benchmark` source was asked for and this node used `hardware`. */
24723
+ capacityFallback: CapacityFallbackSchema.nullable()
24724
+ });
24725
+ var SuggestSharesResultSchema = object({
24726
+ headroom: number(),
24727
+ /** The source asked for; each node says what it actually used. */
24728
+ source: CapacitySourceSchema,
24729
+ /** Camera detection rate the capacity is counted in (the fastest camera's fps). */
24730
+ cameraFps: number(),
24731
+ /** The Auto tune capacity floor the models were picked at. */
24732
+ minSessionsPerDevice: number(),
24733
+ nodes: array(SuggestedNodeShareSchema).readonly()
24734
+ });
24735
+ /**
24736
+ * Where the node and device shares come from (D750, D755).
24737
+ * - `hardware` (default) — computed by the system from each node's static
24738
+ * capacity (its accelerators at their Auto tune models, from the measured
24739
+ * latency table), recomputed whenever a node or device joins, leaves, is
24740
+ * switched on or off, or changes model. No load input.
24741
+ * - `benchmark` — the same, from each node's measured capacity (node
24742
+ * benchmark results); a node without results falls back to `hardware`.
24743
+ * - `manual` — the operator's stored sliders.
24744
+ * Either way a node or device that cannot take sessions gives its share to
24745
+ * the others in proportion; the stored values are never rewritten for that.
24746
+ */
24747
+ var ShareSourceSchema = _enum([
24748
+ "hardware",
24749
+ "benchmark",
24750
+ "manual"
24751
+ ]);
24752
+ var SetShareSourceInputSchema = object({ source: ShareSourceSchema });
24753
+ object({
24754
+ nodes: record(string(), number()),
24755
+ devices: record(string(), record(string(), number()))
24756
+ });
24757
+ var EffectiveDeviceShareSchema = object({
24758
+ deviceKey: string(),
24759
+ /** Can take sessions now (enabled, available, can run the root). */
24760
+ eligible: boolean(),
24761
+ /** The share the source assigns, as a percentage of the node's devices. */
24762
+ configuredPct: number(),
24763
+ /** The share actually used, after an ineligible device's share went to the others. */
24764
+ effectivePct: number()
24765
+ });
24766
+ var EffectiveNodeShareSchema = object({
24767
+ nodeId: string(),
24768
+ eligible: boolean(),
24769
+ configuredPct: number(),
24770
+ effectivePct: number(),
24771
+ /** Automatic sources: what this node's share was computed from; null under `manual` or before the first answer. */
24772
+ capacitySource: CapacitySourceSchema.nullable(),
24773
+ /** Automatic `benchmark`: why this node used `hardware` instead. */
24774
+ capacityFallback: CapacityFallbackSchema.nullable(),
24775
+ devices: array(EffectiveDeviceShareSchema).readonly()
24776
+ });
24777
+ var EffectiveSharesSchema = object({
24778
+ source: ShareSourceSchema,
24779
+ policy: SessionPlacementPolicySchema,
24780
+ /** An automatic source with no computed answer yet: the stored sliders are used meanwhile. */
24781
+ autoPending: boolean(),
24782
+ /** When the automatic shares were last computed (ms epoch); null = never. */
24783
+ computedAt: number().nullable(),
24784
+ /** What made the system recompute them last. */
24785
+ trigger: string().nullable(),
24786
+ nodes: array(EffectiveNodeShareSchema).readonly(),
24787
+ /** The relative weights the election reads (before eligibility). */
24788
+ nodeWeights: record(string(), number()),
24789
+ deviceWeights: record(string(), record(string(), number()))
24790
+ });
24996
24791
  object({
24997
24792
  activeCameras: number(),
24998
24793
  throttledCameras: number(),
@@ -25870,14 +25665,15 @@ var RunnerLocalLoadSchema = object({
25870
25665
  * Per-inference-device live load (multi-device C4). One entry per deviceKey
25871
25666
  * this runner currently has attached cameras on, so the orchestrator's second
25872
25667
  * `balance()` pass (over a node's devices) weights on real per-pool session
25873
- * counts. Empty on single-device / pre-multi-device runners. `queueDepthTotal`
25874
- * 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).
25875
25672
  */
25876
25673
  devices: array(object({
25877
25674
  deviceKey: string(),
25878
25675
  backend: string(),
25879
- attachedCameras: number(),
25880
- queueDepthTotal: number()
25676
+ attachedCameras: number()
25881
25677
  })).default([]),
25882
25678
  /** Hardware capability flags reported by this node. */
25883
25679
  hardware: object({
@@ -26091,14 +25887,6 @@ var CameraPipelineConfigSchema = object({
26091
25887
  settings: record(string(), unknown()).readonly().optional()
26092
25888
  }).nullable().optional()
26093
25889
  });
26094
- var PipelineTemplateSchema = object({
26095
- id: string(),
26096
- name: string(),
26097
- description: string().optional(),
26098
- config: CameraPipelineConfigSchema,
26099
- createdAt: string(),
26100
- updatedAt: string()
26101
- });
26102
25890
  var DeviceStepConfigSchema = object({
26103
25891
  modelId: string().optional(),
26104
25892
  settings: record(string(), unknown()).optional(),
@@ -26172,8 +25960,10 @@ var CameraStepOverridePatchSchema = object({
26172
25960
  modelId: string().optional(),
26173
25961
  settings: record(string(), unknown()).readonly().optional()
26174
25962
  });
25963
+ var CameraStepSettingsSchema = record(string(), record(string(), unknown()).readonly());
26175
25964
  var CameraPipelineSettingsSchema = object({
26176
25965
  stepToggles: record(string(), boolean()).optional(),
25966
+ stepSettings: CameraStepSettingsSchema.optional(),
26177
25967
  stepOverridesByDevice: record(string(), record(string(), record(string(), CameraStepOverridePatchSchema))).optional(),
26178
25968
  pipelineByAgent: record(string(), CameraPipelineForAgentSchema).optional()
26179
25969
  });
@@ -26206,7 +25996,10 @@ var PipelineAssignmentSchema = object({
26206
25996
  });
26207
25997
  /**
26208
25998
  * Per-agent load summary surfaced to the load balancer + dashboards.
26209
- * 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.
26210
26003
  */
26211
26004
  var AgentLoadSummarySchema = object({
26212
26005
  nodeId: string(),
@@ -26295,26 +26088,27 @@ var CameraBrokerStatusSchema = object({
26295
26088
  width: number(),
26296
26089
  height: number(),
26297
26090
  subscribers: number(),
26298
- inFps: number(),
26299
- 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()
26300
26099
  })).readonly(),
26301
26100
  webrtcSessions: number(),
26302
26101
  rtspRestream: boolean()
26303
26102
  });
26304
- /** Shared-memory ring statistics within the decoder block. */
26305
- var CameraDecoderShmSchema = object({
26306
- framesWritten: number(),
26307
- getFrameHits: number(),
26308
- getFrameMisses: number(),
26309
- budgetMb: number()
26310
- });
26311
- /** Decoder block — null when the decoder stage is unreachable or inactive. */
26312
- var CameraDecoderStatusSchema = object({
26313
- nodeId: string(),
26314
- formats: array(string()).readonly(),
26315
- sessionCount: number(),
26316
- shm: CameraDecoderShmSchema
26317
- });
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() });
26318
26112
  /** Motion block — null when motion detection is not active for this device. */
26319
26113
  var CameraMotionStatusSchema = object({
26320
26114
  enabled: boolean(),
@@ -26737,6 +26531,13 @@ method(object({
26737
26531
  }), object({ success: literal(true) }), {
26738
26532
  kind: "mutation",
26739
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"
26740
26541
  }), method(object({
26741
26542
  deviceId: number(),
26742
26543
  agentNodeId: string(),
@@ -26760,25 +26561,7 @@ method(object({
26760
26561
  }), method(_void(), DiskReconcileJobSchema, {
26761
26562
  kind: "mutation",
26762
26563
  auth: "admin"
26763
- }), method(_void(), DiskReconcileJobSchema, { auth: "admin" }), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
26764
- name: string(),
26765
- description: string().optional(),
26766
- config: CameraPipelineConfigSchema
26767
- }), PipelineTemplateSchema, {
26768
- kind: "mutation",
26769
- auth: "admin"
26770
- }), method(object({
26771
- id: string(),
26772
- name: string().optional(),
26773
- description: string().optional(),
26774
- config: CameraPipelineConfigSchema.optional()
26775
- }), PipelineTemplateSchema, {
26776
- kind: "mutation",
26777
- auth: "admin"
26778
- }), method(object({ id: string() }), object({ success: literal(true) }), {
26779
- kind: "mutation",
26780
- auth: "admin"
26781
- });
26564
+ }), method(_void(), DiskReconcileJobSchema, { auth: "admin" });
26782
26565
  /**
26783
26566
  * Cap → event-kind mapping for the SENSOR / CONTROL cap families — the table
26784
26567
  * `pipeline-analytics.listEventKinds` uses to turn a linked device's bound
@@ -29191,8 +28974,6 @@ var WebrtcStreamChoiceSchema = object({
29191
28974
  ]).nullable(),
29192
28975
  /** Input FPS from the camera (null for adaptive). */
29193
28976
  inputFps: number().nullable(),
29194
- /** Decoded FPS (null for adaptive). */
29195
- decodeFps: number().nullable(),
29196
28977
  /** Bitrate in kbps (null for adaptive). */
29197
28978
  bitrateKbps: number().nullable()
29198
28979
  });
@@ -39388,90 +39169,18 @@ Object.freeze({
39388
39169
  addonId: null,
39389
39170
  access: "create"
39390
39171
  },
39391
- "decoder.createSession": {
39392
- capName: "decoder",
39393
- capScope: "system",
39394
- addonId: null,
39395
- access: "view"
39396
- },
39397
- "decoder.destroySession": {
39398
- capName: "decoder",
39399
- capScope: "system",
39400
- addonId: null,
39401
- access: "delete"
39402
- },
39403
- "decoder.getFrame": {
39404
- capName: "decoder",
39405
- capScope: "system",
39406
- addonId: null,
39407
- access: "view"
39408
- },
39409
39172
  "decoder.getInfo": {
39410
39173
  capName: "decoder",
39411
39174
  capScope: "system",
39412
39175
  addonId: null,
39413
39176
  access: "view"
39414
39177
  },
39415
- "decoder.getShmStats": {
39416
- capName: "decoder",
39417
- capScope: "system",
39418
- addonId: null,
39419
- access: "view"
39420
- },
39421
- "decoder.getStats": {
39422
- capName: "decoder",
39423
- capScope: "system",
39424
- addonId: null,
39425
- access: "view"
39426
- },
39427
- "decoder.listActiveSessions": {
39428
- capName: "decoder",
39429
- capScope: "system",
39430
- addonId: null,
39431
- access: "view"
39432
- },
39433
- "decoder.openStream": {
39434
- capName: "decoder",
39435
- capScope: "system",
39436
- addonId: null,
39437
- access: "view"
39438
- },
39439
- "decoder.pullFrames": {
39440
- capName: "decoder",
39441
- capScope: "system",
39442
- addonId: null,
39443
- access: "view"
39444
- },
39445
- "decoder.pullHandles": {
39446
- capName: "decoder",
39447
- capScope: "system",
39448
- addonId: null,
39449
- access: "view"
39450
- },
39451
- "decoder.pushPacket": {
39452
- capName: "decoder",
39453
- capScope: "system",
39454
- addonId: null,
39455
- access: "view"
39456
- },
39457
39178
  "decoder.reprobeHwaccel": {
39458
39179
  capName: "decoder",
39459
39180
  capScope: "system",
39460
39181
  addonId: null,
39461
39182
  access: "create"
39462
39183
  },
39463
- "decoder.supportsCodec": {
39464
- capName: "decoder",
39465
- capScope: "system",
39466
- addonId: null,
39467
- access: "view"
39468
- },
39469
- "decoder.updateConfig": {
39470
- capName: "decoder",
39471
- capScope: "system",
39472
- addonId: null,
39473
- access: "view"
39474
- },
39475
39184
  "detectionPipeline.applyDeviceSettingsPatch": {
39476
39185
  capName: "detection-pipeline",
39477
39186
  capScope: "device",
@@ -42562,12 +42271,6 @@ Object.freeze({
42562
42271
  addonId: null,
42563
42272
  access: "delete"
42564
42273
  },
42565
- "pipelineExecutor.deleteTemplate": {
42566
- capName: "pipeline-executor",
42567
- capScope: "system",
42568
- addonId: null,
42569
- access: "delete"
42570
- },
42571
42274
  "pipelineExecutor.downloadModel": {
42572
42275
  capName: "pipeline-executor",
42573
42276
  capScope: "system",
@@ -42706,12 +42409,6 @@ Object.freeze({
42706
42409
  addonId: null,
42707
42410
  access: "view"
42708
42411
  },
42709
- "pipelineExecutor.listTemplates": {
42710
- capName: "pipeline-executor",
42711
- capScope: "system",
42712
- addonId: null,
42713
- access: "view"
42714
- },
42715
42412
  "pipelineExecutor.rearmInferenceDevice": {
42716
42413
  capName: "pipeline-executor",
42717
42414
  capScope: "system",
@@ -42736,12 +42433,6 @@ Object.freeze({
42736
42433
  addonId: null,
42737
42434
  access: "create"
42738
42435
  },
42739
- "pipelineExecutor.saveTemplate": {
42740
- capName: "pipeline-executor",
42741
- capScope: "system",
42742
- addonId: null,
42743
- access: "create"
42744
- },
42745
42436
  "pipelineExecutor.setVideoPipelineSteps": {
42746
42437
  capName: "pipeline-executor",
42747
42438
  capScope: "system",
@@ -42760,12 +42451,6 @@ Object.freeze({
42760
42451
  addonId: null,
42761
42452
  access: "create"
42762
42453
  },
42763
- "pipelineExecutor.updateTemplate": {
42764
- capName: "pipeline-executor",
42765
- capScope: "system",
42766
- addonId: null,
42767
- access: "create"
42768
- },
42769
42454
  "pipelineExecutor.validatePipeline": {
42770
42455
  capName: "pipeline-executor",
42771
42456
  capScope: "system",
@@ -42796,12 +42481,6 @@ Object.freeze({
42796
42481
  addonId: null,
42797
42482
  access: "create"
42798
42483
  },
42799
- "pipelineOrchestrator.deleteTemplate": {
42800
- capName: "pipeline-orchestrator",
42801
- capScope: "system",
42802
- addonId: null,
42803
- access: "delete"
42804
- },
42805
42484
  "pipelineOrchestrator.getAgentLoad": {
42806
42485
  capName: "pipeline-orchestrator",
42807
42486
  capScope: "system",
@@ -42952,12 +42631,6 @@ Object.freeze({
42952
42631
  addonId: null,
42953
42632
  access: "view"
42954
42633
  },
42955
- "pipelineOrchestrator.listTemplates": {
42956
- capName: "pipeline-orchestrator",
42957
- capScope: "system",
42958
- addonId: null,
42959
- access: "view"
42960
- },
42961
42634
  "pipelineOrchestrator.pauseForStorageMigration": {
42962
42635
  capName: "pipeline-orchestrator",
42963
42636
  capScope: "system",
@@ -43012,12 +42685,6 @@ Object.freeze({
43012
42685
  addonId: null,
43013
42686
  access: "create"
43014
42687
  },
43015
- "pipelineOrchestrator.saveTemplate": {
43016
- capName: "pipeline-orchestrator",
43017
- capScope: "system",
43018
- addonId: null,
43019
- access: "create"
43020
- },
43021
42688
  "pipelineOrchestrator.setAgentCapabilities": {
43022
42689
  capName: "pipeline-orchestrator",
43023
42690
  capScope: "system",
@@ -43066,6 +42733,12 @@ Object.freeze({
43066
42733
  addonId: null,
43067
42734
  access: "create"
43068
42735
  },
42736
+ "pipelineOrchestrator.setCameraStepSettings": {
42737
+ capName: "pipeline-orchestrator",
42738
+ capScope: "system",
42739
+ addonId: null,
42740
+ access: "create"
42741
+ },
43069
42742
  "pipelineOrchestrator.setCameraStepToggle": {
43070
42743
  capName: "pipeline-orchestrator",
43071
42744
  capScope: "system",
@@ -43120,12 +42793,6 @@ Object.freeze({
43120
42793
  addonId: null,
43121
42794
  access: "create"
43122
42795
  },
43123
- "pipelineOrchestrator.updateTemplate": {
43124
- capName: "pipeline-orchestrator",
43125
- capScope: "system",
43126
- addonId: null,
43127
- access: "create"
43128
- },
43129
42796
  "pipelineRunner.attachCamera": {
43130
42797
  capName: "pipeline-runner",
43131
42798
  capScope: "system",
@@ -44560,12 +44227,6 @@ Object.freeze({
44560
44227
  addonId: null,
44561
44228
  access: "view"
44562
44229
  },
44563
- "streamBroker.pullFrameHandles": {
44564
- capName: "stream-broker",
44565
- capScope: "system",
44566
- addonId: null,
44567
- access: "view"
44568
- },
44569
44230
  "streamBroker.regenerateRtspToken": {
44570
44231
  capName: "stream-broker",
44571
44232
  capScope: "system",
@@ -44632,12 +44293,6 @@ Object.freeze({
44632
44293
  addonId: null,
44633
44294
  access: "create"
44634
44295
  },
44635
- "streamBroker.subscribeFrames": {
44636
- capName: "stream-broker",
44637
- capScope: "system",
44638
- addonId: null,
44639
- access: "create"
44640
- },
44641
44296
  "streamBroker.unassignProfile": {
44642
44297
  capName: "stream-broker",
44643
44298
  capScope: "system",
@@ -44650,12 +44305,6 @@ Object.freeze({
44650
44305
  addonId: null,
44651
44306
  access: "create"
44652
44307
  },
44653
- "streamBroker.unsubscribeFrames": {
44654
- capName: "stream-broker",
44655
- capScope: "system",
44656
- addonId: null,
44657
- access: "create"
44658
- },
44659
44308
  "streamCatalog.getCatalog": {
44660
44309
  capName: "stream-catalog",
44661
44310
  capScope: "device",
@@ -47169,11 +46818,6 @@ Object.freeze({
47169
46818
  form: "single",
47170
46819
  optional: false
47171
46820
  }],
47172
- "decoder.createSession": [{
47173
- name: "deviceId",
47174
- form: "single",
47175
- optional: true
47176
- }],
47177
46821
  "detectionPipeline.applyDeviceSettingsPatch": [{
47178
46822
  name: "deviceId",
47179
46823
  form: "single",
@@ -48514,6 +48158,11 @@ Object.freeze({
48514
48158
  form: "single",
48515
48159
  optional: false
48516
48160
  }],
48161
+ "pipelineOrchestrator.setCameraStepSettings": [{
48162
+ name: "deviceId",
48163
+ form: "single",
48164
+ optional: false
48165
+ }],
48517
48166
  "pipelineOrchestrator.setCameraStepToggle": [{
48518
48167
  name: "deviceId",
48519
48168
  form: "single",