@blaxel/core 0.2.51 → 0.2.52-dev.8

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 (43) hide show
  1. package/dist/cjs/.tsbuildinfo +1 -1
  2. package/dist/cjs/common/autoload.js +3 -0
  3. package/dist/cjs/common/sentry.js +219 -0
  4. package/dist/cjs/common/settings.js +13 -47
  5. package/dist/cjs/common/version.js +6 -0
  6. package/dist/cjs/sandbox/client/sdk.gen.js +124 -1
  7. package/dist/cjs/sandbox/filesystem/filesystem.js +81 -1
  8. package/dist/cjs/types/common/sentry.d.ts +17 -0
  9. package/dist/cjs/types/common/settings.d.ts +2 -1
  10. package/dist/cjs/types/common/version.d.ts +2 -0
  11. package/dist/cjs/types/sandbox/client/sdk.gen.d.ts +36 -1
  12. package/dist/cjs/types/sandbox/client/types.gen.d.ts +315 -0
  13. package/dist/cjs/types/sandbox/filesystem/filesystem.d.ts +5 -2
  14. package/dist/cjs/types/sandbox/filesystem/types.d.ts +20 -0
  15. package/dist/cjs-browser/.tsbuildinfo +1 -1
  16. package/dist/cjs-browser/common/autoload.js +3 -0
  17. package/dist/cjs-browser/common/sentry.js +219 -0
  18. package/dist/cjs-browser/common/settings.js +13 -47
  19. package/dist/cjs-browser/common/version.js +6 -0
  20. package/dist/cjs-browser/sandbox/client/sdk.gen.js +124 -1
  21. package/dist/cjs-browser/sandbox/filesystem/filesystem.js +81 -1
  22. package/dist/cjs-browser/types/common/sentry.d.ts +17 -0
  23. package/dist/cjs-browser/types/common/settings.d.ts +2 -1
  24. package/dist/cjs-browser/types/common/version.d.ts +2 -0
  25. package/dist/cjs-browser/types/sandbox/client/sdk.gen.d.ts +36 -1
  26. package/dist/cjs-browser/types/sandbox/client/types.gen.d.ts +315 -0
  27. package/dist/cjs-browser/types/sandbox/filesystem/filesystem.d.ts +5 -2
  28. package/dist/cjs-browser/types/sandbox/filesystem/types.d.ts +20 -0
  29. package/dist/esm/.tsbuildinfo +1 -1
  30. package/dist/esm/common/autoload.js +3 -0
  31. package/dist/esm/common/sentry.js +181 -0
  32. package/dist/esm/common/settings.js +13 -47
  33. package/dist/esm/common/version.js +3 -0
  34. package/dist/esm/sandbox/client/sdk.gen.js +116 -0
  35. package/dist/esm/sandbox/filesystem/filesystem.js +82 -2
  36. package/dist/esm-browser/.tsbuildinfo +1 -1
  37. package/dist/esm-browser/common/autoload.js +3 -0
  38. package/dist/esm-browser/common/sentry.js +181 -0
  39. package/dist/esm-browser/common/settings.js +13 -47
  40. package/dist/esm-browser/common/version.js +3 -0
  41. package/dist/esm-browser/sandbox/client/sdk.gen.js +116 -0
  42. package/dist/esm-browser/sandbox/filesystem/filesystem.js +82 -2
  43. package/package.json +4 -5
@@ -1,5 +1,5 @@
1
1
  import { type Options as ClientOptions, type TDataShape, type Client } from '@hey-api/client-fetch';
2
- import type { DeleteData, GetData, OptionsData, PatchData, PostData, PutData, PutCodegenFastapplyByPathData, GetCodegenRerankingByPathData, GetFilesystemMultipartData, DeleteFilesystemMultipartByUploadIdAbortData, PostFilesystemMultipartByUploadIdCompleteData, PutFilesystemMultipartByUploadIdPartData, GetFilesystemMultipartByUploadIdPartsData, PostFilesystemMultipartInitiateByPathData, DeleteFilesystemByPathData, GetFilesystemByPathData, PutFilesystemByPathData, DeleteNetworkProcessByPidMonitorData, PostNetworkProcessByPidMonitorData, GetNetworkProcessByPidPortsData, GetProcessData, PostProcessData, DeleteProcessByIdentifierData, GetProcessByIdentifierData, DeleteProcessByIdentifierKillData, GetProcessByIdentifierLogsData, GetProcessByIdentifierLogsStreamData, GetWatchFilesystemByPathData } from './types.gen';
2
+ import type { DeleteData, GetData, OptionsData, PatchData, PostData, PutData, PutCodegenFastapplyByPathData, GetCodegenRerankingByPathData, GetFilesystemContentSearchByPathData, GetFilesystemFindByPathData, GetFilesystemMultipartData, DeleteFilesystemMultipartByUploadIdAbortData, PostFilesystemMultipartByUploadIdCompleteData, PutFilesystemMultipartByUploadIdPartData, GetFilesystemMultipartByUploadIdPartsData, PostFilesystemMultipartInitiateByPathData, GetFilesystemSearchByPathData, DeleteFilesystemByPathData, GetFilesystemByPathData, PutFilesystemByPathData, DeleteFilesystemTreeByPathData, GetFilesystemTreeByPathData, PutFilesystemTreeByPathData, DeleteNetworkProcessByPidMonitorData, PostNetworkProcessByPidMonitorData, GetNetworkProcessByPidPortsData, GetProcessData, PostProcessData, DeleteProcessByIdentifierData, GetProcessByIdentifierData, DeleteProcessByIdentifierKillData, GetProcessByIdentifierLogsData, GetProcessByIdentifierLogsStreamData, GetWatchFilesystemByPathData, GetWsData } from './types.gen';
3
3
  export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
4
4
  /**
5
5
  * You can provide a client instance returned by `createClient()` instead of
@@ -84,6 +84,16 @@ export declare const putCodegenFastapplyByPath: <ThrowOnError extends boolean =
84
84
  * The response will be a list of file paths and contents ordered from most relevant to least relevant.
85
85
  */
86
86
  export declare const getCodegenRerankingByPath: <ThrowOnError extends boolean = false>(options: Options<GetCodegenRerankingByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").RerankingResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
87
+ /**
88
+ * Search for text content in files
89
+ * Searches for text content inside files using ripgrep. Returns matching lines with context.
90
+ */
91
+ export declare const getFilesystemContentSearchByPath: <ThrowOnError extends boolean = false>(options: Options<GetFilesystemContentSearchByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").ContentSearchResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
92
+ /**
93
+ * Find files and directories
94
+ * Finds files and directories using the find command.
95
+ */
96
+ export declare const getFilesystemFindByPath: <ThrowOnError extends boolean = false>(options: Options<GetFilesystemFindByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").FindResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
87
97
  /**
88
98
  * List multipart uploads
89
99
  * List all active multipart uploads
@@ -114,6 +124,11 @@ export declare const getFilesystemMultipartByUploadIdParts: <ThrowOnError extend
114
124
  * Initiate a multipart upload session for a file
115
125
  */
116
126
  export declare const postFilesystemMultipartInitiateByPath: <ThrowOnError extends boolean = false>(options: Options<PostFilesystemMultipartInitiateByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").MultipartInitiateResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
127
+ /**
128
+ * Fuzzy search for files and directories
129
+ * Performs fuzzy search on filesystem paths using fuzzy matching algorithm. Optimized alternative to find and grep commands.
130
+ */
131
+ export declare const getFilesystemSearchByPath: <ThrowOnError extends boolean = false>(options: Options<GetFilesystemSearchByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").FuzzySearchResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
117
132
  /**
118
133
  * Delete file or directory
119
134
  * Delete a file or directory
@@ -129,6 +144,21 @@ export declare const getFilesystemByPath: <ThrowOnError extends boolean = false>
129
144
  * Create or update a file or directory
130
145
  */
131
146
  export declare const putFilesystemByPath: <ThrowOnError extends boolean = false>(options: Options<PutFilesystemByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").SuccessResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
147
+ /**
148
+ * Delete directory tree
149
+ * Delete a directory tree recursively
150
+ */
151
+ export declare const deleteFilesystemTreeByPath: <ThrowOnError extends boolean = false>(options: Options<DeleteFilesystemTreeByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").SuccessResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
152
+ /**
153
+ * Get directory tree
154
+ * Get a recursive directory tree structure starting from the specified path
155
+ */
156
+ export declare const getFilesystemTreeByPath: <ThrowOnError extends boolean = false>(options: Options<GetFilesystemTreeByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").File | import("./types.gen").Directory | import("./types.gen").FileWithContent | Blob, import("./types.gen").ErrorResponse, ThrowOnError>;
157
+ /**
158
+ * Create or update directory tree
159
+ * Create or update multiple files within a directory tree structure
160
+ */
161
+ export declare const putFilesystemTreeByPath: <ThrowOnError extends boolean = false>(options: Options<PutFilesystemTreeByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").File | import("./types.gen").Directory | import("./types.gen").FileWithContent | Blob, import("./types.gen").ErrorResponse, ThrowOnError>;
132
162
  /**
133
163
  * Stop monitoring ports for a process
134
164
  * Stop monitoring for new ports opened by a process
@@ -190,3 +220,8 @@ export declare const getProcessByIdentifierLogsStream: <ThrowOnError extends boo
190
220
  * Streams the path of modified files (one per line) in the given directory. Closes when the client disconnects.
191
221
  */
192
222
  export declare const getWatchFilesystemByPath: <ThrowOnError extends boolean = false>(options: Options<GetWatchFilesystemByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<string, import("./types.gen").ErrorResponse, ThrowOnError>;
223
+ /**
224
+ * WebSocket endpoint
225
+ * WebSocket endpoint for all sandbox operations
226
+ */
227
+ export declare const getWs: <ThrowOnError extends boolean = false>(options?: Options<GetWsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<unknown, unknown, ThrowOnError>;
@@ -10,6 +10,18 @@ export type ApplyEditResponse = {
10
10
  success?: boolean;
11
11
  updatedContent?: string;
12
12
  };
13
+ export type ContentSearchMatch = {
14
+ column?: number;
15
+ context?: string;
16
+ line?: number;
17
+ path?: string;
18
+ text?: string;
19
+ };
20
+ export type ContentSearchResponse = {
21
+ matches?: Array<ContentSearchMatch>;
22
+ query?: string;
23
+ total?: number;
24
+ };
13
25
  export type Directory = {
14
26
  files: Array<File>;
15
27
  name: string;
@@ -46,6 +58,29 @@ export type FileWithContent = {
46
58
  permissions: string;
47
59
  size: number;
48
60
  };
61
+ export type FindMatch = {
62
+ path?: string;
63
+ /**
64
+ * "file" or "directory"
65
+ */
66
+ type?: string;
67
+ };
68
+ export type FindResponse = {
69
+ matches?: Array<FindMatch>;
70
+ total?: number;
71
+ };
72
+ export type FuzzySearchMatch = {
73
+ path?: string;
74
+ score?: number;
75
+ /**
76
+ * "file" or "directory"
77
+ */
78
+ type?: string;
79
+ };
80
+ export type FuzzySearchResponse = {
81
+ matches?: Array<FuzzySearchMatch>;
82
+ total?: number;
83
+ };
49
84
  export type MultipartCompleteRequest = {
50
85
  parts?: Array<MultipartPartInfo>;
51
86
  };
@@ -128,6 +163,11 @@ export type SuccessResponse = {
128
163
  message: string;
129
164
  path?: string;
130
165
  };
166
+ export type TreeRequest = {
167
+ files?: {
168
+ [key: string]: string;
169
+ };
170
+ };
131
171
  export type WelcomeResponse = {
132
172
  description?: string;
133
173
  documentation?: string;
@@ -312,6 +352,118 @@ export type GetCodegenRerankingByPathResponses = {
312
352
  200: RerankingResponse;
313
353
  };
314
354
  export type GetCodegenRerankingByPathResponse = GetCodegenRerankingByPathResponses[keyof GetCodegenRerankingByPathResponses];
355
+ export type GetFilesystemContentSearchByPathData = {
356
+ body?: never;
357
+ path: {
358
+ /**
359
+ * Directory path to search in
360
+ */
361
+ path: string;
362
+ };
363
+ query: {
364
+ /**
365
+ * Text to search for
366
+ */
367
+ query: string;
368
+ /**
369
+ * Case sensitive search (default: false)
370
+ */
371
+ caseSensitive?: boolean;
372
+ /**
373
+ * Number of context lines to include (default: 0)
374
+ */
375
+ contextLines?: number;
376
+ /**
377
+ * Maximum number of results to return (default: 100)
378
+ */
379
+ maxResults?: number;
380
+ /**
381
+ * File pattern to include (e.g., *.go)
382
+ */
383
+ filePattern?: string;
384
+ /**
385
+ * Comma-separated directory names to skip (default: node_modules,vendor,.git,dist,build,target,__pycache__,.venv,.next,coverage)
386
+ */
387
+ excludeDirs?: string;
388
+ };
389
+ url: '/filesystem-content-search/{path}';
390
+ };
391
+ export type GetFilesystemContentSearchByPathErrors = {
392
+ /**
393
+ * Bad request
394
+ */
395
+ 400: ErrorResponse;
396
+ /**
397
+ * Unprocessable entity
398
+ */
399
+ 422: ErrorResponse;
400
+ /**
401
+ * Internal server error
402
+ */
403
+ 500: ErrorResponse;
404
+ };
405
+ export type GetFilesystemContentSearchByPathError = GetFilesystemContentSearchByPathErrors[keyof GetFilesystemContentSearchByPathErrors];
406
+ export type GetFilesystemContentSearchByPathResponses = {
407
+ /**
408
+ * Content search results
409
+ */
410
+ 200: ContentSearchResponse;
411
+ };
412
+ export type GetFilesystemContentSearchByPathResponse = GetFilesystemContentSearchByPathResponses[keyof GetFilesystemContentSearchByPathResponses];
413
+ export type GetFilesystemFindByPathData = {
414
+ body?: never;
415
+ path: {
416
+ /**
417
+ * Path to search in (e.g., /home/user/projects)
418
+ */
419
+ path: string;
420
+ };
421
+ query?: {
422
+ /**
423
+ * Type of search (file or directory)
424
+ */
425
+ type?: string;
426
+ /**
427
+ * Comma-separated file patterns to include (e.g., *.go,*.js)
428
+ */
429
+ patterns?: string;
430
+ /**
431
+ * Maximum number of results to return (default: 20). If set to 0, all results will be returned.
432
+ */
433
+ maxResults?: number;
434
+ /**
435
+ * Comma-separated directory names to skip (default: node_modules,vendor,.git,dist,build,target,__pycache__,.venv,.next,coverage). Use empty string to skip no directories.
436
+ */
437
+ excludeDirs?: string;
438
+ /**
439
+ * Exclude hidden files and directories (default: true)
440
+ */
441
+ excludeHidden?: boolean;
442
+ };
443
+ url: '/filesystem-find/{path}';
444
+ };
445
+ export type GetFilesystemFindByPathErrors = {
446
+ /**
447
+ * Bad request
448
+ */
449
+ 400: ErrorResponse;
450
+ /**
451
+ * Unprocessable entity
452
+ */
453
+ 422: ErrorResponse;
454
+ /**
455
+ * Internal server error
456
+ */
457
+ 500: ErrorResponse;
458
+ };
459
+ export type GetFilesystemFindByPathError = GetFilesystemFindByPathErrors[keyof GetFilesystemFindByPathErrors];
460
+ export type GetFilesystemFindByPathResponses = {
461
+ /**
462
+ * Find results
463
+ */
464
+ 200: FindResponse;
465
+ };
466
+ export type GetFilesystemFindByPathResponse = GetFilesystemFindByPathResponses[keyof GetFilesystemFindByPathResponses];
315
467
  export type GetFilesystemMultipartData = {
316
468
  body?: never;
317
469
  path?: never;
@@ -509,6 +661,56 @@ export type PostFilesystemMultipartInitiateByPathResponses = {
509
661
  200: MultipartInitiateResponse;
510
662
  };
511
663
  export type PostFilesystemMultipartInitiateByPathResponse = PostFilesystemMultipartInitiateByPathResponses[keyof PostFilesystemMultipartInitiateByPathResponses];
664
+ export type GetFilesystemSearchByPathData = {
665
+ body?: never;
666
+ path: {
667
+ /**
668
+ * Path to search in (e.g., /home/user/projects)
669
+ */
670
+ path: string;
671
+ };
672
+ query?: {
673
+ /**
674
+ * Maximum number of results to return (default: 20)
675
+ */
676
+ maxResults?: number;
677
+ /**
678
+ * Comma-separated file patterns to include (e.g., *.go,*.js)
679
+ */
680
+ patterns?: string;
681
+ /**
682
+ * Comma-separated directory names to skip (default: node_modules,vendor,.git,dist,build,target,__pycache__,.venv,.next,coverage). Use empty string to skip no directories.
683
+ */
684
+ excludeDirs?: string;
685
+ /**
686
+ * Exclude hidden files and directories (default: true)
687
+ */
688
+ excludeHidden?: boolean;
689
+ };
690
+ url: '/filesystem-search/{path}';
691
+ };
692
+ export type GetFilesystemSearchByPathErrors = {
693
+ /**
694
+ * Bad request
695
+ */
696
+ 400: ErrorResponse;
697
+ /**
698
+ * Unprocessable entity
699
+ */
700
+ 422: ErrorResponse;
701
+ /**
702
+ * Internal server error
703
+ */
704
+ 500: ErrorResponse;
705
+ };
706
+ export type GetFilesystemSearchByPathError = GetFilesystemSearchByPathErrors[keyof GetFilesystemSearchByPathErrors];
707
+ export type GetFilesystemSearchByPathResponses = {
708
+ /**
709
+ * Fuzzy search results
710
+ */
711
+ 200: FuzzySearchResponse;
712
+ };
713
+ export type GetFilesystemSearchByPathResponse = GetFilesystemSearchByPathResponses[keyof GetFilesystemSearchByPathResponses];
512
714
  export type DeleteFilesystemByPathData = {
513
715
  body?: never;
514
716
  path: {
@@ -621,6 +823,113 @@ export type PutFilesystemByPathResponses = {
621
823
  200: SuccessResponse;
622
824
  };
623
825
  export type PutFilesystemByPathResponse = PutFilesystemByPathResponses[keyof PutFilesystemByPathResponses];
826
+ export type DeleteFilesystemTreeByPathData = {
827
+ body?: never;
828
+ path: {
829
+ /**
830
+ * Root directory path
831
+ */
832
+ path: string;
833
+ };
834
+ query?: {
835
+ /**
836
+ * Delete directory recursively
837
+ */
838
+ recursive?: boolean;
839
+ };
840
+ url: '/filesystem/tree/{path}';
841
+ };
842
+ export type DeleteFilesystemTreeByPathErrors = {
843
+ /**
844
+ * Bad request
845
+ */
846
+ 400: ErrorResponse;
847
+ /**
848
+ * Unprocessable entity
849
+ */
850
+ 422: ErrorResponse;
851
+ /**
852
+ * Internal server error
853
+ */
854
+ 500: ErrorResponse;
855
+ };
856
+ export type DeleteFilesystemTreeByPathError = DeleteFilesystemTreeByPathErrors[keyof DeleteFilesystemTreeByPathErrors];
857
+ export type DeleteFilesystemTreeByPathResponses = {
858
+ /**
859
+ * Directory deleted successfully
860
+ */
861
+ 200: SuccessResponse;
862
+ };
863
+ export type DeleteFilesystemTreeByPathResponse = DeleteFilesystemTreeByPathResponses[keyof DeleteFilesystemTreeByPathResponses];
864
+ export type GetFilesystemTreeByPathData = {
865
+ body?: never;
866
+ path: {
867
+ /**
868
+ * Root directory path
869
+ */
870
+ path: string;
871
+ };
872
+ query?: never;
873
+ url: '/filesystem/tree/{path}';
874
+ };
875
+ export type GetFilesystemTreeByPathErrors = {
876
+ /**
877
+ * Bad request
878
+ */
879
+ 400: ErrorResponse;
880
+ /**
881
+ * Unprocessable entity
882
+ */
883
+ 422: ErrorResponse;
884
+ /**
885
+ * Internal server error
886
+ */
887
+ 500: ErrorResponse;
888
+ };
889
+ export type GetFilesystemTreeByPathError = GetFilesystemTreeByPathErrors[keyof GetFilesystemTreeByPathErrors];
890
+ export type GetFilesystemTreeByPathResponses = {
891
+ /**
892
+ * Directory tree
893
+ */
894
+ 200: Directory | FileWithContent | (Blob | File);
895
+ };
896
+ export type GetFilesystemTreeByPathResponse = GetFilesystemTreeByPathResponses[keyof GetFilesystemTreeByPathResponses];
897
+ export type PutFilesystemTreeByPathData = {
898
+ /**
899
+ * Map of file paths to content
900
+ */
901
+ body: TreeRequest;
902
+ path: {
903
+ /**
904
+ * Root directory path
905
+ */
906
+ path: string;
907
+ };
908
+ query?: never;
909
+ url: '/filesystem/tree/{path}';
910
+ };
911
+ export type PutFilesystemTreeByPathErrors = {
912
+ /**
913
+ * Bad request
914
+ */
915
+ 400: ErrorResponse;
916
+ /**
917
+ * Unprocessable entity
918
+ */
919
+ 422: ErrorResponse;
920
+ /**
921
+ * Internal server error
922
+ */
923
+ 500: ErrorResponse;
924
+ };
925
+ export type PutFilesystemTreeByPathError = PutFilesystemTreeByPathErrors[keyof PutFilesystemTreeByPathErrors];
926
+ export type PutFilesystemTreeByPathResponses = {
927
+ /**
928
+ * Updated directory tree
929
+ */
930
+ 200: Directory | FileWithContent | (Blob | File);
931
+ };
932
+ export type PutFilesystemTreeByPathResponse = PutFilesystemTreeByPathResponses[keyof PutFilesystemTreeByPathResponses];
624
933
  export type DeleteNetworkProcessByPidMonitorData = {
625
934
  body?: never;
626
935
  path: {
@@ -964,6 +1273,12 @@ export type GetWatchFilesystemByPathResponses = {
964
1273
  200: string;
965
1274
  };
966
1275
  export type GetWatchFilesystemByPathResponse = GetWatchFilesystemByPathResponses[keyof GetWatchFilesystemByPathResponses];
1276
+ export type GetWsData = {
1277
+ body?: never;
1278
+ path?: never;
1279
+ query?: never;
1280
+ url: '/ws';
1281
+ };
967
1282
  export type ClientOptions = {
968
1283
  baseUrl: 'https://sbx-{sandbox_id}-{workspace_id}.{region}.bl.run' | (string & {});
969
1284
  };
@@ -1,8 +1,8 @@
1
1
  import { Sandbox } from "../../client/types.gen.js";
2
2
  import { SandboxAction } from "../action.js";
3
- import { Directory, SuccessResponse } from "../client/index.js";
3
+ import { ContentSearchResponse, Directory, FindResponse, FuzzySearchResponse, SuccessResponse } from "../client/index.js";
4
4
  import { SandboxProcess } from "../process/index.js";
5
- import { CopyResponse, SandboxFilesystemFile, WatchEvent } from "./types.js";
5
+ import { CopyResponse, FilesystemFindOptions, FilesystemGrepOptions, FilesystemSearchOptions, SandboxFilesystemFile, WatchEvent } from "./types.js";
6
6
  export declare class SandboxFileSystem extends SandboxAction {
7
7
  private process;
8
8
  constructor(sandbox: Sandbox, process: SandboxProcess);
@@ -17,6 +17,9 @@ export declare class SandboxFileSystem extends SandboxAction {
17
17
  }): Promise<void>;
18
18
  rm(path: string, recursive?: boolean): Promise<SuccessResponse>;
19
19
  ls(path: string): Promise<Directory>;
20
+ search(query: string, path?: string, options?: FilesystemSearchOptions): Promise<FuzzySearchResponse>;
21
+ find(path: string, options?: FilesystemFindOptions): Promise<FindResponse>;
22
+ grep(query: string, path?: string, options?: FilesystemGrepOptions): Promise<ContentSearchResponse>;
20
23
  cp(source: string, destination: string, { maxWait }?: {
21
24
  maxWait?: number;
22
25
  }): Promise<CopyResponse>;
@@ -13,3 +13,23 @@ export type SandboxFilesystemFile = {
13
13
  path: string;
14
14
  content: string;
15
15
  };
16
+ export interface FilesystemSearchOptions {
17
+ maxResults?: number;
18
+ patterns?: string[];
19
+ excludeDirs?: string[];
20
+ excludeHidden?: boolean;
21
+ }
22
+ export interface FilesystemFindOptions {
23
+ type?: 'file' | 'directory';
24
+ patterns?: string[];
25
+ maxResults?: number;
26
+ excludeDirs?: string[];
27
+ excludeHidden?: boolean;
28
+ }
29
+ export interface FilesystemGrepOptions {
30
+ caseSensitive?: boolean;
31
+ contextLines?: number;
32
+ maxResults?: number;
33
+ filePattern?: string;
34
+ excludeDirs?: string[];
35
+ }