@remavideo/sdk 0.11.2 → 0.12.0

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 (2) hide show
  1. package/dist/index.d.ts +24 -1
  2. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -325,6 +325,22 @@ interface WorkflowResourceUsageMsg {
325
325
  rootPid: number;
326
326
  ts: number;
327
327
  }
328
+ /** Host-wide CPU and memory usage for the machine the server runs on. */
329
+ interface SystemResourceUsageMsg {
330
+ /** Average CPU percent across all cores. */
331
+ cpuPercent: number;
332
+ /** Per-core CPU percent, in `os.cpus()` order. */
333
+ cpuCorePercents: number[];
334
+ memory: {
335
+ totalBytes: number;
336
+ usedBytes: number;
337
+ freeBytes: number;
338
+ percent: number;
339
+ };
340
+ /** 1/5/15-minute load averages (`os.loadavg()`); always `[0, 0, 0]` on Windows. */
341
+ loadAverage: [number, number, number];
342
+ ts: number;
343
+ }
328
344
  interface WorkflowInfo {
329
345
  id: string;
330
346
  name?: string;
@@ -407,6 +423,8 @@ interface ServiceContext {
407
423
  observeNode(workflowId: string, nodeId: string, monitorName: string, signal: AbortSignal): AsyncGenerator<MonitorEventMsg>;
408
424
  /** Per-workflow CPU/memory usage, aggregated across the worker process and everything it spawned. */
409
425
  workflowResourceUsage(workflowId: string, signal: AbortSignal): AsyncGenerator<WorkflowResourceUsageMsg>;
426
+ /** Host-wide CPU/memory usage for the machine the server runs on. */
427
+ systemResourceUsage(signal: AbortSignal): AsyncGenerator<SystemResourceUsageMsg>;
410
428
  createWorkflow(opts: {
411
429
  workflowId?: string | undefined;
412
430
  name?: string | undefined;
@@ -805,6 +823,11 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
805
823
  output: AsyncIterable<WorkflowResourceUsageMsg, void, any>;
806
824
  meta: object;
807
825
  }>;
826
+ systemResourceUsage: _trpc_server.TRPCSubscriptionProcedure<{
827
+ input: void;
828
+ output: AsyncIterable<SystemResourceUsageMsg, void, any>;
829
+ meta: object;
830
+ }>;
808
831
  workflow: _trpc_server.TRPCBuiltRouter<{
809
832
  ctx: ServiceContext;
810
833
  meta: object;
@@ -1899,4 +1922,4 @@ declare const selectAudio: "AUDIO";
1899
1922
  declare const selectCaptions: "CAPTIONS";
1900
1923
  declare const selectAll: "ALL";
1901
1924
 
1902
- export { type AllSubscriptionSpec, type AppRouter, type AudioRenditionOptions, type AudioSubscriptionSpec, BaseNode, BufferNode, type BufferSettings, CambAiTranslateNode, type CambAiTranslateSettings, type CaptionMode, CaptionSourceNode, type CaptionSourceSettings, type CaptionsSubscriptionSpec, Cea608EncoderNode, type Cea608EncoderSettings, type CodecSpec, FfprobeMonitorNode, type FfprobeMonitorSettings, FileInputNode, type FileInputSettings, FileOutputNode, type FileOutputSettings, GateNode, type GateSettings, GeminiTranslateNode, type GeminiTranslateSettings, type HealthStatus, type HlsDestination, HlsOutputNode, type HlsOutputSettings, type MonitorDescriptorMsg, type MonitorEventMsg, type NodeCallbacks, type NodeEventKind, type NodeEvents, type NodeNotificationKind, type NodeState, NodeStreamInputNode, type NodeStreamInputSettings, type PipelineSnapshot, Rema, type RemaClientOptions, RtmpAnnouncerNode, type RtmpAnnouncerSettings, type RtmpConnectionInfo, RtmpMultiplexerNode, type RtmpMultiplexerSettings, RtmpOutputNode, type RtmpOutputSettings, RtmpReaderNode, type RtmpReaderSettings, RtmpStreamNode, SrtAnnouncerNode, type SrtAnnouncerSettings, type SrtConnectionInfo, SrtOutputNode, type SrtOutputSettings, SrtReaderNode, type SrtReaderSettings, type StreamSelector, type SubscriptionSpec, type TrackInfo, type VideoRenditionOptions, type VideoSubscriptionSpec, type VisEdge, type VisNode, Workflow, type WorkflowCallbacks, type WorkflowEvents, type WorkflowInfo, type WorkflowResourceUsageMsg, createNodeStreamInputNode, selectAll, selectAudio, selectCaptions, selectVideo };
1925
+ export { type AllSubscriptionSpec, type AppRouter, type AudioRenditionOptions, type AudioSubscriptionSpec, BaseNode, BufferNode, type BufferSettings, CambAiTranslateNode, type CambAiTranslateSettings, type CaptionMode, CaptionSourceNode, type CaptionSourceSettings, type CaptionsSubscriptionSpec, Cea608EncoderNode, type Cea608EncoderSettings, type CodecSpec, FfprobeMonitorNode, type FfprobeMonitorSettings, FileInputNode, type FileInputSettings, FileOutputNode, type FileOutputSettings, GateNode, type GateSettings, GeminiTranslateNode, type GeminiTranslateSettings, type HealthStatus, type HlsDestination, HlsOutputNode, type HlsOutputSettings, type MonitorDescriptorMsg, type MonitorEventMsg, type NodeCallbacks, type NodeEventKind, type NodeEvents, type NodeNotificationKind, type NodeState, NodeStreamInputNode, type NodeStreamInputSettings, type PipelineSnapshot, Rema, type RemaClientOptions, RtmpAnnouncerNode, type RtmpAnnouncerSettings, type RtmpConnectionInfo, RtmpMultiplexerNode, type RtmpMultiplexerSettings, RtmpOutputNode, type RtmpOutputSettings, RtmpReaderNode, type RtmpReaderSettings, RtmpStreamNode, SrtAnnouncerNode, type SrtAnnouncerSettings, type SrtConnectionInfo, SrtOutputNode, type SrtOutputSettings, SrtReaderNode, type SrtReaderSettings, type StreamSelector, type SubscriptionSpec, type SystemResourceUsageMsg, type TrackInfo, type VideoRenditionOptions, type VideoSubscriptionSpec, type VisEdge, type VisNode, Workflow, type WorkflowCallbacks, type WorkflowEvents, type WorkflowInfo, type WorkflowResourceUsageMsg, createNodeStreamInputNode, selectAll, selectAudio, selectCaptions, selectVideo };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remavideo/sdk",
3
- "version": "0.11.2",
3
+ "version": "0.12.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -32,7 +32,7 @@
32
32
  "tsx": "^4.21.0",
33
33
  "typescript": "^5.8.3",
34
34
  "vitest": "^3.0.0",
35
- "@remavideo/server": "0.11.2"
35
+ "@remavideo/server": "0.12.0"
36
36
  },
37
37
  "scripts": {
38
38
  "build": "tsup",