phirepass-channel 0.1.255 → 0.1.257

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "phirepass-channel",
3
3
  "type": "module",
4
- "version": "0.1.255",
4
+ "version": "0.1.257",
5
5
  "license": "SEE LICENSE IN ../LICENCE",
6
6
  "repository": {
7
7
  "type": "git",
@@ -21,6 +21,12 @@ export class Channel {
21
21
  open_sftp_tunnel(node_id: string, username?: string | null, password?: string | null, msg_id?: number | null): void;
22
22
  open_ssh_tunnel(node_id: string, username?: string | null, password?: string | null, msg_id?: number | null): void;
23
23
  send_sftp_delete(node_id: string, sid: number, path: string, filename: string, msg_id?: number | null): void;
24
+ /**
25
+ * Send a pipelining ACK to the agent: acknowledges all chunks with index ≤ ack_up_to
26
+ * so the agent's sliding window advances and it can push the next batch.
27
+ * Call this after processing each received SFTPDownloadChunk (or every N chunks).
28
+ */
29
+ send_sftp_download_ack(node_id: string, sid: number, download_id: number, ack_up_to: number): void;
24
30
  send_sftp_download_chunk(node_id: string, sid: number, download_id: number, chunk_index: number, msg_id?: number | null): void;
25
31
  send_sftp_download_start(node_id: string, sid: number, path: string, filename: string, msg_id?: number | null): void;
26
32
  send_sftp_list_data(node_id: string, sid: number, path: string, msg_id?: number | null): void;
@@ -69,6 +75,7 @@ export interface InitOutput {
69
75
  readonly channel_open_sftp_tunnel: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
70
76
  readonly channel_open_ssh_tunnel: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
71
77
  readonly channel_send_sftp_delete: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
78
+ readonly channel_send_sftp_download_ack: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
72
79
  readonly channel_send_sftp_download_chunk: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
73
80
  readonly channel_send_sftp_download_start: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
74
81
  readonly channel_send_sftp_list_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
@@ -189,6 +189,20 @@ export class Channel {
189
189
  const len2 = WASM_VECTOR_LEN;
190
190
  wasm.channel_send_sftp_delete(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1, ptr2, len2, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
191
191
  }
192
+ /**
193
+ * Send a pipelining ACK to the agent: acknowledges all chunks with index ≤ ack_up_to
194
+ * so the agent's sliding window advances and it can push the next batch.
195
+ * Call this after processing each received SFTPDownloadChunk (or every N chunks).
196
+ * @param {string} node_id
197
+ * @param {number} sid
198
+ * @param {number} download_id
199
+ * @param {number} ack_up_to
200
+ */
201
+ send_sftp_download_ack(node_id, sid, download_id, ack_up_to) {
202
+ const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
203
+ const len0 = WASM_VECTOR_LEN;
204
+ wasm.channel_send_sftp_download_ack(this.__wbg_ptr, ptr0, len0, sid, download_id, ack_up_to);
205
+ }
192
206
  /**
193
207
  * @param {string} node_id
194
208
  * @param {number} sid
@@ -405,7 +419,7 @@ function __wbg_get_imports() {
405
419
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
406
420
  return addHeapObject(ret);
407
421
  }, arguments); },
408
- __wbg_info_71700a7ace75ba5a: function(arg0, arg1) {
422
+ __wbg_info_b5ffd35ec754c57f: function(arg0, arg1) {
409
423
  console.info(getStringFromWasm0(arg0, arg1));
410
424
  },
411
425
  __wbg_instanceof_ArrayBuffer_8f49811467741499: function(arg0) {
@@ -477,7 +491,7 @@ function __wbg_get_imports() {
477
491
  __wbg_set_onopen_db452f4233e99d7d: function(arg0, arg1) {
478
492
  getObject(arg0).onopen = getObject(arg1);
479
493
  },
480
- __wbg_warn_bcd459698e13b32f: function(arg0, arg1) {
494
+ __wbg_warn_708b527b415ef391: function(arg0, arg1) {
481
495
  console.warn(getStringFromWasm0(arg0, arg1));
482
496
  },
483
497
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
Binary file