@push.rocks/smartrust 2.2.0 → 2.3.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.
@@ -5,6 +5,20 @@ export interface IManagementRequest {
5
5
  id: string;
6
6
  method: string;
7
7
  params: Record<string, any>;
8
+ /** Value-free metadata for an associated one-shot binary frame. */
9
+ sensitive?: IManagementSensitivePayload;
10
+ }
11
+
12
+ export interface IManagementSensitivePayload {
13
+ protocol: 'smartrust-sensitive-v1';
14
+ fileDescriptor: number;
15
+ byteLength: number;
16
+ }
17
+
18
+ export interface IManagementSensitiveAck {
19
+ protocol: 'smartrust-sensitive-v1';
20
+ consumed: true;
21
+ byteLength: number;
8
22
  }
9
23
 
10
24
  /**
@@ -16,6 +30,8 @@ export interface IManagementResponse {
16
30
  result?: any;
17
31
  error?: string;
18
32
  errorCode?: string;
33
+ /** Required after the receiver consumed the exact associated binary frame. */
34
+ sensitiveAck?: IManagementSensitiveAck;
19
35
  }
20
36
 
21
37
  /**
@@ -35,6 +35,12 @@ export interface IRustTransport extends plugins.events.EventEmitter {
35
35
  /** Write a string to the transport. Handles backpressure. */
36
36
  write(data: string): Promise<void>;
37
37
 
38
+ /** Child descriptor for the optional one-shot sensitive byte pipe. */
39
+ readonly sensitiveFileDescriptor?: number | null;
40
+
41
+ /** Write and close one correlated binary frame. Available only in stdio mode. */
42
+ writeSensitiveFrame?(requestId: string, data: Uint8Array<ArrayBuffer>): Promise<void>;
43
+
38
44
  /** Disconnect the transport. For stdio: kills the process. For socket: closes the connection. */
39
45
  disconnect(): void;
40
46
 
package/ts/plugins.ts CHANGED
@@ -5,8 +5,9 @@ import * as childProcess from 'child_process';
5
5
  import * as events from 'events';
6
6
  import * as url from 'url';
7
7
  import * as net from 'net';
8
+ import * as stream from 'stream';
8
9
 
9
- export { path, fs, childProcess, events, url, net };
10
+ export { path, fs, childProcess, events, url, net, stream };
10
11
 
11
12
  // @push.rocks scope
12
13
  import * as smartpath from '@push.rocks/smartpath';