@camstack/system 1.2.371 → 1.2.373

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/addon-runner.js +2 -2
  2. package/dist/addon-runner.mjs +2 -2
  3. package/dist/addon-utils.js +1 -1
  4. package/dist/addon-utils.mjs +1 -1
  5. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  6. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  7. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  8. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  9. package/dist/builtins/alerts/alerts.addon.js +1 -1
  10. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  11. package/dist/builtins/autotrack/index.js +1 -1
  12. package/dist/builtins/autotrack/index.mjs +1 -1
  13. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  14. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  15. package/dist/builtins/calendars/calendars.addon.js +1 -1
  16. package/dist/builtins/calendars/calendars.addon.mjs +1 -1
  17. package/dist/builtins/camera-grid/index.js +1 -1
  18. package/dist/builtins/camera-grid/index.mjs +1 -1
  19. package/dist/builtins/composer/composer.addon.js +2 -2
  20. package/dist/builtins/composer/composer.addon.mjs +2 -2
  21. package/dist/builtins/console-logging/index.js +1 -1
  22. package/dist/builtins/console-logging/index.mjs +1 -1
  23. package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
  24. package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
  25. package/dist/builtins/device-manager/device-manager.addon.js +2 -2
  26. package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  27. package/dist/builtins/hub-forwarder/index.js +1 -1
  28. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  29. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  30. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  31. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  32. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  33. package/dist/builtins/local-network/local-network.addon.js +1 -1
  34. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  35. package/dist/builtins/loki-logging/index.js +1 -1
  36. package/dist/builtins/loki-logging/index.mjs +1 -1
  37. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  38. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  39. package/dist/builtins/platform-probe/index.js +1 -1
  40. package/dist/builtins/platform-probe/index.mjs +1 -1
  41. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  42. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  43. package/dist/builtins/snapshot/index.js +1 -1
  44. package/dist/builtins/snapshot/index.mjs +1 -1
  45. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  46. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  47. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
  48. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
  49. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  50. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  51. package/dist/builtins/system-config/system-config.addon.js +1 -1
  52. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  53. package/dist/builtins/winston-logging/index.js +1 -1
  54. package/dist/builtins/winston-logging/index.mjs +1 -1
  55. package/dist/{child-cap-dispatch-DCjIObR4.mjs → child-cap-dispatch-CW2D1fG5.mjs} +1 -1
  56. package/dist/{child-cap-dispatch-BnK6DAfq.js → child-cap-dispatch-DQ3QStD0.js} +1 -1
  57. package/dist/{composition-sources-ox8sQkhW.mjs → composition-sources-DPcjkPV-.mjs} +1 -1
  58. package/dist/{composition-sources-DnXrP8aB.js → composition-sources-DafxN5yU.js} +1 -1
  59. package/dist/{dist-DNEiTrJg.mjs → dist-BzZiW4y2.mjs} +118 -358
  60. package/dist/{dist-CiWEbWNH.js → dist-C0GdEjDp.js} +118 -358
  61. package/dist/{event-loop-stall-monitor-BZ6MkadH.js → event-loop-stall-monitor-DZb_DpSB.js} +1 -1
  62. package/dist/{event-loop-stall-monitor-CIdyLKI_.mjs → event-loop-stall-monitor-rZm9BLuu.mjs} +1 -1
  63. package/dist/framework-resolver-hook.mjs +0 -1
  64. package/dist/index.js +3 -3
  65. package/dist/index.mjs +3 -3
  66. package/dist/kernel/moleculer/register-framework-resolver.d.ts +1 -1
  67. package/dist/{retired-settings-keys-CPdkMQT4.js → retired-settings-keys-BwzFI_ti.js} +1 -1
  68. package/dist/{retired-settings-keys-Cku3oT1A.mjs → retired-settings-keys-CUKTxNhQ.mjs} +1 -1
  69. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import "node:crypto";
3
- //#region ../types/dist/event-category-BGmz_oxW.mjs
3
+ //#region ../types/dist/event-category-B_0XEcLF.mjs
4
4
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
5
5
  EventCategory["SystemBoot"] = "system.boot";
6
6
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -501,15 +501,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
501
501
  EventCategory["AgentWsDisconnected"] = "agent.ws.disconnected";
502
502
  EventCategory["AgentBackupActivated"] = "agent.backup.activated";
503
503
  EventCategory["OrchestrationSettingsUpdated"] = "orchestration.settings-updated";
504
- /**
505
- * Per-agent hwaccel preference changed (user override set, cleared, or
506
- * re-probed). Observability event — decoders pull the current pref at
507
- * `createSession`, so running sessions keep their current backend until
508
- * they rotate naturally (camera add/remove, stream restart). Future
509
- * work can wire a listener in stream-broker that force-rotates live
510
- * sessions; for now this event powers logs + admin-UI toast feedback.
511
- */
512
- EventCategory["PipelineAgentHwaccelChanged"] = "pipeline.agent-hwaccel-changed";
513
504
  EventCategory["MotionAnalysis"] = "detection.motion-analysis";
514
505
  /** All raw motion zones from CCL before minArea filter — for UI debug overlay. */
515
506
  EventCategory["MotionZonesRaw"] = "detection.motion-zones-raw";
@@ -710,7 +701,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
710
701
  return EventCategory;
711
702
  }({});
712
703
  //#endregion
713
- //#region ../types/dist/sleep-DAJ9Er57.mjs
704
+ //#region ../types/dist/sleep-BNeXenvr.mjs
714
705
  /**
715
706
  * The audio chunk plane's byte format, and the ONE expansion from a coded
716
707
  * window to float samples (D455).
@@ -2100,32 +2091,12 @@ z.object({
2100
2091
  audioCodec: z.string().optional(),
2101
2092
  metadata: z.record(z.string(), z.unknown()).readonly().optional()
2102
2093
  });
2103
- var EncodedPacketSchema = z.object({
2104
- type: z.enum(["video", "audio"]),
2105
- data: z.instanceof(Uint8Array),
2106
- pts: z.number(),
2107
- dts: z.number(),
2108
- keyframe: z.boolean(),
2109
- codec: z.string()
2110
- });
2111
- var DecodedFrameSchema = z.object({
2112
- data: z.instanceof(Uint8Array),
2113
- width: z.number(),
2114
- height: z.number(),
2115
- format: z.enum([
2116
- "jpeg",
2117
- "rgb",
2118
- "bgr",
2119
- "yuv420",
2120
- "gray"
2121
- ]),
2122
- timestamp: z.number()
2123
- });
2124
2094
  /**
2125
2095
  * Wire schema for `FrameHandle` — a zero-pixel, serialisable reference to a
2126
2096
  * frame in a shared-memory ring (Phase 5 / D9). Mirrors the `FrameHandle` TS
2127
- * interface in `interfaces/frame-handle.ts` field-for-field so a decoder cap
2128
- * method (`pullHandles`) can carry handles over tRPC / Moleculer.
2097
+ * interface in `interfaces/frame-handle.ts` field-for-field so a cap method
2098
+ * (the runner's native-crop and pipeline-executor inputs) can carry handles
2099
+ * over tRPC / Moleculer.
2129
2100
  *
2130
2101
  * The `satisfies` assertion below pins this schema to the interface: if a
2131
2102
  * field is added to / removed from `FrameHandle` without a matching schema
@@ -2151,50 +2122,6 @@ var FrameHandleSchema = z.object({
2151
2122
  slotCount: z.number().int().positive()
2152
2123
  });
2153
2124
  /**
2154
- * Pixel format a frame-handle subscriber can request from the broker
2155
- * (Phase 5 / D9). The packed, raster subset of `FrameFormat` — the formats a
2156
- * `frameSink: 'shm'` decoder session can write into a `FrameRing` slot.
2157
- * `jpeg` is excluded: a variable-length stream is not a fixed-stride ring
2158
- * payload, and no decoded-frame consumer requests it over the shm plane.
2159
- */
2160
- var FrameHandleFormatSchema = z.enum([
2161
- "rgb",
2162
- "bgr",
2163
- "yuv420",
2164
- "gray"
2165
- ]);
2166
- /**
2167
- * Input for `stream-broker.subscribeFrames` (Phase 5 / D9). A consumer asks the
2168
- * broker for a `FrameHandle` stream of one `format`; the broker maintains one
2169
- * shared-memory ring per `(brokerId, format)` actually requested, so a `gray`
2170
- * subscriber (motion) and an `rgb` subscriber (detection) each read the format
2171
- * they asked for with no broker-side conversion.
2172
- */
2173
- var SubscribeFramesInputSchema = z.object({
2174
- brokerId: z.string(),
2175
- format: FrameHandleFormatSchema,
2176
- /**
2177
- * Optional reader-side cadence hint in frames per second. The broker does
2178
- * NOT throttle — latest-wins ring reads drop frames implicitly for a slow
2179
- * consumer. The value is echoed back in `SubscribeFramesResult.maxFps` so
2180
- * the consumer can pace its own `pullFrameHandles` polling.
2181
- */
2182
- maxFps: z.number().positive().optional(),
2183
- /** Short caller-identity tag (`motion`, `detection`, …) for diagnostics. */
2184
- tag: z.string().optional()
2185
- });
2186
- /**
2187
- * Result of `stream-broker.subscribeFrames`. The consumer then polls
2188
- * `pullFrameHandles({ subscriptionId, maxCount })` and feeds each returned
2189
- * `FrameHandle` to a `FrameRingReader`.
2190
- */
2191
- var SubscribeFramesResultSchema = z.object({
2192
- /** Opaque id the consumer passes to `pullFrameHandles` / `unsubscribeFrames`. */
2193
- subscriptionId: z.string(),
2194
- /** Reader-side cadence hint (frames/s) — echoes `SubscribeFramesInput.maxFps`. */
2195
- maxFps: z.number().nonnegative()
2196
- });
2197
- /**
2198
2125
  * Wire schema for a decoded audio chunk (Phase 5 / D9). Mirrors the
2199
2126
  * `DecodedAudioChunk` TS interface in `interfaces/stream-broker.ts`: PCM
2200
2127
  * sample bytes plus the track parameters a consumer needs to interpret them.
@@ -2202,8 +2129,8 @@ var SubscribeFramesResultSchema = z.object({
2202
2129
  * Audio chunks are tiny (a ~500ms AudioCodecSession window is a few KB of
2203
2130
  * Float32 PCM), so unlike video frames they ship their bytes INLINE over
2204
2131
  * tRPC / Moleculer — no shared-memory plane. `data` is typed `Uint8Array`
2205
- * (the wire-serialisable supertype of `Buffer`) to match `DecodedFrameSchema`
2206
- * / `EncodedPacketSchema`'s precedent; a `Buffer` is assignable to it.
2132
+ * (the wire-serialisable supertype of `Buffer`); a `Buffer` is assignable to
2133
+ * it.
2207
2134
  */
2208
2135
  var AudioChunkFormatSchema = z.enum(AUDIO_CHUNK_FORMATS);
2209
2136
  var DecodedAudioChunkSchema = z.object({
@@ -2221,11 +2148,10 @@ var DecodedAudioChunkSchema = z.object({
2221
2148
  format: AudioChunkFormatSchema.optional()
2222
2149
  });
2223
2150
  /**
2224
- * Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9). The
2225
- * handle-free, ship-bytes-inline analogue of `subscribeFrames`: a consumer
2226
- * asks the broker for the decoded audio-chunk stream of one broker; the
2227
- * broker keeps a per-subscription bounded FIFO queue the consumer drains via
2228
- * `pullAudioChunks`.
2151
+ * Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9). Audio ships
2152
+ * its bytes inline: a consumer asks the broker for the decoded audio-chunk
2153
+ * stream of one broker; the broker keeps a per-subscription bounded FIFO queue
2154
+ * the consumer drains via `pullAudioChunks`.
2229
2155
  */
2230
2156
  var SubscribeAudioChunksInputSchema = z.object({
2231
2157
  brokerId: z.string(),
@@ -2257,9 +2183,7 @@ var BrokerStatusSchema = z.enum([
2257
2183
  var BrokerStatsSchema = z.object({
2258
2184
  status: BrokerStatusSchema,
2259
2185
  inputFps: z.number(),
2260
- decodeFps: z.number(),
2261
2186
  encodedSubscribers: z.number(),
2262
- decodedSubscribers: z.number(),
2263
2187
  uptimeMs: z.number(),
2264
2188
  bitrateKbps: z.number(),
2265
2189
  idrIntervalMs: z.number(),
@@ -2272,14 +2196,6 @@ var BrokerStatsSchema = z.object({
2272
2196
  preBufferMs: z.number(),
2273
2197
  preBufferPackets: z.number(),
2274
2198
  /**
2275
- * Moleculer node id of the decoder provider currently servicing this
2276
- * stream's decoded subscribers. `null` until the deferred decoder is
2277
- * created (no decoded clients yet, or codec not detected). Surfaces the
2278
- * runtime decoder placement so the UI can show "Decoder: <agent>" without
2279
- * a separate cap call per broker.
2280
- */
2281
- decoderNodeId: z.string().nullable(),
2282
- /**
2283
2199
  * Detected audio track parameters from the RTSP DESCRIBE / SDP. `null`
2284
2200
  * when the stream has no audio track or the broker is in cold start.
2285
2201
  * `supported = false` means the codec was detected but the local
@@ -7524,70 +7440,6 @@ var StorageLocationDeclarationSchema = z.object({
7524
7440
  "backup"
7525
7441
  ]).optional()
7526
7442
  });
7527
- var DecoderStatsSchema = z.object({
7528
- inputFps: z.number(),
7529
- outputFps: z.number(),
7530
- avgDecodeTimeMs: z.number(),
7531
- droppedFrames: z.number(),
7532
- /**
7533
- * Pull-mode adaptive-fps telemetry (optional — only pull sessions run the
7534
- * lag-driven controller; push sessions omit these). `lagMs` is the EWMA of
7535
- * the decoder's real-time drift (rising = falling behind live); `adaptiveFps`
7536
- * is the current lag-throttled emit rate (≤ `effectiveFps` ceiling).
7537
- */
7538
- lagMs: z.number().optional(),
7539
- effectiveFps: z.number().optional(),
7540
- adaptiveFps: z.number().optional()
7541
- });
7542
- var DecoderSessionConfigSchema = z.object({
7543
- codec: z.string(),
7544
- maxFps: z.number().default(0),
7545
- outputFormat: z.enum([
7546
- "jpeg",
7547
- "rgb",
7548
- "bgr",
7549
- "yuv420",
7550
- "gray"
7551
- ]).default("jpeg"),
7552
- scale: z.number().default(1),
7553
- width: z.number().optional(),
7554
- height: z.number().optional(),
7555
- /**
7556
- * Identifier of the camera this decoder session serves. Optional
7557
- * because the cap is generic (any caller could request decode), but
7558
- * stream-broker passes it so decoder logs include `deviceId` for
7559
- * per-camera filtering when diagnosing failures (e.g. node-av
7560
- * sendPacket errors on a single hung camera).
7561
- */
7562
- deviceId: z.number().int().nonnegative().optional(),
7563
- /**
7564
- * Free-form tag for log scoping. Stream-broker uses
7565
- * `broker:<deviceId>/<profile>`. Decoder session logger surfaces it
7566
- * on every line so `grep tag=broker:5/high` filters one camera
7567
- * profile cleanly.
7568
- */
7569
- tag: z.string().optional(),
7570
- /**
7571
- * Where the session delivers decoded frames (Phase 5 / D9):
7572
- *
7573
- * - `'callback'` (default) — the legacy pixel path: decoded frames are
7574
- * buffered as `DecodedFrame`s and drained via `pullFrames`.
7575
- * - `'shm'` — the shared-memory frame plane: decoded frames are written
7576
- * into an OS shared-memory ring and drained as zero-pixel
7577
- * `FrameHandle`s via `pullHandles`. A session is one mode or the
7578
- * other — `pullFrames` returns nothing for an `'shm'` session and
7579
- * `pullHandles` returns nothing for a `'callback'` session.
7580
- */
7581
- frameSink: z.enum(["callback", "shm"]).default("callback"),
7582
- /**
7583
- * Per-camera decoder DEBUG facility. When `true`, a pull-mode session emits
7584
- * a throttled (~1Hz) structured `decoder debug` line (effective/adaptive fps,
7585
- * real-time lag, dropped-frame delta, avg decode time, hwaccel). Mirrors the
7586
- * stream-broker's `streamingDebug` gate — off by default so production logs
7587
- * stay quiet and the emit path pays zero per-frame cost when disabled.
7588
- */
7589
- debug: z.boolean().optional()
7590
- });
7591
7443
  /**
7592
7444
  * Per-component log CHANNELS — the gate a hot path consults, and the registry
7593
7445
  * an addon declares its channels in.
@@ -10388,13 +10240,6 @@ var BrokerRtspClientSchema = z.object({
10388
10240
  lastRtpAt: z.number(),
10389
10241
  bytesSent: z.number()
10390
10242
  });
10391
- var BrokerDecodedClientSchema = z.object({
10392
- tag: z.string(),
10393
- subscribedAt: z.number(),
10394
- maxFps: z.number(),
10395
- framesDelivered: z.number(),
10396
- framesDropped: z.number()
10397
- });
10398
10243
  var BrokerAudioClientSchema = z.object({
10399
10244
  tag: z.string(),
10400
10245
  subscribedAt: z.number(),
@@ -10494,7 +10339,6 @@ var BrokerEncodedClientSchema = z.object({
10494
10339
  });
10495
10340
  var BrokerClientsSchema = z.object({
10496
10341
  rtsp: z.array(BrokerRtspClientSchema).readonly(),
10497
- decoded: z.array(BrokerDecodedClientSchema).readonly(),
10498
10342
  audio: z.array(BrokerAudioClientSchema).readonly(),
10499
10343
  encoded: z.array(BrokerEncodedClientSchema).readonly(),
10500
10344
  pipeClients: z.number(),
@@ -10986,11 +10830,7 @@ var streamBrokerCapability = {
10986
10830
  listClients: method(z.object({ brokerId: z.string() }), BrokerClientsSchema),
10987
10831
  killClient: method(z.object({
10988
10832
  brokerId: z.string(),
10989
- channel: z.enum([
10990
- "rtsp",
10991
- "decoded",
10992
- "audio"
10993
- ]),
10833
+ channel: z.enum(["rtsp", "audio"]),
10994
10834
  handle: z.string()
10995
10835
  }), z.object({ killed: z.boolean() }), {
10996
10836
  kind: "mutation",
@@ -11089,31 +10929,6 @@ var streamBrokerCapability = {
11089
10929
  maxCount: z.number().int().positive().default(8)
11090
10930
  }), z.array(DecodedAudioChunkSchema).readonly()),
11091
10931
  unsubscribeAudioChunks: method(z.object({ subscriptionId: z.string() }), z.object({ released: z.boolean() }), { kind: "mutation" }),
11092
- /**
11093
- * ── Shared-memory frame plane (Phase 5 / D9) ──────────────────────
11094
- *
11095
- * The handle-based replacement for the live-object `IStreamBroker.
11096
- * onDecodedFrame` callback path. A consumer:
11097
- *
11098
- * 1. `subscribeFrames({ brokerId, format })` — the broker spins up
11099
- * (or reuses) a `frameSink: 'shm'` decoder session producing that
11100
- * `format` and returns a `subscriptionId`.
11101
- * 2. polls `pullFrameHandles({ subscriptionId, maxCount })` — drains
11102
- * zero-pixel `FrameHandle[]`; each handle is fed to a
11103
- * `FrameRingReader` that opens the named shm segment and reads the
11104
- * pixels back zero-copy.
11105
- * 3. `unsubscribeFrames({ subscriptionId })` on teardown.
11106
- *
11107
- * The broker keeps one shm ring per `(brokerId, format)` actually
11108
- * requested — no broker-side `sharp` conversion. fps throttling is
11109
- * implicit (latest-wins ring reads drop frames for a slow consumer).
11110
- */
11111
- subscribeFrames: method(SubscribeFramesInputSchema, SubscribeFramesResultSchema, { kind: "mutation" }),
11112
- pullFrameHandles: method(z.object({
11113
- subscriptionId: z.string(),
11114
- maxCount: z.number().int().positive().default(4)
11115
- }), z.array(FrameHandleSchema).readonly()),
11116
- unsubscribeFrames: method(z.object({ subscriptionId: z.string() }), z.object({ released: z.boolean() }), { kind: "mutation" }),
11117
10932
  setPreBufferDuration: method(z.object({
11118
10933
  brokerId: z.string(),
11119
10934
  seconds: z.number().min(0).max(30)
@@ -14147,72 +13962,18 @@ id: z.union([z.string(), z.number()]) }), {
14147
13962
  })
14148
13963
  }
14149
13964
  };
14150
- /**
14151
- * shm ring usage stats for a `frameSink: 'shm'` decoder session —
14152
- * exposed via `decoder.getShmStats` so downstream consumers can
14153
- * observe ring pressure (slot count, byte budget, hit/miss ratio).
14154
- */
14155
- var ShmRingStatsSchema = z.object({
14156
- sessionId: z.string(),
14157
- slotCount: z.number().int(),
14158
- slotByteLength: z.number().int(),
14159
- segmentBytes: z.number().int(),
14160
- budgetMb: z.number().int(),
14161
- framesWritten: z.number().int(),
14162
- getFrameHits: z.number().int(),
14163
- getFrameMisses: z.number().int()
14164
- });
14165
13965
  var decoderCapability = {
14166
13966
  name: "decoder",
14167
13967
  scope: "system",
14168
13968
  mode: "singleton",
14169
13969
  preferredProvider: "decoder-nodeav",
14170
13970
  methods: {
14171
- supportsCodec: method(z.object({ codec: z.string() }), z.boolean()),
14172
13971
  getInfo: method(z.void(), z.object({
14173
13972
  id: z.string(),
14174
13973
  name: z.string(),
14175
- isPullMode: z.boolean().optional(),
14176
- priority: z.number().optional(),
14177
13974
  hwaccel: z.string().optional(),
14178
13975
  probedBestHwaccel: z.string().optional()
14179
13976
  })),
14180
- createSession: method(DecoderSessionConfigSchema, z.object({
14181
- sessionId: z.string(),
14182
- nodeId: z.string()
14183
- })),
14184
- destroySession: method(z.object({ sessionId: z.string() }), z.void()),
14185
- pushPacket: method(z.object({
14186
- sessionId: z.string(),
14187
- packet: EncodedPacketSchema
14188
- }), z.void()),
14189
- openStream: method(z.object({
14190
- sessionId: z.string(),
14191
- url: z.string()
14192
- }), z.void()),
14193
- pullFrames: method(z.object({
14194
- sessionId: z.string(),
14195
- maxCount: z.number().default(1),
14196
- waitMs: z.number().optional()
14197
- }), z.array(DecodedFrameSchema)),
14198
- pullHandles: method(z.object({
14199
- sessionId: z.string(),
14200
- maxCount: z.number().default(1),
14201
- waitMs: z.number().optional()
14202
- }), z.array(FrameHandleSchema)),
14203
- getFrame: method(z.object({ handle: FrameHandleSchema }), DecodedFrameSchema.nullable()),
14204
- getShmStats: method(z.object({ sessionId: z.string() }), ShmRingStatsSchema.nullable()),
14205
- updateConfig: method(z.object({
14206
- sessionId: z.string(),
14207
- config: DecoderSessionConfigSchema.partial()
14208
- }), z.void()),
14209
- getStats: method(z.object({ sessionId: z.string() }), DecoderStatsSchema),
14210
- listActiveSessions: method(z.void(), z.array(z.object({
14211
- sessionId: z.string(),
14212
- codec: z.string(),
14213
- outputFormat: z.string(),
14214
- createdAtMs: z.number()
14215
- })).readonly()),
14216
13977
  /**
14217
13978
  * Re-run the host platform-probe for the decoder's hwaccel backend
14218
13979
  * and write the detected value into the addon's own global
@@ -23339,8 +23100,8 @@ Object.freeze(Object.fromEntries([{
23339
23100
  var CLUSTER_STEP_SETTING_FIELDS = [{
23340
23101
  stepId: "face-embedding",
23341
23102
  key: "minLandmarkFaceSize",
23342
- label: "Min face size for recognition (detection px)",
23343
- 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.",
23103
+ label: "Min face size to embed (detection-frame px)",
23104
+ 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.",
23344
23105
  type: "slider",
23345
23106
  min: 0,
23346
23107
  max: 64,
@@ -27924,14 +27685,15 @@ var RunnerLocalLoadSchema = z.object({
27924
27685
  * Per-inference-device live load (multi-device C4). One entry per deviceKey
27925
27686
  * this runner currently has attached cameras on, so the orchestrator's second
27926
27687
  * `balance()` pass (over a node's devices) weights on real per-pool session
27927
- * counts. Empty on single-device / pre-multi-device runners. `queueDepthTotal`
27928
- * per device is 0 until the pool backlog gets a public accessor (follow-up).
27688
+ * counts. Empty on single-device / pre-multi-device runners. There is no
27689
+ * per-device queue depth: the inference pool's backlog has no accessor, and
27690
+ * a field that always read 0 was removed rather than shown as a measurement
27691
+ * (D762).
27929
27692
  */
27930
27693
  devices: z.array(z.object({
27931
27694
  deviceKey: z.string(),
27932
27695
  backend: z.string(),
27933
- attachedCameras: z.number(),
27934
- queueDepthTotal: z.number()
27696
+ attachedCameras: z.number()
27935
27697
  })).default([]),
27936
27698
  /** Hardware capability flags reported by this node. */
27937
27699
  hardware: z.object({
@@ -28446,7 +28208,10 @@ var PipelineAssignmentSchema = z.object({
28446
28208
  });
28447
28209
  /**
28448
28210
  * Per-agent load summary surfaced to the load balancer + dashboards.
28449
- * Aggregated from each runner's `getLocalLoad` cap call.
28211
+ * Aggregated from each runner's `getLocalLoad` cap call. In the
28212
+ * `getAgentLoad` report, a single-device node's default-pool sessions (no
28213
+ * `deviceKey`) are credited to its one eligible device in `load.devices` —
28214
+ * the default pool IS that device (D745); the balancer's census stays raw.
28450
28215
  */
28451
28216
  var AgentLoadSummarySchema = z.object({
28452
28217
  nodeId: z.string(),
@@ -28536,8 +28301,14 @@ var CameraBrokerProfileSchema = z.object({
28536
28301
  width: z.number(),
28537
28302
  height: z.number(),
28538
28303
  subscribers: z.number(),
28539
- inFps: z.number(),
28540
- outFps: z.number()
28304
+ /**
28305
+ * Encoded packets/s the broker receives from the camera. null when the
28306
+ * broker's stats read failed — unknown, never 0 (a 0 here reads as a stall).
28307
+ * There is no output rate: decoding runs in the session decode workers, not
28308
+ * in the broker, so the broker's own decoded-frame rate is 0 on every live
28309
+ * camera and is not served (D758).
28310
+ */
28311
+ inFps: z.number().nullable()
28541
28312
  });
28542
28313
  /** Broker block — null when the broker stage is unreachable or inactive. */
28543
28314
  var CameraBrokerStatusSchema = z.object({
@@ -32445,8 +32216,6 @@ var WebrtcStreamChoiceSchema = z.object({
32445
32216
  ]).nullable(),
32446
32217
  /** Input FPS from the camera (null for adaptive). */
32447
32218
  inputFps: z.number().nullable(),
32448
- /** Decoded FPS (null for adaptive). */
32449
- decodeFps: z.number().nullable(),
32450
32219
  /** Bitrate in kbps (null for adaptive). */
32451
32220
  bitrateKbps: z.number().nullable()
32452
32221
  });
@@ -33215,6 +32984,65 @@ var AddonAutoUpdateSchema = ChannelWithInheritSchema;
33215
32984
  var RestartAddonResultSchema = z.unknown();
33216
32985
  var InstallPackageResultSchema = z.unknown();
33217
32986
  var ReloadPackagesResultSchema = z.unknown();
32987
+ /**
32988
+ * What an uninstall did on ONE node.
32989
+ * - `uninstalled` — removed: runner(s) stopped, caps gone, code deleted.
32990
+ * - `not-installed` — the node did not have it (nothing to do).
32991
+ * - `refused` — protected / bootstrap package; nothing touched.
32992
+ * - `failed` — attempted and did not complete; `error` says why.
32993
+ * - `pending-reconnect` — the node is OFFLINE: its record was pruned so the
32994
+ * back-fill never returns the package, and the stale-addon sweep removes the
32995
+ * copy when the node registers again (only once the hub no longer has it).
32996
+ */
32997
+ var UninstallNodeOutcomeSchema = z.enum([
32998
+ "uninstalled",
32999
+ "not-installed",
33000
+ "refused",
33001
+ "failed",
33002
+ "pending-reconnect"
33003
+ ]);
33004
+ var UninstallNodeResultSchema = z.object({
33005
+ nodeId: z.string(),
33006
+ outcome: UninstallNodeOutcomeSchema,
33007
+ error: z.string().optional(),
33008
+ addonIds: z.array(z.string()).readonly(),
33009
+ runnersStopped: z.array(z.string()).readonly(),
33010
+ warnings: z.array(z.string()).readonly()
33011
+ });
33012
+ var UninstallPackageResultSchema = z.object({
33013
+ /** Every targeted node ended `uninstalled`, `not-installed` or `pending-reconnect`. */
33014
+ success: z.boolean(),
33015
+ packageName: z.string(),
33016
+ results: z.array(UninstallNodeResultSchema).readonly()
33017
+ });
33018
+ /**
33019
+ * One node that has a package. `source: 'live'` = the node answered now (the
33020
+ * hub's installer, or an agent's `$agent.status`); `'recorded'` = an offline
33021
+ * node's last declared roster — the copy may or may not still be on disk.
33022
+ */
33023
+ var PackageInstallationSchema = z.object({
33024
+ packageName: z.string(),
33025
+ nodeId: z.string(),
33026
+ nodeName: z.string(),
33027
+ isHub: z.boolean(),
33028
+ isOnline: z.boolean(),
33029
+ version: z.string().nullable(),
33030
+ addonIds: z.array(z.string()).readonly(),
33031
+ source: z.enum(["live", "recorded"]),
33032
+ /** The hub installs this package too. `false` on an agent row = an orphan. */
33033
+ onHub: z.boolean()
33034
+ });
33035
+ /**
33036
+ * `unreachable` lists online agents whose status read FAILED — absence from
33037
+ * `installations` is only "not installed" for a node that answered (D315).
33038
+ */
33039
+ var PackageInstallationsSchema = z.object({
33040
+ installations: z.array(PackageInstallationSchema).readonly(),
33041
+ unreachable: z.array(z.object({
33042
+ nodeId: z.string(),
33043
+ error: z.string()
33044
+ })).readonly()
33045
+ });
33218
33046
  var BulkUpdateItemStatusSchema = z.enum([
33219
33047
  "queued",
33220
33048
  "updating",
@@ -33323,10 +33151,31 @@ var addonsCapability = {
33323
33151
  }),
33324
33152
  isWorkspaceAvailable: method(z.void(), z.boolean()),
33325
33153
  listWorkspacePackages: method(z.void(), z.array(z.unknown()).readonly()),
33326
- uninstallPackage: method(z.object({ packageName: z.string() }), z.unknown(), {
33154
+ /**
33155
+ * Uninstall a package. `nodeId` omitted (or `'hub'`) uninstalls on the hub
33156
+ * — the original behaviour, which still THROWS on failure. An agent
33157
+ * `nodeId` removes it from that agent through `$agent.undeploy`
33158
+ * (runners stopped, caps deregistered, code deleted) and prunes the node's
33159
+ * declared roster so the back-fill never returns it. `everywhere: true`
33160
+ * does both for every node that has it (agents first, hub last); offline
33161
+ * nodes answer `pending-reconnect`. Node-level failures in those two modes
33162
+ * are REPORTED per node, never thrown. Protected packages are refused.
33163
+ */
33164
+ uninstallPackage: method(z.object({
33165
+ packageName: z.string().min(1),
33166
+ nodeId: z.string().optional(),
33167
+ everywhere: z.boolean().optional()
33168
+ }), UninstallPackageResultSchema, {
33327
33169
  kind: "mutation",
33328
33170
  auth: "admin"
33329
33171
  }),
33172
+ /**
33173
+ * Which nodes have a package (or, with no `packageName`, every package on
33174
+ * every node). Hub from its installer, online agents from `$agent.status`
33175
+ * (in parallel, bounded), offline agents from their declared roster.
33176
+ * Drives the uninstall confirm and the Addons page's "not on the hub" list.
33177
+ */
33178
+ listInstallations: method(z.object({ packageName: z.string().optional() }), PackageInstallationsSchema, { auth: "admin" }),
33330
33179
  reloadPackages: method(z.void(), ReloadPackagesResultSchema, {
33331
33180
  kind: "mutation",
33332
33181
  auth: "admin"
@@ -47879,6 +47728,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
47879
47728
  addonId: null,
47880
47729
  access: "view"
47881
47730
  },
47731
+ "addons.listInstallations": {
47732
+ capName: "addons",
47733
+ capScope: "system",
47734
+ addonId: null,
47735
+ access: "view"
47736
+ },
47882
47737
  "addons.listJobs": {
47883
47738
  capName: "addons",
47884
47739
  capScope: "system",
@@ -49061,90 +48916,18 @@ var METHOD_ACCESS_MAP = Object.freeze({
49061
48916
  addonId: null,
49062
48917
  access: "create"
49063
48918
  },
49064
- "decoder.createSession": {
49065
- capName: "decoder",
49066
- capScope: "system",
49067
- addonId: null,
49068
- access: "view"
49069
- },
49070
- "decoder.destroySession": {
49071
- capName: "decoder",
49072
- capScope: "system",
49073
- addonId: null,
49074
- access: "delete"
49075
- },
49076
- "decoder.getFrame": {
49077
- capName: "decoder",
49078
- capScope: "system",
49079
- addonId: null,
49080
- access: "view"
49081
- },
49082
48919
  "decoder.getInfo": {
49083
48920
  capName: "decoder",
49084
48921
  capScope: "system",
49085
48922
  addonId: null,
49086
48923
  access: "view"
49087
48924
  },
49088
- "decoder.getShmStats": {
49089
- capName: "decoder",
49090
- capScope: "system",
49091
- addonId: null,
49092
- access: "view"
49093
- },
49094
- "decoder.getStats": {
49095
- capName: "decoder",
49096
- capScope: "system",
49097
- addonId: null,
49098
- access: "view"
49099
- },
49100
- "decoder.listActiveSessions": {
49101
- capName: "decoder",
49102
- capScope: "system",
49103
- addonId: null,
49104
- access: "view"
49105
- },
49106
- "decoder.openStream": {
49107
- capName: "decoder",
49108
- capScope: "system",
49109
- addonId: null,
49110
- access: "view"
49111
- },
49112
- "decoder.pullFrames": {
49113
- capName: "decoder",
49114
- capScope: "system",
49115
- addonId: null,
49116
- access: "view"
49117
- },
49118
- "decoder.pullHandles": {
49119
- capName: "decoder",
49120
- capScope: "system",
49121
- addonId: null,
49122
- access: "view"
49123
- },
49124
- "decoder.pushPacket": {
49125
- capName: "decoder",
49126
- capScope: "system",
49127
- addonId: null,
49128
- access: "view"
49129
- },
49130
48925
  "decoder.reprobeHwaccel": {
49131
48926
  capName: "decoder",
49132
48927
  capScope: "system",
49133
48928
  addonId: null,
49134
48929
  access: "create"
49135
48930
  },
49136
- "decoder.supportsCodec": {
49137
- capName: "decoder",
49138
- capScope: "system",
49139
- addonId: null,
49140
- access: "view"
49141
- },
49142
- "decoder.updateConfig": {
49143
- capName: "decoder",
49144
- capScope: "system",
49145
- addonId: null,
49146
- access: "view"
49147
- },
49148
48931
  "detectionPipeline.applyDeviceSettingsPatch": {
49149
48932
  capName: "detection-pipeline",
49150
48933
  capScope: "device",
@@ -54191,12 +53974,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
54191
53974
  addonId: null,
54192
53975
  access: "view"
54193
53976
  },
54194
- "streamBroker.pullFrameHandles": {
54195
- capName: "stream-broker",
54196
- capScope: "system",
54197
- addonId: null,
54198
- access: "view"
54199
- },
54200
53977
  "streamBroker.regenerateRtspToken": {
54201
53978
  capName: "stream-broker",
54202
53979
  capScope: "system",
@@ -54263,12 +54040,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
54263
54040
  addonId: null,
54264
54041
  access: "create"
54265
54042
  },
54266
- "streamBroker.subscribeFrames": {
54267
- capName: "stream-broker",
54268
- capScope: "system",
54269
- addonId: null,
54270
- access: "create"
54271
- },
54272
54043
  "streamBroker.unassignProfile": {
54273
54044
  capName: "stream-broker",
54274
54045
  capScope: "system",
@@ -54281,12 +54052,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
54281
54052
  addonId: null,
54282
54053
  access: "create"
54283
54054
  },
54284
- "streamBroker.unsubscribeFrames": {
54285
- capName: "stream-broker",
54286
- capScope: "system",
54287
- addonId: null,
54288
- access: "create"
54289
- },
54290
54055
  "streamCatalog.getCatalog": {
54291
54056
  capName: "stream-catalog",
54292
54057
  capScope: "device",
@@ -57055,11 +56820,6 @@ Object.freeze({
57055
56820
  form: "single",
57056
56821
  optional: false
57057
56822
  }],
57058
- "decoder.createSession": [{
57059
- name: "deviceId",
57060
- form: "single",
57061
- optional: true
57062
- }],
57063
56823
  "detectionPipeline.applyDeviceSettingsPatch": [{
57064
56824
  name: "deviceId",
57065
56825
  form: "single",