@pyrokine/mcp-ssh 2.4.1 → 2.4.2

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.
@@ -23,7 +23,7 @@ type ValidatedLocalUploadSource = {
23
23
  stats: fs.Stats;
24
24
  };
25
25
  export declare function validateUploadFileSource(localPath: string): ValidatedLocalUploadSource;
26
- export declare function validateSyncUploadSource(localPath: string, followSymlinks?: boolean, _exclude?: string[]): ValidatedLocalUploadSource;
26
+ export declare function validateSyncUploadSource(localPath: string, followSymlinks?: boolean): ValidatedLocalUploadSource;
27
27
  export declare function probeLocalPath(localPath: string, followSymlinks?: boolean): {
28
28
  exists: boolean;
29
29
  inputPath: string;
@@ -59,16 +59,17 @@ export declare function hashRemoteFileDigest(alias: string, remotePath: string,
59
59
  export declare class RemoteRenameNotStartedError extends Error {
60
60
  constructor(message: string);
61
61
  }
62
- export declare function renameRemoteFile(alias: string, sourcePath: string, targetPath: string, replaceExisting?: boolean): Promise<void>;
62
+ export declare function renameRemoteFile(alias: string, sourcePath: string, targetPath: string, replaceExisting?: boolean, timeout?: number): Promise<void>;
63
63
  export declare function removeRemoteFile(alias: string, remotePath: string): Promise<void>;
64
64
  export declare class UploadFileError extends Error {
65
65
  readonly remoteCreated: boolean;
66
+ readonly details?: Record<string, unknown>;
66
67
  constructor(message: string, remoteCreated: boolean, options?: ErrorOptions);
67
68
  }
68
69
  /**
69
70
  * 上传文件
70
71
  */
71
- export declare function uploadFile(alias: string, localPath: string, remotePath: string, onProgress?: (progress: TransferProgress) => void, sharedSftp?: SFTPWrapper, createMode?: number, signal?: AbortSignal, followSymlinks?: boolean, exclusive?: boolean): Promise<{
72
+ export declare function uploadFile(alias: string, localPath: string, remotePath: string, onProgress?: (progress: TransferProgress) => void, sharedSftp?: SFTPWrapper, createMode?: number, signal?: AbortSignal, followSymlinks?: boolean, exclusive?: boolean, timeout?: number): Promise<{
72
73
  success: boolean;
73
74
  size: number;
74
75
  createMode: string;
@@ -76,7 +77,7 @@ export declare function uploadFile(alias: string, localPath: string, remotePath:
76
77
  /**
77
78
  * 下载文件
78
79
  */
79
- export declare function downloadFile(alias: string, remotePath: string, localPath: string, onProgress?: (progress: TransferProgress) => void, sharedSftp?: SFTPWrapper, signal?: AbortSignal): Promise<{
80
+ export declare function downloadFile(alias: string, remotePath: string, localPath: string, onProgress?: (progress: TransferProgress) => void, sharedSftp?: SFTPWrapper, signal?: AbortSignal, timeout?: number): Promise<{
80
81
  success: boolean;
81
82
  size: number;
82
83
  atomic: true;
@@ -89,13 +90,17 @@ type ReadFileOptions = {
89
90
  offset?: number;
90
91
  tail?: boolean;
91
92
  lineRange?: string;
93
+ timeout?: number;
92
94
  };
93
95
  type ReadFileResult = {
94
96
  content: string;
95
97
  size: number;
96
98
  total_size: number;
97
99
  read_offset: number;
100
+ requested_offset?: number;
98
101
  read_bytes: number;
102
+ read_end?: number;
103
+ next_offset?: number;
99
104
  remaining_bytes?: number;
100
105
  sample_kind: ReadFileSampleKind;
101
106
  truncated: boolean;
@@ -113,22 +118,22 @@ export declare function readFile(alias: string, remotePath: string, options?: nu
113
118
  /**
114
119
  * 写入远程文件
115
120
  */
116
- export declare function writeFile(alias: string, remotePath: string, content: string, append?: boolean): Promise<{
121
+ export declare function writeFile(alias: string, remotePath: string, content: string, append?: boolean, timeout?: number): Promise<{
117
122
  success: boolean;
118
123
  size: number;
119
124
  }>;
120
125
  /**
121
126
  * 列出目录内容
122
127
  */
123
- export declare function listDir(alias: string, remotePath: string, showHidden?: boolean, sharedSftp?: SFTPWrapper): Promise<FileInfo[]>;
128
+ export declare function listDir(alias: string, remotePath: string, showHidden?: boolean, sharedSftp?: SFTPWrapper, timeout?: number): Promise<FileInfo[]>;
124
129
  /**
125
130
  * 获取文件信息
126
131
  */
127
- export declare function getFileInfo(alias: string, remotePath: string): Promise<FileInfo>;
132
+ export declare function getFileInfo(alias: string, remotePath: string, timeout?: number): Promise<FileInfo>;
128
133
  /**
129
134
  * 创建目录
130
135
  */
131
- export declare function mkdir(alias: string, remotePath: string, recursive?: boolean, sharedSftp?: SFTPWrapper): Promise<boolean>;
136
+ export declare function mkdir(alias: string, remotePath: string, recursive?: boolean, sharedSftp?: SFTPWrapper, timeout?: number): Promise<boolean>;
132
137
  /**
133
138
  * 检查远程是否安装 rsync
134
139
  */