@intella/sdk 0.0.1 → 0.0.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.
Files changed (120) hide show
  1. package/dist/agent-manager.d.ts +47 -0
  2. package/dist/agent-manager.d.ts.map +1 -0
  3. package/dist/agent-manager.js +90 -0
  4. package/dist/agent-manager.js.map +1 -0
  5. package/dist/agents/base-agent.d.ts +41 -0
  6. package/dist/agents/base-agent.d.ts.map +1 -0
  7. package/dist/agents/base-agent.js +139 -0
  8. package/dist/agents/base-agent.js.map +1 -0
  9. package/dist/agents/claude-agent.d.ts +24 -0
  10. package/dist/agents/claude-agent.d.ts.map +1 -0
  11. package/dist/agents/claude-agent.js +65 -0
  12. package/dist/agents/claude-agent.js.map +1 -0
  13. package/dist/agents/codex-agent.d.ts +25 -0
  14. package/dist/agents/codex-agent.d.ts.map +1 -0
  15. package/dist/agents/codex-agent.js +62 -0
  16. package/dist/agents/codex-agent.js.map +1 -0
  17. package/dist/agents/intella-lite-agent.d.ts +21 -0
  18. package/dist/agents/intella-lite-agent.d.ts.map +1 -0
  19. package/dist/agents/intella-lite-agent.js +43 -0
  20. package/dist/agents/intella-lite-agent.js.map +1 -0
  21. package/dist/agents/opencode-agent.d.ts +20 -0
  22. package/dist/agents/opencode-agent.d.ts.map +1 -0
  23. package/dist/agents/opencode-agent.js +36 -0
  24. package/dist/agents/opencode-agent.js.map +1 -0
  25. package/dist/filesystem/agentfs-provider.d.ts +42 -0
  26. package/dist/filesystem/agentfs-provider.d.ts.map +1 -0
  27. package/dist/filesystem/agentfs-provider.js +308 -0
  28. package/dist/filesystem/agentfs-provider.js.map +1 -0
  29. package/dist/filesystem/base-provider.d.ts +55 -0
  30. package/dist/filesystem/base-provider.d.ts.map +1 -0
  31. package/dist/filesystem/base-provider.js +44 -0
  32. package/dist/filesystem/base-provider.js.map +1 -0
  33. package/dist/filesystem/index.d.ts +4 -0
  34. package/dist/filesystem/index.d.ts.map +1 -0
  35. package/{src/filesystem/index.ts → dist/filesystem/index.js} +1 -1
  36. package/dist/filesystem/index.js.map +1 -0
  37. package/dist/filesystem/memory-provider.d.ts +44 -0
  38. package/dist/filesystem/memory-provider.d.ts.map +1 -0
  39. package/dist/filesystem/memory-provider.js +227 -0
  40. package/dist/filesystem/memory-provider.js.map +1 -0
  41. package/dist/filesystem-manager.d.ts +75 -0
  42. package/dist/filesystem-manager.d.ts.map +1 -0
  43. package/dist/filesystem-manager.js +164 -0
  44. package/dist/filesystem-manager.js.map +1 -0
  45. package/dist/index.d.ts +18 -0
  46. package/dist/index.d.ts.map +1 -0
  47. package/{src/index.ts → dist/index.js} +3 -46
  48. package/dist/index.js.map +1 -0
  49. package/dist/orchestrator.d.ts +32 -0
  50. package/dist/orchestrator.d.ts.map +1 -0
  51. package/dist/orchestrator.js +136 -0
  52. package/dist/orchestrator.js.map +1 -0
  53. package/dist/sandbox/base-provider.d.ts +106 -0
  54. package/dist/sandbox/base-provider.d.ts.map +1 -0
  55. package/dist/sandbox/base-provider.js +73 -0
  56. package/dist/sandbox/base-provider.js.map +1 -0
  57. package/dist/sandbox/daytona-provider.d.ts +93 -0
  58. package/dist/sandbox/daytona-provider.d.ts.map +1 -0
  59. package/dist/sandbox/daytona-provider.js +378 -0
  60. package/dist/sandbox/daytona-provider.js.map +1 -0
  61. package/dist/sandbox/e2b-provider.d.ts +85 -0
  62. package/dist/sandbox/e2b-provider.d.ts.map +1 -0
  63. package/dist/sandbox/e2b-provider.js +342 -0
  64. package/dist/sandbox/e2b-provider.js.map +1 -0
  65. package/dist/sandbox/modal-provider.d.ts +92 -0
  66. package/dist/sandbox/modal-provider.d.ts.map +1 -0
  67. package/dist/sandbox/modal-provider.js +516 -0
  68. package/dist/sandbox/modal-provider.js.map +1 -0
  69. package/dist/sandbox-manager.d.ts +59 -0
  70. package/dist/sandbox-manager.d.ts.map +1 -0
  71. package/dist/sandbox-manager.js +141 -0
  72. package/dist/sandbox-manager.js.map +1 -0
  73. package/dist/sdk.d.ts +173 -0
  74. package/dist/sdk.d.ts.map +1 -0
  75. package/dist/sdk.js +273 -0
  76. package/dist/sdk.js.map +1 -0
  77. package/dist/types.d.ts +419 -0
  78. package/dist/types.d.ts.map +1 -0
  79. package/dist/types.js +2 -0
  80. package/dist/types.js.map +1 -0
  81. package/dist/utils/code-extractor.d.ts +103 -0
  82. package/dist/utils/code-extractor.d.ts.map +1 -0
  83. package/dist/utils/code-extractor.js +133 -0
  84. package/dist/utils/code-extractor.js.map +1 -0
  85. package/package.json +6 -1
  86. package/examples/claude-code/README.md +0 -178
  87. package/examples/claude-code/advanced-config.ts +0 -55
  88. package/examples/claude-code/basic-usage.ts +0 -56
  89. package/examples/claude-code/model-comparison.ts +0 -50
  90. package/examples/claude-code/orchestration.ts +0 -70
  91. package/examples/claude-code/streaming.ts +0 -69
  92. package/examples/claude-code/tsconfig.json +0 -19
  93. package/examples/code-extractor/README.md +0 -77
  94. package/examples/code-extractor/example.ts +0 -145
  95. package/examples/filesystem/basic-usage.ts +0 -84
  96. package/examples/integrated-task/README.md +0 -68
  97. package/examples/integrated-task/integrated-usage.ts +0 -193
  98. package/examples/integrated-task/simple-example.ts +0 -51
  99. package/examples/integrated-task/tsconfig.json +0 -19
  100. package/examples/sandbox/basic-usage.ts +0 -173
  101. package/src/agent-manager.ts +0 -104
  102. package/src/agents/base-agent.ts +0 -166
  103. package/src/agents/claude-agent.ts +0 -77
  104. package/src/agents/codex-agent.ts +0 -72
  105. package/src/agents/intella-lite-agent.ts +0 -55
  106. package/src/agents/opencode-agent.ts +0 -45
  107. package/src/filesystem/agentfs-provider.ts +0 -328
  108. package/src/filesystem/base-provider.ts +0 -98
  109. package/src/filesystem/memory-provider.ts +0 -267
  110. package/src/filesystem-manager.ts +0 -213
  111. package/src/orchestrator.ts +0 -177
  112. package/src/sandbox/base-provider.ts +0 -184
  113. package/src/sandbox/daytona-provider.ts +0 -462
  114. package/src/sandbox/e2b-provider.ts +0 -419
  115. package/src/sandbox/modal-provider.ts +0 -597
  116. package/src/sandbox-manager.ts +0 -175
  117. package/src/sdk.ts +0 -401
  118. package/src/types.ts +0 -451
  119. package/src/utils/code-extractor.ts +0 -194
  120. package/tsconfig.json +0 -25
@@ -0,0 +1,378 @@
1
+ import { BaseSandboxProvider } from './base-provider.js';
2
+ import { Daytona } from '@daytonaio/sdk';
3
+ /**
4
+ * Daytona Sandbox Provider
5
+ * Provides sandbox execution capabilities using Daytona
6
+ */
7
+ export class DaytonaSandboxProvider extends BaseSandboxProvider {
8
+ constructor(config) {
9
+ super('daytona');
10
+ this.client = null;
11
+ this.sandboxInstance = null;
12
+ if (config) {
13
+ this.config = config;
14
+ }
15
+ }
16
+ getClient() {
17
+ if (!this.client) {
18
+ const apiKey = this.config.apiKey ||
19
+ process.env.DAYTONA_API_KEY ||
20
+ process.env.DAYTONA_API_TOKEN ||
21
+ null;
22
+ if (!apiKey) {
23
+ throw new Error('Daytona API key is required. Set DAYTONA_API_KEY or DAYTONA_API_TOKEN environment variable or provide apiKey in config.');
24
+ }
25
+ this.client = new Daytona({ apiKey });
26
+ }
27
+ return this.client;
28
+ }
29
+ /**
30
+ * Initialize/create a Daytona sandbox
31
+ */
32
+ async initializeSandbox(config) {
33
+ if (config) {
34
+ this.config = { ...this.config, ...config };
35
+ }
36
+ try {
37
+ // Dynamic import to handle optional dependency
38
+ const daytonaClient = this.getClient();
39
+ // Create sandbox with language/template configuration
40
+ const createOptions = {
41
+ envVars: this.config.env || {},
42
+ };
43
+ // If templateId is provided, use it (could be a language or template name)
44
+ if (this.config.templateId) {
45
+ // Check if it's a language identifier
46
+ const languageMap = {
47
+ typescript: 'typescript',
48
+ javascript: 'typescript', // Daytona uses typescript for JS
49
+ python: 'python',
50
+ java: 'java',
51
+ go: 'go',
52
+ rust: 'rust',
53
+ };
54
+ const language = languageMap[this.config.templateId.toLowerCase()];
55
+ if (language) {
56
+ createOptions.language = language;
57
+ }
58
+ else {
59
+ // Assume it's a template ID
60
+ createOptions.template = this.config.templateId;
61
+ }
62
+ }
63
+ // Create the sandbox
64
+ this.sandboxInstance = await daytonaClient.create(createOptions);
65
+ this.sandboxId = this.sandboxInstance.id;
66
+ this.initialized = true;
67
+ }
68
+ catch (error) {
69
+ throw new Error(`Failed to initialize Daytona sandbox: ${error instanceof Error ? error.message : String(error)}`);
70
+ }
71
+ }
72
+ /**
73
+ * Connect to an existing Daytona sandbox by ID
74
+ */
75
+ async fromSandbox(sandboxId, config) {
76
+ if (config) {
77
+ this.config = { ...this.config, ...config };
78
+ }
79
+ try {
80
+ const daytonaClient = this.getClient();
81
+ // Get existing sandbox by ID
82
+ // Note: Daytona SDK may have a method to get sandbox by ID
83
+ // If not available, we'll need to use the client's get method
84
+ // Try to get sandbox by ID
85
+ this.sandboxInstance = await daytonaClient.get(sandboxId);
86
+ await daytonaClient.start(this.sandboxInstance);
87
+ this.sandboxId = this.sandboxInstance.id || sandboxId;
88
+ this.initialized = true;
89
+ return this.sandboxInstance;
90
+ }
91
+ catch (error) {
92
+ throw new Error(`Failed to connect to Daytona sandbox: ${error instanceof Error ? error.message : String(error)}`);
93
+ }
94
+ }
95
+ /**
96
+ * Close/cleanup the Daytona sandbox
97
+ */
98
+ async close() {
99
+ if (this.sandboxInstance && this.initialized) {
100
+ try {
101
+ await this.sandboxInstance.delete();
102
+ }
103
+ catch (error) {
104
+ // Ignore errors during cleanup
105
+ console.warn('Error closing Daytona sandbox:', error);
106
+ }
107
+ this.sandboxInstance = null;
108
+ this.client = null;
109
+ this.sandboxId = null;
110
+ this.initialized = false;
111
+ }
112
+ }
113
+ /**
114
+ * Execute a command in the Daytona sandbox
115
+ * @param command - Command to execute
116
+ * @param options - Execution options (cwd, env, timeout)
117
+ */
118
+ async executeCommand(command, options) {
119
+ this.ensureInitialized();
120
+ const startTime = Date.now();
121
+ try {
122
+ // Use process.executeCommand for shell commands
123
+ // According to docs: https://www.daytona.io/docs/en/process-code-execution/
124
+ const execOptions = {};
125
+ if (options?.cwd) {
126
+ execOptions.cwd = options.cwd;
127
+ }
128
+ if (options?.env) {
129
+ execOptions.env = { ...this.config.env, ...options.env };
130
+ }
131
+ if (options?.timeout) {
132
+ execOptions.timeout = options.timeout;
133
+ }
134
+ const response = await this.sandboxInstance.process.executeCommand(command, Object.keys(execOptions).length > 0 ? execOptions : undefined);
135
+ const executionTime = Date.now() - startTime;
136
+ return {
137
+ exitCode: response.exitCode || response.code || 0,
138
+ stdout: response.result || response.stdout || '',
139
+ stderr: response.stderr || response.error || '',
140
+ executionTime,
141
+ };
142
+ }
143
+ catch (error) {
144
+ const executionTime = Date.now() - startTime;
145
+ return {
146
+ exitCode: 1,
147
+ stdout: '',
148
+ stderr: error instanceof Error ? error.message : String(error),
149
+ executionTime,
150
+ };
151
+ }
152
+ }
153
+ /**
154
+ * Run code (e.g., Python, JavaScript, TypeScript) in the Daytona sandbox
155
+ * Uses the stateless codeRun method: https://www.daytona.io/docs/en/process-code-execution/
156
+ */
157
+ async runCode(code, options) {
158
+ this.ensureInitialized();
159
+ const startTime = Date.now();
160
+ try {
161
+ // Use process.codeRun for stateless code execution
162
+ // According to docs: https://www.daytona.io/docs/en/process-code-execution/
163
+ const codeRunOptions = {};
164
+ if (options?.env) {
165
+ codeRunOptions.env = { ...this.config.env, ...options.env };
166
+ }
167
+ if (options?.timeout) {
168
+ codeRunOptions.timeout = options.timeout;
169
+ }
170
+ const response = await this.sandboxInstance.process.codeRun(code, Object.keys(codeRunOptions).length > 0 ? codeRunOptions : undefined, options?.timeout);
171
+ const executionTime = Date.now() - startTime;
172
+ // Handle stdout/stderr callbacks if provided
173
+ if (options?.onStdout && response.result) {
174
+ options.onStdout(response.result);
175
+ }
176
+ if (options?.onStderr && response.stderr) {
177
+ options.onStderr(response.stderr);
178
+ }
179
+ return {
180
+ text: response.result || undefined,
181
+ results: response.result ? [{ text: response.result }] : [],
182
+ stdout: response.result ? [response.result] : [],
183
+ stderr: response.stderr ? [response.stderr] : [],
184
+ error: response.exitCode !== 0 || response.code !== 0
185
+ ? {
186
+ name: 'CodeExecutionError',
187
+ value: response.stderr || response.error || 'Code execution failed',
188
+ traceback: response.stderr || response.error || '',
189
+ }
190
+ : undefined,
191
+ executionTime,
192
+ };
193
+ }
194
+ catch (error) {
195
+ const executionTime = Date.now() - startTime;
196
+ return {
197
+ text: undefined,
198
+ results: [],
199
+ stdout: [],
200
+ stderr: [error instanceof Error ? error.message : String(error)],
201
+ error: {
202
+ name: 'CodeExecutionError',
203
+ value: error instanceof Error ? error.message : String(error),
204
+ traceback: error instanceof Error ? (error.stack || '') : '',
205
+ },
206
+ executionTime,
207
+ };
208
+ }
209
+ }
210
+ /**
211
+ * Upload a file to the Daytona sandbox
212
+ * Uses fs.uploadFile: https://www.daytona.io/docs/en/file-system-operations/
213
+ */
214
+ async uploadFile(localPath, remotePath) {
215
+ this.ensureInitialized();
216
+ try {
217
+ const fs = await import('fs/promises');
218
+ const content = await fs.readFile(localPath);
219
+ // Use SDK fs.uploadFile method (takes Buffer and remote path)
220
+ await this.sandboxInstance.fs.uploadFile(content, remotePath);
221
+ }
222
+ catch (error) {
223
+ throw new Error(`Failed to upload file to Daytona sandbox: ${error instanceof Error ? error.message : String(error)}`);
224
+ }
225
+ }
226
+ /**
227
+ * Download a file from the Daytona sandbox
228
+ * Uses fs.downloadFile: https://www.daytona.io/docs/en/file-system-operations/
229
+ */
230
+ async downloadFile(remotePath, localPath) {
231
+ this.ensureInitialized();
232
+ try {
233
+ // Use SDK fs.downloadFile method (returns Buffer)
234
+ const content = await this.sandboxInstance.fs.downloadFile(remotePath);
235
+ const fs = await import('fs/promises');
236
+ // Write Buffer to local file
237
+ await fs.writeFile(localPath, content);
238
+ }
239
+ catch (error) {
240
+ throw new Error(`Failed to download file from Daytona sandbox: ${error instanceof Error ? error.message : String(error)}`);
241
+ }
242
+ }
243
+ /**
244
+ * Read a file from the Daytona sandbox
245
+ * Uses fs.downloadFile: https://www.daytona.io/docs/en/file-system-operations/
246
+ */
247
+ async readFile(path) {
248
+ this.ensureInitialized();
249
+ try {
250
+ // Use SDK fs.downloadFile method (returns Buffer)
251
+ const content = await this.sandboxInstance.fs.downloadFile(path);
252
+ return content.toString('utf-8');
253
+ }
254
+ catch (error) {
255
+ throw new Error(`Failed to read file from Daytona sandbox: ${error instanceof Error ? error.message : String(error)}`);
256
+ }
257
+ }
258
+ /**
259
+ * Write a file to the Daytona sandbox
260
+ * Uses fs.uploadFile: https://www.daytona.io/docs/en/file-system-operations/
261
+ */
262
+ async writeFile(path, content) {
263
+ this.ensureInitialized();
264
+ try {
265
+ // Use SDK fs.uploadFile method (takes Buffer and remote path)
266
+ const buffer = Buffer.from(content, 'utf-8');
267
+ await this.sandboxInstance.fs.uploadFile(buffer, path);
268
+ }
269
+ catch (error) {
270
+ throw new Error(`Failed to write file to Daytona sandbox: ${error instanceof Error ? error.message : String(error)}`);
271
+ }
272
+ }
273
+ /**
274
+ * List files in a directory
275
+ * Uses fs.listFiles: https://www.daytona.io/docs/en/file-system-operations/
276
+ */
277
+ async listFiles(path) {
278
+ this.ensureInitialized();
279
+ try {
280
+ // Use SDK fs.listFiles method (returns File[] with name, isDir, size, modTime)
281
+ const files = await this.sandboxInstance.fs.listFiles(path);
282
+ // Return array of file/directory names
283
+ return files.map((file) => file.name || file.path);
284
+ }
285
+ catch (error) {
286
+ throw new Error(`Failed to list files in Daytona sandbox: ${error instanceof Error ? error.message : String(error)}`);
287
+ }
288
+ }
289
+ /**
290
+ * Check if a file exists
291
+ */
292
+ async fileExists(path) {
293
+ this.ensureInitialized();
294
+ try {
295
+ await this.readFile(path);
296
+ return true;
297
+ }
298
+ catch {
299
+ return false;
300
+ }
301
+ }
302
+ /**
303
+ * Delete a file
304
+ * Uses fs.deleteFile: https://www.daytona.io/docs/en/file-system-operations/
305
+ */
306
+ async deleteFile(path) {
307
+ this.ensureInitialized();
308
+ try {
309
+ // Use SDK fs.deleteFile method
310
+ await this.sandboxInstance.fs.deleteFile(path);
311
+ }
312
+ catch (error) {
313
+ throw new Error(`Failed to delete file in Daytona sandbox: ${error instanceof Error ? error.message : String(error)}`);
314
+ }
315
+ }
316
+ /**
317
+ * Get sandbox status
318
+ */
319
+ async getStatus() {
320
+ this.ensureInitialized();
321
+ try {
322
+ // Check if sandbox instance is available
323
+ if (!this.sandboxInstance) {
324
+ return {
325
+ isRunning: false,
326
+ };
327
+ }
328
+ // Try to get status from sandbox instance
329
+ const sandboxAny = this.sandboxInstance;
330
+ const status = sandboxAny.status || sandboxAny.state;
331
+ const isRunning = status === 'running' || status === 'active' || this.initialized;
332
+ return {
333
+ isRunning,
334
+ sandboxId: this.sandboxId,
335
+ status,
336
+ };
337
+ }
338
+ catch {
339
+ return {
340
+ isRunning: false,
341
+ };
342
+ }
343
+ }
344
+ /**
345
+ * Get detailed sandbox information
346
+ */
347
+ async getInfo(sandboxId) {
348
+ if (!sandboxId && this.sandboxInstance) {
349
+ this.ensureInitialized();
350
+ const info = this.sandboxInstance;
351
+ return {
352
+ sandboxId: info.id,
353
+ provider: this.type,
354
+ isRunning: info.state === 'started',
355
+ isInitialized: this.initialized,
356
+ createdAt: new Date(info.createdAt),
357
+ metadata: {},
358
+ info: info,
359
+ };
360
+ }
361
+ else if (sandboxId) {
362
+ const sandbox = await this.client.get(sandboxId);
363
+ return {
364
+ sandboxId: sandbox.id,
365
+ provider: this.type,
366
+ isRunning: sandbox.state === 'started',
367
+ isInitialized: this.initialized,
368
+ createdAt: new Date(sandbox.createdAt),
369
+ metadata: {},
370
+ info: sandbox,
371
+ };
372
+ }
373
+ else {
374
+ throw new Error('Sandbox ID or active instance is required to get sandbox info');
375
+ }
376
+ }
377
+ }
378
+ //# sourceMappingURL=daytona-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daytona-provider.js","sourceRoot":"","sources":["../../src/sandbox/daytona-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,EAAE,OAAO,EAAW,MAAM,gBAAgB,CAA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O,CAAC,KAAK,KAAK,SAAS;gBACtC,aAAa,EAAE,IAAI,CAAC,WAAW;gBAC/B,SAAS,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,SAAU,CAAC;gBACvC,QAAQ,EAAE,EAAE;gBACZ,IAAI,EAAE,OAAO;aACd,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;QACnF,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,85 @@
1
+ import { BaseSandboxProvider } from './base-provider.js';
2
+ import type { SandboxConfig, CommandResult, CodeExecutionResult, SandboxInfo } from '../types.js';
3
+ import { Sandbox } from '@e2b/code-interpreter';
4
+ import 'dotenv/config';
5
+ /**
6
+ * E2B Sandbox Provider
7
+ * Provides sandbox execution capabilities using E2B Code Interpreter SDK
8
+ */
9
+ export declare class E2BSandboxProvider extends BaseSandboxProvider {
10
+ private sandboxInstance;
11
+ protected client: Record<string, any> | null;
12
+ constructor(config?: SandboxConfig);
13
+ getClient(): Record<string, any>;
14
+ /**
15
+ * Initialize/create an E2B sandbox
16
+ */
17
+ protected initializeSandbox(config?: SandboxConfig): Promise<void>;
18
+ /**
19
+ * Connect to an existing E2B sandbox by ID
20
+ */
21
+ fromSandbox(sandboxId: string, config?: SandboxConfig): Promise<Sandbox>;
22
+ /**
23
+ * Close/cleanup the E2B sandbox
24
+ */
25
+ close(): Promise<void>;
26
+ /**
27
+ * Execute a command in the E2B sandbox
28
+ */
29
+ executeCommand(command: string, options?: {
30
+ cwd?: string;
31
+ env?: Record<string, string>;
32
+ timeout?: number;
33
+ }): Promise<CommandResult>;
34
+ /**
35
+ * Run code (e.g., Python, JavaScript) in the E2B sandbox
36
+ */
37
+ runCode(code: string, options?: {
38
+ language?: string;
39
+ env?: Record<string, string>;
40
+ timeout?: number;
41
+ onStdout?: (data: string) => void;
42
+ onStderr?: (data: string) => void;
43
+ }): Promise<CodeExecutionResult>;
44
+ /**
45
+ * Upload a file to the E2B sandbox
46
+ */
47
+ uploadFile(localPath: string, remotePath: string): Promise<void>;
48
+ /**
49
+ * Download a file from the E2B sandbox
50
+ */
51
+ downloadFile(remotePath: string, localPath: string): Promise<void>;
52
+ /**
53
+ * Read a file from the E2B sandbox
54
+ */
55
+ readFile(path: string): Promise<string>;
56
+ /**
57
+ * Write a file to the E2B sandbox
58
+ */
59
+ writeFile(path: string, content: string): Promise<void>;
60
+ /**
61
+ * List files in a directory
62
+ */
63
+ listFiles(path: string): Promise<string[]>;
64
+ /**
65
+ * Check if a file exists
66
+ */
67
+ fileExists(path: string): Promise<boolean>;
68
+ /**
69
+ * Delete a file
70
+ */
71
+ deleteFile(path: string): Promise<void>;
72
+ /**
73
+ * Get sandbox status
74
+ */
75
+ getStatus(): Promise<{
76
+ isRunning: boolean;
77
+ createdAt?: number;
78
+ [key: string]: unknown;
79
+ }>;
80
+ /**
81
+ * Get detailed sandbox information
82
+ */
83
+ getInfo(sandboxId?: string): Promise<SandboxInfo>;
84
+ }
85
+ //# sourceMappingURL=e2b-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"e2b-provider.d.ts","sourceRoot":"","sources":["../../src/sandbox/e2b-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAClG,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,eAAe,CAAC;AAEvB;;;GAGG;AACH,qBAAa,kBAAmB,SAAQ,mBAAmB;IACzD,OAAO,CAAC,eAAe,CAAwB;IAC/C,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAQ;gBAExC,MAAM,CAAC,EAAE,aAAa;IAQlC,SAAS,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CA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