@alibaba-group/opensandbox 0.1.0-dev1
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/README.md +212 -0
- package/dist/adapters/commandsAdapter.d.ts +22 -0
- package/dist/adapters/commandsAdapter.d.ts.map +1 -0
- package/dist/adapters/commandsAdapter.js +76 -0
- package/dist/adapters/filesystemAdapter.d.ts +52 -0
- package/dist/adapters/filesystemAdapter.d.ts.map +1 -0
- package/dist/adapters/filesystemAdapter.js +398 -0
- package/dist/adapters/healthAdapter.d.ts +8 -0
- package/dist/adapters/healthAdapter.d.ts.map +1 -0
- package/dist/adapters/healthAdapter.js +25 -0
- package/dist/adapters/metricsAdapter.d.ts +9 -0
- package/dist/adapters/metricsAdapter.d.ts.map +1 -0
- package/dist/adapters/metricsAdapter.js +43 -0
- package/dist/adapters/openapiError.d.ts +5 -0
- package/dist/adapters/openapiError.d.ts.map +1 -0
- package/dist/adapters/openapiError.js +33 -0
- package/dist/adapters/sandboxesAdapter.d.ts +18 -0
- package/dist/adapters/sandboxesAdapter.d.ts.map +1 -0
- package/dist/adapters/sandboxesAdapter.js +146 -0
- package/dist/adapters/sse.d.ts +9 -0
- package/dist/adapters/sse.d.ts.map +1 -0
- package/dist/adapters/sse.js +84 -0
- package/dist/api/execd.d.ts +1555 -0
- package/dist/api/execd.d.ts.map +1 -0
- package/dist/api/execd.js +14 -0
- package/dist/api/lifecycle.d.ts +787 -0
- package/dist/api/lifecycle.d.ts.map +1 -0
- package/dist/api/lifecycle.js +14 -0
- package/dist/config/connection.d.ts +58 -0
- package/dist/config/connection.d.ts.map +1 -0
- package/dist/config/connection.js +171 -0
- package/dist/core/constants.d.ts +9 -0
- package/dist/core/constants.d.ts.map +1 -0
- package/dist/core/constants.js +24 -0
- package/dist/core/exceptions.d.ts +74 -0
- package/dist/core/exceptions.d.ts.map +1 -0
- package/dist/core/exceptions.js +103 -0
- package/dist/factory/adapterFactory.d.ts +33 -0
- package/dist/factory/adapterFactory.d.ts.map +1 -0
- package/dist/factory/adapterFactory.js +14 -0
- package/dist/factory/defaultAdapterFactory.d.ts +7 -0
- package/dist/factory/defaultAdapterFactory.d.ts.map +1 -0
- package/dist/factory/defaultAdapterFactory.js +61 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/internal.d.ts +22 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +30 -0
- package/dist/manager.d.ts +40 -0
- package/dist/manager.d.ts.map +1 -0
- package/dist/manager.js +71 -0
- package/dist/models/execd.d.ts +54 -0
- package/dist/models/execd.d.ts.map +1 -0
- package/dist/models/execd.js +14 -0
- package/dist/models/execution.d.ts +52 -0
- package/dist/models/execution.d.ts.map +1 -0
- package/dist/models/execution.js +14 -0
- package/dist/models/executionEventDispatcher.d.ts +15 -0
- package/dist/models/executionEventDispatcher.d.ts.map +1 -0
- package/dist/models/executionEventDispatcher.js +95 -0
- package/dist/models/filesystem.d.ts +77 -0
- package/dist/models/filesystem.d.ts.map +1 -0
- package/dist/models/filesystem.js +14 -0
- package/dist/models/sandboxes.d.ts +105 -0
- package/dist/models/sandboxes.d.ts.map +1 -0
- package/dist/models/sandboxes.js +15 -0
- package/dist/openapi/execdClient.d.ts +25 -0
- package/dist/openapi/execdClient.d.ts.map +1 -0
- package/dist/openapi/execdClient.js +21 -0
- package/dist/openapi/lifecycleClient.d.ts +28 -0
- package/dist/openapi/lifecycleClient.d.ts.map +1 -0
- package/dist/openapi/lifecycleClient.js +35 -0
- package/dist/sandbox.d.ts +132 -0
- package/dist/sandbox.d.ts.map +1 -0
- package/dist/sandbox.js +250 -0
- package/dist/services/execdCommands.d.ts +19 -0
- package/dist/services/execdCommands.d.ts.map +1 -0
- package/dist/services/execdCommands.js +14 -0
- package/dist/services/execdHealth.d.ts +4 -0
- package/dist/services/execdHealth.d.ts.map +1 -0
- package/dist/services/execdHealth.js +14 -0
- package/dist/services/execdMetrics.d.ts +5 -0
- package/dist/services/execdMetrics.d.ts.map +1 -0
- package/dist/services/execdMetrics.js +14 -0
- package/dist/services/filesystem.d.ts +30 -0
- package/dist/services/filesystem.d.ts.map +1 -0
- package/dist/services/filesystem.js +14 -0
- package/dist/services/sandboxes.d.ts +12 -0
- package/dist/services/sandboxes.d.ts.map +1 -0
- package/dist/services/sandboxes.js +14 -0
- package/package.json +52 -0
|
@@ -0,0 +1,1555 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
export interface paths {
|
|
6
|
+
"/ping": {
|
|
7
|
+
parameters: {
|
|
8
|
+
query?: never;
|
|
9
|
+
header?: never;
|
|
10
|
+
path?: never;
|
|
11
|
+
cookie?: never;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Health check endpoint
|
|
15
|
+
* @description Performs a simple health check to verify that the server is running and responsive.
|
|
16
|
+
* Returns HTTP 200 OK status if the server is healthy. This endpoint is typically used
|
|
17
|
+
* by load balancers, monitoring systems, and orchestration platforms (like Kubernetes)
|
|
18
|
+
* to check service availability.
|
|
19
|
+
*/
|
|
20
|
+
get: operations["ping"];
|
|
21
|
+
put?: never;
|
|
22
|
+
post?: never;
|
|
23
|
+
delete?: never;
|
|
24
|
+
options?: never;
|
|
25
|
+
head?: never;
|
|
26
|
+
patch?: never;
|
|
27
|
+
trace?: never;
|
|
28
|
+
};
|
|
29
|
+
"/code/contexts": {
|
|
30
|
+
parameters: {
|
|
31
|
+
query?: never;
|
|
32
|
+
header?: never;
|
|
33
|
+
path?: never;
|
|
34
|
+
cookie?: never;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* List active code execution contexts
|
|
38
|
+
* @description Lists all active/available code execution contexts.
|
|
39
|
+
* If `language` is provided, only contexts under that language/runtime are returned.
|
|
40
|
+
*/
|
|
41
|
+
get: operations["listContexts"];
|
|
42
|
+
put?: never;
|
|
43
|
+
post?: never;
|
|
44
|
+
/**
|
|
45
|
+
* Delete all contexts under a language
|
|
46
|
+
* @description Deletes all existing code execution contexts under the specified `language`/runtime.
|
|
47
|
+
* This is a bulk operation intended for code-interpreter context cleanup.
|
|
48
|
+
*/
|
|
49
|
+
delete: operations["deleteContextsByLanguage"];
|
|
50
|
+
options?: never;
|
|
51
|
+
head?: never;
|
|
52
|
+
patch?: never;
|
|
53
|
+
trace?: never;
|
|
54
|
+
};
|
|
55
|
+
"/code/contexts/{context_id}": {
|
|
56
|
+
parameters: {
|
|
57
|
+
query?: never;
|
|
58
|
+
header?: never;
|
|
59
|
+
path?: never;
|
|
60
|
+
cookie?: never;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Get a code execution context by id
|
|
64
|
+
* @description Retrieves the details of an existing code execution context (session) by id.
|
|
65
|
+
* Returns the context ID, language, and any associated metadata.
|
|
66
|
+
*/
|
|
67
|
+
get: operations["getContext"];
|
|
68
|
+
put?: never;
|
|
69
|
+
post?: never;
|
|
70
|
+
/**
|
|
71
|
+
* Delete a code execution context by id
|
|
72
|
+
* @description Deletes an existing code execution context (session) by id.
|
|
73
|
+
* This should terminate the underlying context thread/process and release resources.
|
|
74
|
+
*/
|
|
75
|
+
delete: operations["deleteContext"];
|
|
76
|
+
options?: never;
|
|
77
|
+
head?: never;
|
|
78
|
+
patch?: never;
|
|
79
|
+
trace?: never;
|
|
80
|
+
};
|
|
81
|
+
"/code/context": {
|
|
82
|
+
parameters: {
|
|
83
|
+
query?: never;
|
|
84
|
+
header?: never;
|
|
85
|
+
path?: never;
|
|
86
|
+
cookie?: never;
|
|
87
|
+
};
|
|
88
|
+
get?: never;
|
|
89
|
+
put?: never;
|
|
90
|
+
/**
|
|
91
|
+
* Create code execution context
|
|
92
|
+
* @description Creates a new code execution environment and returns a session ID that can be used
|
|
93
|
+
* for subsequent code execution requests. The context maintains state across multiple
|
|
94
|
+
* code executions within the same session.
|
|
95
|
+
*/
|
|
96
|
+
post: operations["createCodeContext"];
|
|
97
|
+
delete?: never;
|
|
98
|
+
options?: never;
|
|
99
|
+
head?: never;
|
|
100
|
+
patch?: never;
|
|
101
|
+
trace?: never;
|
|
102
|
+
};
|
|
103
|
+
"/code": {
|
|
104
|
+
parameters: {
|
|
105
|
+
query?: never;
|
|
106
|
+
header?: never;
|
|
107
|
+
path?: never;
|
|
108
|
+
cookie?: never;
|
|
109
|
+
};
|
|
110
|
+
get?: never;
|
|
111
|
+
put?: never;
|
|
112
|
+
/**
|
|
113
|
+
* Execute code in context
|
|
114
|
+
* @description Executes code using Jupyter kernel in a specified execution context and streams
|
|
115
|
+
* the output in real-time using SSE (Server-Sent Events). Supports multiple programming
|
|
116
|
+
* languages (Python, JavaScript, etc.) and maintains execution state within the session.
|
|
117
|
+
* Returns execution results, output streams, execution count, and any errors.
|
|
118
|
+
*/
|
|
119
|
+
post: operations["runCode"];
|
|
120
|
+
/**
|
|
121
|
+
* Interrupt code execution
|
|
122
|
+
* @description Interrupts the currently running code execution in the specified context.
|
|
123
|
+
* This sends a signal to terminate the execution process and releases associated resources.
|
|
124
|
+
*/
|
|
125
|
+
delete: operations["interruptCode"];
|
|
126
|
+
options?: never;
|
|
127
|
+
head?: never;
|
|
128
|
+
patch?: never;
|
|
129
|
+
trace?: never;
|
|
130
|
+
};
|
|
131
|
+
"/command": {
|
|
132
|
+
parameters: {
|
|
133
|
+
query?: never;
|
|
134
|
+
header?: never;
|
|
135
|
+
path?: never;
|
|
136
|
+
cookie?: never;
|
|
137
|
+
};
|
|
138
|
+
get?: never;
|
|
139
|
+
put?: never;
|
|
140
|
+
/**
|
|
141
|
+
* Execute shell command
|
|
142
|
+
* @description Executes a shell command and streams the output in real-time using SSE (Server-Sent Events).
|
|
143
|
+
* The command can run in foreground or background mode. The response includes stdout, stderr,
|
|
144
|
+
* execution status, and completion events.
|
|
145
|
+
*/
|
|
146
|
+
post: operations["runCommand"];
|
|
147
|
+
/**
|
|
148
|
+
* Interrupt command execution
|
|
149
|
+
* @description Interrupts the currently running command execution in the specified context.
|
|
150
|
+
* This sends a signal to terminate the execution process and releases associated resources.
|
|
151
|
+
*/
|
|
152
|
+
delete: operations["interruptCommand"];
|
|
153
|
+
options?: never;
|
|
154
|
+
head?: never;
|
|
155
|
+
patch?: never;
|
|
156
|
+
trace?: never;
|
|
157
|
+
};
|
|
158
|
+
"/command/status/{id}": {
|
|
159
|
+
parameters: {
|
|
160
|
+
query?: never;
|
|
161
|
+
header?: never;
|
|
162
|
+
path?: never;
|
|
163
|
+
cookie?: never;
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* Get command running status
|
|
167
|
+
* @description Returns the current status of a command (foreground or background) by command ID.
|
|
168
|
+
* Includes running flag, exit code, error (if any), and start/finish timestamps.
|
|
169
|
+
*/
|
|
170
|
+
get: operations["getCommandStatus"];
|
|
171
|
+
put?: never;
|
|
172
|
+
post?: never;
|
|
173
|
+
delete?: never;
|
|
174
|
+
options?: never;
|
|
175
|
+
head?: never;
|
|
176
|
+
patch?: never;
|
|
177
|
+
trace?: never;
|
|
178
|
+
};
|
|
179
|
+
"/command/{id}/logs": {
|
|
180
|
+
parameters: {
|
|
181
|
+
query?: never;
|
|
182
|
+
header?: never;
|
|
183
|
+
path?: never;
|
|
184
|
+
cookie?: never;
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* Get background command stdout/stderr (non-streamed)
|
|
188
|
+
* @description Returns stdout and stderr for a background (detached) command by command ID.
|
|
189
|
+
* Foreground commands should be consumed via SSE; this endpoint is intended for
|
|
190
|
+
* polling logs of background commands. Supports incremental reads similar to a file seek:
|
|
191
|
+
* pass a starting line via query to fetch output after that line and receive the latest
|
|
192
|
+
* tail cursor for the next poll. When no starting line is provided, the full logs are returned.
|
|
193
|
+
* Response body is plain text so it can be rendered directly in browsers; the latest line index
|
|
194
|
+
* is provided via response header `EXECD-COMMANDS-TAIL-CURSOR` for subsequent incremental requests.
|
|
195
|
+
*/
|
|
196
|
+
get: operations["getBackgroundCommandLogs"];
|
|
197
|
+
put?: never;
|
|
198
|
+
post?: never;
|
|
199
|
+
delete?: never;
|
|
200
|
+
options?: never;
|
|
201
|
+
head?: never;
|
|
202
|
+
patch?: never;
|
|
203
|
+
trace?: never;
|
|
204
|
+
};
|
|
205
|
+
"/files/info": {
|
|
206
|
+
parameters: {
|
|
207
|
+
query?: never;
|
|
208
|
+
header?: never;
|
|
209
|
+
path?: never;
|
|
210
|
+
cookie?: never;
|
|
211
|
+
};
|
|
212
|
+
/**
|
|
213
|
+
* Get file metadata
|
|
214
|
+
* @description Retrieves detailed metadata for one or multiple files including permissions, owner,
|
|
215
|
+
* group, size, and modification time. Returns a map of file paths to their corresponding
|
|
216
|
+
* FileInfo objects.
|
|
217
|
+
*/
|
|
218
|
+
get: operations["getFilesInfo"];
|
|
219
|
+
put?: never;
|
|
220
|
+
post?: never;
|
|
221
|
+
delete?: never;
|
|
222
|
+
options?: never;
|
|
223
|
+
head?: never;
|
|
224
|
+
patch?: never;
|
|
225
|
+
trace?: never;
|
|
226
|
+
};
|
|
227
|
+
"/files": {
|
|
228
|
+
parameters: {
|
|
229
|
+
query?: never;
|
|
230
|
+
header?: never;
|
|
231
|
+
path?: never;
|
|
232
|
+
cookie?: never;
|
|
233
|
+
};
|
|
234
|
+
get?: never;
|
|
235
|
+
put?: never;
|
|
236
|
+
post?: never;
|
|
237
|
+
/**
|
|
238
|
+
* Delete files
|
|
239
|
+
* @description Deletes one or multiple files from the sandbox. Only removes files, not directories.
|
|
240
|
+
* Use RemoveDirs for directory removal.
|
|
241
|
+
*/
|
|
242
|
+
delete: operations["removeFiles"];
|
|
243
|
+
options?: never;
|
|
244
|
+
head?: never;
|
|
245
|
+
patch?: never;
|
|
246
|
+
trace?: never;
|
|
247
|
+
};
|
|
248
|
+
"/files/permissions": {
|
|
249
|
+
parameters: {
|
|
250
|
+
query?: never;
|
|
251
|
+
header?: never;
|
|
252
|
+
path?: never;
|
|
253
|
+
cookie?: never;
|
|
254
|
+
};
|
|
255
|
+
get?: never;
|
|
256
|
+
put?: never;
|
|
257
|
+
/**
|
|
258
|
+
* Change file permissions
|
|
259
|
+
* @description Changes permissions (mode), owner, and group for one or multiple files.
|
|
260
|
+
* Accepts a map of file paths to permission settings including octal mode,
|
|
261
|
+
* owner username, and group name.
|
|
262
|
+
*/
|
|
263
|
+
post: operations["chmodFiles"];
|
|
264
|
+
delete?: never;
|
|
265
|
+
options?: never;
|
|
266
|
+
head?: never;
|
|
267
|
+
patch?: never;
|
|
268
|
+
trace?: never;
|
|
269
|
+
};
|
|
270
|
+
"/files/mv": {
|
|
271
|
+
parameters: {
|
|
272
|
+
query?: never;
|
|
273
|
+
header?: never;
|
|
274
|
+
path?: never;
|
|
275
|
+
cookie?: never;
|
|
276
|
+
};
|
|
277
|
+
get?: never;
|
|
278
|
+
put?: never;
|
|
279
|
+
/**
|
|
280
|
+
* Rename or move files
|
|
281
|
+
* @description Renames or moves one or multiple files to new paths. Can be used for both
|
|
282
|
+
* renaming within the same directory and moving to different directories.
|
|
283
|
+
* Target directory must exist.
|
|
284
|
+
*/
|
|
285
|
+
post: operations["renameFiles"];
|
|
286
|
+
delete?: never;
|
|
287
|
+
options?: never;
|
|
288
|
+
head?: never;
|
|
289
|
+
patch?: never;
|
|
290
|
+
trace?: never;
|
|
291
|
+
};
|
|
292
|
+
"/files/search": {
|
|
293
|
+
parameters: {
|
|
294
|
+
query?: never;
|
|
295
|
+
header?: never;
|
|
296
|
+
path?: never;
|
|
297
|
+
cookie?: never;
|
|
298
|
+
};
|
|
299
|
+
/**
|
|
300
|
+
* Search for files
|
|
301
|
+
* @description Searches for files matching a glob pattern within a specified directory and
|
|
302
|
+
* its subdirectories. Returns file metadata including path, permissions, owner,
|
|
303
|
+
* and group. Supports glob patterns like **, *.txt, etc. Default pattern is ** (all files).
|
|
304
|
+
*/
|
|
305
|
+
get: operations["searchFiles"];
|
|
306
|
+
put?: never;
|
|
307
|
+
post?: never;
|
|
308
|
+
delete?: never;
|
|
309
|
+
options?: never;
|
|
310
|
+
head?: never;
|
|
311
|
+
patch?: never;
|
|
312
|
+
trace?: never;
|
|
313
|
+
};
|
|
314
|
+
"/files/replace": {
|
|
315
|
+
parameters: {
|
|
316
|
+
query?: never;
|
|
317
|
+
header?: never;
|
|
318
|
+
path?: never;
|
|
319
|
+
cookie?: never;
|
|
320
|
+
};
|
|
321
|
+
get?: never;
|
|
322
|
+
put?: never;
|
|
323
|
+
/**
|
|
324
|
+
* Replace file content
|
|
325
|
+
* @description Performs text replacement in one or multiple files. Replaces all occurrences
|
|
326
|
+
* of the old string with the new string (similar to strings.ReplaceAll).
|
|
327
|
+
* Preserves file permissions. Useful for batch text substitution across files.
|
|
328
|
+
*/
|
|
329
|
+
post: operations["replaceContent"];
|
|
330
|
+
delete?: never;
|
|
331
|
+
options?: never;
|
|
332
|
+
head?: never;
|
|
333
|
+
patch?: never;
|
|
334
|
+
trace?: never;
|
|
335
|
+
};
|
|
336
|
+
"/files/upload": {
|
|
337
|
+
parameters: {
|
|
338
|
+
query?: never;
|
|
339
|
+
header?: never;
|
|
340
|
+
path?: never;
|
|
341
|
+
cookie?: never;
|
|
342
|
+
};
|
|
343
|
+
get?: never;
|
|
344
|
+
put?: never;
|
|
345
|
+
/**
|
|
346
|
+
* Upload files to sandbox
|
|
347
|
+
* @description Uploads one or multiple files to specified paths within the sandbox.
|
|
348
|
+
* Reads metadata and file content from multipart form parts in sequence.
|
|
349
|
+
* Each file upload consists of two parts: a metadata part (JSON) followed
|
|
350
|
+
* by the actual file part.
|
|
351
|
+
*/
|
|
352
|
+
post: operations["uploadFile"];
|
|
353
|
+
delete?: never;
|
|
354
|
+
options?: never;
|
|
355
|
+
head?: never;
|
|
356
|
+
patch?: never;
|
|
357
|
+
trace?: never;
|
|
358
|
+
};
|
|
359
|
+
"/files/download": {
|
|
360
|
+
parameters: {
|
|
361
|
+
query?: never;
|
|
362
|
+
header?: never;
|
|
363
|
+
path?: never;
|
|
364
|
+
cookie?: never;
|
|
365
|
+
};
|
|
366
|
+
/**
|
|
367
|
+
* Download file from sandbox
|
|
368
|
+
* @description Downloads a file from the specified path within the sandbox. Supports HTTP
|
|
369
|
+
* range requests for resumable downloads and partial content retrieval.
|
|
370
|
+
* Returns file as octet-stream with appropriate headers.
|
|
371
|
+
*/
|
|
372
|
+
get: operations["downloadFile"];
|
|
373
|
+
put?: never;
|
|
374
|
+
post?: never;
|
|
375
|
+
delete?: never;
|
|
376
|
+
options?: never;
|
|
377
|
+
head?: never;
|
|
378
|
+
patch?: never;
|
|
379
|
+
trace?: never;
|
|
380
|
+
};
|
|
381
|
+
"/directories": {
|
|
382
|
+
parameters: {
|
|
383
|
+
query?: never;
|
|
384
|
+
header?: never;
|
|
385
|
+
path?: never;
|
|
386
|
+
cookie?: never;
|
|
387
|
+
};
|
|
388
|
+
get?: never;
|
|
389
|
+
put?: never;
|
|
390
|
+
/**
|
|
391
|
+
* Create directories
|
|
392
|
+
* @description Creates one or multiple directories with specified permissions. Creates parent
|
|
393
|
+
* directories as needed (similar to mkdir -p). Accepts a map of directory paths
|
|
394
|
+
* to permission objects.
|
|
395
|
+
*/
|
|
396
|
+
post: operations["makeDirs"];
|
|
397
|
+
/**
|
|
398
|
+
* Delete directories
|
|
399
|
+
* @description Recursively deletes one or multiple directories and all their contents.
|
|
400
|
+
* Similar to rm -rf. Use with caution as this operation cannot be undone.
|
|
401
|
+
*/
|
|
402
|
+
delete: operations["removeDirs"];
|
|
403
|
+
options?: never;
|
|
404
|
+
head?: never;
|
|
405
|
+
patch?: never;
|
|
406
|
+
trace?: never;
|
|
407
|
+
};
|
|
408
|
+
"/metrics": {
|
|
409
|
+
parameters: {
|
|
410
|
+
query?: never;
|
|
411
|
+
header?: never;
|
|
412
|
+
path?: never;
|
|
413
|
+
cookie?: never;
|
|
414
|
+
};
|
|
415
|
+
/**
|
|
416
|
+
* Get system metrics
|
|
417
|
+
* @description Retrieves current system resource metrics including CPU usage percentage,
|
|
418
|
+
* CPU core count, total memory, used memory, and timestamp. Provides a snapshot
|
|
419
|
+
* of system resource utilization at the time of request.
|
|
420
|
+
*/
|
|
421
|
+
get: operations["getMetrics"];
|
|
422
|
+
put?: never;
|
|
423
|
+
post?: never;
|
|
424
|
+
delete?: never;
|
|
425
|
+
options?: never;
|
|
426
|
+
head?: never;
|
|
427
|
+
patch?: never;
|
|
428
|
+
trace?: never;
|
|
429
|
+
};
|
|
430
|
+
"/metrics/watch": {
|
|
431
|
+
parameters: {
|
|
432
|
+
query?: never;
|
|
433
|
+
header?: never;
|
|
434
|
+
path?: never;
|
|
435
|
+
cookie?: never;
|
|
436
|
+
};
|
|
437
|
+
/**
|
|
438
|
+
* Watch system metrics in real-time
|
|
439
|
+
* @description Streams system resource metrics in real-time using Server-Sent Events (SSE).
|
|
440
|
+
* Updates are sent every second, providing continuous monitoring of CPU usage,
|
|
441
|
+
* memory usage, and other system metrics. The connection remains open until
|
|
442
|
+
* the client disconnects.
|
|
443
|
+
*/
|
|
444
|
+
get: operations["watchMetrics"];
|
|
445
|
+
put?: never;
|
|
446
|
+
post?: never;
|
|
447
|
+
delete?: never;
|
|
448
|
+
options?: never;
|
|
449
|
+
head?: never;
|
|
450
|
+
patch?: never;
|
|
451
|
+
trace?: never;
|
|
452
|
+
};
|
|
453
|
+
}
|
|
454
|
+
export type webhooks = Record<string, never>;
|
|
455
|
+
export interface components {
|
|
456
|
+
schemas: {
|
|
457
|
+
/** @description Request to create a code execution context */
|
|
458
|
+
CodeContextRequest: {
|
|
459
|
+
/**
|
|
460
|
+
* @description Execution runtime (python, bash, java, etc.)
|
|
461
|
+
* @example python
|
|
462
|
+
*/
|
|
463
|
+
language?: string;
|
|
464
|
+
};
|
|
465
|
+
/** @description Code execution context with session identifier */
|
|
466
|
+
CodeContext: {
|
|
467
|
+
/**
|
|
468
|
+
* @description Unique session identifier returned by CreateContext
|
|
469
|
+
* @example session-abc123
|
|
470
|
+
*/
|
|
471
|
+
id?: string;
|
|
472
|
+
/**
|
|
473
|
+
* @description Execution runtime
|
|
474
|
+
* @example python
|
|
475
|
+
*/
|
|
476
|
+
language: string;
|
|
477
|
+
};
|
|
478
|
+
/** @description Request to execute code in a context */
|
|
479
|
+
RunCodeRequest: {
|
|
480
|
+
context?: components["schemas"]["CodeContext"];
|
|
481
|
+
/**
|
|
482
|
+
* @description Source code to execute
|
|
483
|
+
* @example import numpy as np
|
|
484
|
+
* result = np.array([1, 2, 3])
|
|
485
|
+
* print(result)
|
|
486
|
+
*/
|
|
487
|
+
code: string;
|
|
488
|
+
};
|
|
489
|
+
/** @description Request to execute a shell command */
|
|
490
|
+
RunCommandRequest: {
|
|
491
|
+
/**
|
|
492
|
+
* @description Shell command to execute
|
|
493
|
+
* @example ls -la /workspace
|
|
494
|
+
*/
|
|
495
|
+
command: string;
|
|
496
|
+
/**
|
|
497
|
+
* @description Working directory for command execution
|
|
498
|
+
* @example /workspace
|
|
499
|
+
*/
|
|
500
|
+
cwd?: string;
|
|
501
|
+
/**
|
|
502
|
+
* @description Whether to run command in detached mode
|
|
503
|
+
* @default false
|
|
504
|
+
* @example false
|
|
505
|
+
*/
|
|
506
|
+
background: boolean;
|
|
507
|
+
};
|
|
508
|
+
/** @description Command execution status (foreground or background) */
|
|
509
|
+
CommandStatusResponse: {
|
|
510
|
+
/**
|
|
511
|
+
* @description Command ID returned by RunCommand
|
|
512
|
+
* @example cmd-abc123
|
|
513
|
+
*/
|
|
514
|
+
id?: string;
|
|
515
|
+
/**
|
|
516
|
+
* @description Original command content
|
|
517
|
+
* @example ls -la
|
|
518
|
+
*/
|
|
519
|
+
content?: string;
|
|
520
|
+
/**
|
|
521
|
+
* @description Whether the command is still running
|
|
522
|
+
* @example false
|
|
523
|
+
*/
|
|
524
|
+
running?: boolean;
|
|
525
|
+
/**
|
|
526
|
+
* Format: int32
|
|
527
|
+
* @description Exit code if the command has finished
|
|
528
|
+
* @example 0
|
|
529
|
+
*/
|
|
530
|
+
exit_code?: number | null;
|
|
531
|
+
/**
|
|
532
|
+
* @description Error message if the command failed
|
|
533
|
+
* @example permission denied
|
|
534
|
+
*/
|
|
535
|
+
error?: string;
|
|
536
|
+
/**
|
|
537
|
+
* Format: date-time
|
|
538
|
+
* @description Start time in RFC3339 format
|
|
539
|
+
* @example 2025-12-22T09:08:05Z
|
|
540
|
+
*/
|
|
541
|
+
started_at?: string;
|
|
542
|
+
/**
|
|
543
|
+
* Format: date-time
|
|
544
|
+
* @description Finish time in RFC3339 format (null if still running)
|
|
545
|
+
* @example 2025-12-22T09:08:09Z
|
|
546
|
+
*/
|
|
547
|
+
finished_at?: string | null;
|
|
548
|
+
};
|
|
549
|
+
/** @description Server-sent event for streaming execution output */
|
|
550
|
+
ServerStreamEvent: {
|
|
551
|
+
/**
|
|
552
|
+
* @description Event type for client-side handling
|
|
553
|
+
* @example stdout
|
|
554
|
+
* @enum {string}
|
|
555
|
+
*/
|
|
556
|
+
type?: "init" | "status" | "error" | "stdout" | "stderr" | "result" | "execution_complete" | "execution_count" | "ping";
|
|
557
|
+
/**
|
|
558
|
+
* @description Textual data for status, init, and stream events
|
|
559
|
+
* @example Hello, World!
|
|
560
|
+
*/
|
|
561
|
+
text?: string;
|
|
562
|
+
/**
|
|
563
|
+
* @description Cell execution number in the session
|
|
564
|
+
* @example 1
|
|
565
|
+
*/
|
|
566
|
+
execution_count?: number;
|
|
567
|
+
/**
|
|
568
|
+
* Format: int64
|
|
569
|
+
* @description Execution duration in milliseconds
|
|
570
|
+
* @example 150
|
|
571
|
+
*/
|
|
572
|
+
execution_time?: number;
|
|
573
|
+
/**
|
|
574
|
+
* Format: int64
|
|
575
|
+
* @description When the event was generated (Unix milliseconds)
|
|
576
|
+
* @example 1700000000000
|
|
577
|
+
*/
|
|
578
|
+
timestamp?: number;
|
|
579
|
+
/**
|
|
580
|
+
* @description Execution output in various MIME types (e.g., "text/plain", "text/html")
|
|
581
|
+
* @example {
|
|
582
|
+
* "text/plain": "4"
|
|
583
|
+
* }
|
|
584
|
+
*/
|
|
585
|
+
results?: {
|
|
586
|
+
[key: string]: unknown;
|
|
587
|
+
};
|
|
588
|
+
/** @description Execution error details if an error occurred */
|
|
589
|
+
error?: {
|
|
590
|
+
/**
|
|
591
|
+
* @description Error name/type
|
|
592
|
+
* @example NameError
|
|
593
|
+
*/
|
|
594
|
+
ename?: string;
|
|
595
|
+
/**
|
|
596
|
+
* @description Error value/message
|
|
597
|
+
* @example name 'undefined_var' is not defined
|
|
598
|
+
*/
|
|
599
|
+
evalue?: string;
|
|
600
|
+
/**
|
|
601
|
+
* @description Stack trace lines
|
|
602
|
+
* @example [
|
|
603
|
+
* "Traceback (most recent call last):",
|
|
604
|
+
* " File \"<stdin>\", line 1, in <module>",
|
|
605
|
+
* "NameError: name 'undefined_var' is not defined"
|
|
606
|
+
* ]
|
|
607
|
+
*/
|
|
608
|
+
traceback?: string[];
|
|
609
|
+
};
|
|
610
|
+
};
|
|
611
|
+
/** @description File metadata including path and permissions */
|
|
612
|
+
FileInfo: {
|
|
613
|
+
/**
|
|
614
|
+
* @description Absolute file path
|
|
615
|
+
* @example /workspace/file.txt
|
|
616
|
+
*/
|
|
617
|
+
path: string;
|
|
618
|
+
/**
|
|
619
|
+
* Format: int64
|
|
620
|
+
* @description File size in bytes
|
|
621
|
+
* @example 2048
|
|
622
|
+
*/
|
|
623
|
+
size: number;
|
|
624
|
+
/**
|
|
625
|
+
* Format: date-time
|
|
626
|
+
* @description Last modification time
|
|
627
|
+
* @example 2025-11-16T14:30:45Z
|
|
628
|
+
*/
|
|
629
|
+
modified_at: string;
|
|
630
|
+
/**
|
|
631
|
+
* Format: date-time
|
|
632
|
+
* @description File creation time
|
|
633
|
+
* @example 2025-11-16T14:30:45Z
|
|
634
|
+
*/
|
|
635
|
+
created_at: string;
|
|
636
|
+
/**
|
|
637
|
+
* @description File owner username
|
|
638
|
+
* @example admin
|
|
639
|
+
*/
|
|
640
|
+
owner: string;
|
|
641
|
+
/**
|
|
642
|
+
* @description File group name
|
|
643
|
+
* @example admin
|
|
644
|
+
*/
|
|
645
|
+
group: string;
|
|
646
|
+
/**
|
|
647
|
+
* @description File permissions in octal format
|
|
648
|
+
* @example 755
|
|
649
|
+
*/
|
|
650
|
+
mode: number;
|
|
651
|
+
};
|
|
652
|
+
/** @description File ownership and mode settings */
|
|
653
|
+
Permission: {
|
|
654
|
+
/**
|
|
655
|
+
* @description Owner username
|
|
656
|
+
* @example root
|
|
657
|
+
*/
|
|
658
|
+
owner?: string;
|
|
659
|
+
/**
|
|
660
|
+
* @description Group name
|
|
661
|
+
* @example root
|
|
662
|
+
*/
|
|
663
|
+
group?: string;
|
|
664
|
+
/**
|
|
665
|
+
* @description Permission mode in octal format (e.g., 644, 755)
|
|
666
|
+
* @default 755
|
|
667
|
+
* @example 755
|
|
668
|
+
*/
|
|
669
|
+
mode: number;
|
|
670
|
+
};
|
|
671
|
+
/** @description File metadata for upload operations */
|
|
672
|
+
FileMetadata: {
|
|
673
|
+
/**
|
|
674
|
+
* @description Target file path
|
|
675
|
+
* @example /workspace/upload.txt
|
|
676
|
+
*/
|
|
677
|
+
path?: string;
|
|
678
|
+
/**
|
|
679
|
+
* @description File owner
|
|
680
|
+
* @example admin
|
|
681
|
+
*/
|
|
682
|
+
owner?: string;
|
|
683
|
+
/**
|
|
684
|
+
* @description File group
|
|
685
|
+
* @example admin
|
|
686
|
+
*/
|
|
687
|
+
group?: string;
|
|
688
|
+
/**
|
|
689
|
+
* @description File permissions in octal
|
|
690
|
+
* @example 755
|
|
691
|
+
*/
|
|
692
|
+
mode?: number;
|
|
693
|
+
};
|
|
694
|
+
/** @description File rename/move operation */
|
|
695
|
+
RenameFileItem: {
|
|
696
|
+
/**
|
|
697
|
+
* @description Source file path
|
|
698
|
+
* @example /workspace/old.txt
|
|
699
|
+
*/
|
|
700
|
+
src: string;
|
|
701
|
+
/**
|
|
702
|
+
* @description Destination file path
|
|
703
|
+
* @example /workspace/new.txt
|
|
704
|
+
*/
|
|
705
|
+
dest: string;
|
|
706
|
+
};
|
|
707
|
+
/** @description Content replacement operation */
|
|
708
|
+
ReplaceFileContentItem: {
|
|
709
|
+
/**
|
|
710
|
+
* @description String to be replaced
|
|
711
|
+
* @example localhost
|
|
712
|
+
*/
|
|
713
|
+
old: string;
|
|
714
|
+
/**
|
|
715
|
+
* @description Replacement string
|
|
716
|
+
* @example 0.0.0.0
|
|
717
|
+
*/
|
|
718
|
+
new: string;
|
|
719
|
+
};
|
|
720
|
+
/** @description System resource usage metrics */
|
|
721
|
+
Metrics: {
|
|
722
|
+
/**
|
|
723
|
+
* Format: float
|
|
724
|
+
* @description Number of CPU cores
|
|
725
|
+
* @example 4
|
|
726
|
+
*/
|
|
727
|
+
cpu_count: number;
|
|
728
|
+
/**
|
|
729
|
+
* Format: float
|
|
730
|
+
* @description CPU usage percentage
|
|
731
|
+
* @example 45.5
|
|
732
|
+
*/
|
|
733
|
+
cpu_used_pct: number;
|
|
734
|
+
/**
|
|
735
|
+
* Format: float
|
|
736
|
+
* @description Total memory in MiB
|
|
737
|
+
* @example 8192
|
|
738
|
+
*/
|
|
739
|
+
mem_total_mib: number;
|
|
740
|
+
/**
|
|
741
|
+
* Format: float
|
|
742
|
+
* @description Used memory in MiB
|
|
743
|
+
* @example 4096
|
|
744
|
+
*/
|
|
745
|
+
mem_used_mib: number;
|
|
746
|
+
/**
|
|
747
|
+
* Format: int64
|
|
748
|
+
* @description Timestamp when metrics were collected (Unix milliseconds)
|
|
749
|
+
* @example 1700000000000
|
|
750
|
+
*/
|
|
751
|
+
timestamp: number;
|
|
752
|
+
};
|
|
753
|
+
/** @description Standard error response format */
|
|
754
|
+
ErrorResponse: {
|
|
755
|
+
/**
|
|
756
|
+
* @description Error code for programmatic handling
|
|
757
|
+
* @example INVALID_REQUEST_BODY
|
|
758
|
+
*/
|
|
759
|
+
code: string;
|
|
760
|
+
/**
|
|
761
|
+
* @description Human-readable error message
|
|
762
|
+
* @example error parsing request, MAYBE invalid body format
|
|
763
|
+
*/
|
|
764
|
+
message: string;
|
|
765
|
+
};
|
|
766
|
+
};
|
|
767
|
+
responses: {
|
|
768
|
+
/** @description Invalid request body format or missing required fields */
|
|
769
|
+
BadRequest: {
|
|
770
|
+
headers: {
|
|
771
|
+
[name: string]: unknown;
|
|
772
|
+
};
|
|
773
|
+
content: {
|
|
774
|
+
/**
|
|
775
|
+
* @example {
|
|
776
|
+
* "code": "INVALID_REQUEST_BODY",
|
|
777
|
+
* "message": "error parsing request, MAYBE invalid body format"
|
|
778
|
+
* }
|
|
779
|
+
*/
|
|
780
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
781
|
+
};
|
|
782
|
+
};
|
|
783
|
+
/** @description File or resource not found */
|
|
784
|
+
NotFound: {
|
|
785
|
+
headers: {
|
|
786
|
+
[name: string]: unknown;
|
|
787
|
+
};
|
|
788
|
+
content: {
|
|
789
|
+
/**
|
|
790
|
+
* @example {
|
|
791
|
+
* "code": "FILE_NOT_FOUND",
|
|
792
|
+
* "message": "file not found"
|
|
793
|
+
* }
|
|
794
|
+
*/
|
|
795
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
796
|
+
};
|
|
797
|
+
};
|
|
798
|
+
/** @description Runtime server error during operation */
|
|
799
|
+
InternalServerError: {
|
|
800
|
+
headers: {
|
|
801
|
+
[name: string]: unknown;
|
|
802
|
+
};
|
|
803
|
+
content: {
|
|
804
|
+
/**
|
|
805
|
+
* @example {
|
|
806
|
+
* "code": "RUNTIME_ERROR",
|
|
807
|
+
* "message": "error running code execution"
|
|
808
|
+
* }
|
|
809
|
+
*/
|
|
810
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
811
|
+
};
|
|
812
|
+
};
|
|
813
|
+
};
|
|
814
|
+
parameters: never;
|
|
815
|
+
requestBodies: never;
|
|
816
|
+
headers: never;
|
|
817
|
+
pathItems: never;
|
|
818
|
+
}
|
|
819
|
+
export type $defs = Record<string, never>;
|
|
820
|
+
export interface operations {
|
|
821
|
+
ping: {
|
|
822
|
+
parameters: {
|
|
823
|
+
query?: never;
|
|
824
|
+
header?: never;
|
|
825
|
+
path?: never;
|
|
826
|
+
cookie?: never;
|
|
827
|
+
};
|
|
828
|
+
requestBody?: never;
|
|
829
|
+
responses: {
|
|
830
|
+
/** @description Server is alive and healthy */
|
|
831
|
+
200: {
|
|
832
|
+
headers: {
|
|
833
|
+
[name: string]: unknown;
|
|
834
|
+
};
|
|
835
|
+
content?: never;
|
|
836
|
+
};
|
|
837
|
+
};
|
|
838
|
+
};
|
|
839
|
+
listContexts: {
|
|
840
|
+
parameters: {
|
|
841
|
+
query: {
|
|
842
|
+
/**
|
|
843
|
+
* @description Filter contexts by execution runtime (python, bash, java, etc.)
|
|
844
|
+
* @example python
|
|
845
|
+
*/
|
|
846
|
+
language: string;
|
|
847
|
+
};
|
|
848
|
+
header?: never;
|
|
849
|
+
path?: never;
|
|
850
|
+
cookie?: never;
|
|
851
|
+
};
|
|
852
|
+
requestBody?: never;
|
|
853
|
+
responses: {
|
|
854
|
+
/** @description Array of active contexts */
|
|
855
|
+
200: {
|
|
856
|
+
headers: {
|
|
857
|
+
[name: string]: unknown;
|
|
858
|
+
};
|
|
859
|
+
content: {
|
|
860
|
+
"application/json": components["schemas"]["CodeContext"][];
|
|
861
|
+
};
|
|
862
|
+
};
|
|
863
|
+
400: components["responses"]["BadRequest"];
|
|
864
|
+
500: components["responses"]["InternalServerError"];
|
|
865
|
+
};
|
|
866
|
+
};
|
|
867
|
+
deleteContextsByLanguage: {
|
|
868
|
+
parameters: {
|
|
869
|
+
query: {
|
|
870
|
+
/**
|
|
871
|
+
* @description Target execution runtime whose contexts should be deleted
|
|
872
|
+
* @example python
|
|
873
|
+
*/
|
|
874
|
+
language: string;
|
|
875
|
+
};
|
|
876
|
+
header?: never;
|
|
877
|
+
path?: never;
|
|
878
|
+
cookie?: never;
|
|
879
|
+
};
|
|
880
|
+
requestBody?: never;
|
|
881
|
+
responses: {
|
|
882
|
+
/** @description Contexts deleted successfully */
|
|
883
|
+
200: {
|
|
884
|
+
headers: {
|
|
885
|
+
[name: string]: unknown;
|
|
886
|
+
};
|
|
887
|
+
content?: never;
|
|
888
|
+
};
|
|
889
|
+
400: components["responses"]["BadRequest"];
|
|
890
|
+
500: components["responses"]["InternalServerError"];
|
|
891
|
+
};
|
|
892
|
+
};
|
|
893
|
+
getContext: {
|
|
894
|
+
parameters: {
|
|
895
|
+
query?: never;
|
|
896
|
+
header?: never;
|
|
897
|
+
path: {
|
|
898
|
+
/**
|
|
899
|
+
* @description Session/context id to get
|
|
900
|
+
* @example session-abc123
|
|
901
|
+
*/
|
|
902
|
+
context_id: string;
|
|
903
|
+
};
|
|
904
|
+
cookie?: never;
|
|
905
|
+
};
|
|
906
|
+
requestBody?: never;
|
|
907
|
+
responses: {
|
|
908
|
+
/** @description Context details retrieved successfully */
|
|
909
|
+
200: {
|
|
910
|
+
headers: {
|
|
911
|
+
[name: string]: unknown;
|
|
912
|
+
};
|
|
913
|
+
content: {
|
|
914
|
+
"application/json": components["schemas"]["CodeContext"];
|
|
915
|
+
};
|
|
916
|
+
};
|
|
917
|
+
404: components["responses"]["NotFound"];
|
|
918
|
+
500: components["responses"]["InternalServerError"];
|
|
919
|
+
};
|
|
920
|
+
};
|
|
921
|
+
deleteContext: {
|
|
922
|
+
parameters: {
|
|
923
|
+
query?: never;
|
|
924
|
+
header?: never;
|
|
925
|
+
path: {
|
|
926
|
+
/**
|
|
927
|
+
* @description Session/context id to delete
|
|
928
|
+
* @example session-abc123
|
|
929
|
+
*/
|
|
930
|
+
context_id: string;
|
|
931
|
+
};
|
|
932
|
+
cookie?: never;
|
|
933
|
+
};
|
|
934
|
+
requestBody?: never;
|
|
935
|
+
responses: {
|
|
936
|
+
/** @description Context deleted successfully */
|
|
937
|
+
200: {
|
|
938
|
+
headers: {
|
|
939
|
+
[name: string]: unknown;
|
|
940
|
+
};
|
|
941
|
+
content?: never;
|
|
942
|
+
};
|
|
943
|
+
400: components["responses"]["BadRequest"];
|
|
944
|
+
404: components["responses"]["NotFound"];
|
|
945
|
+
500: components["responses"]["InternalServerError"];
|
|
946
|
+
};
|
|
947
|
+
};
|
|
948
|
+
createCodeContext: {
|
|
949
|
+
parameters: {
|
|
950
|
+
query?: never;
|
|
951
|
+
header?: never;
|
|
952
|
+
path?: never;
|
|
953
|
+
cookie?: never;
|
|
954
|
+
};
|
|
955
|
+
requestBody: {
|
|
956
|
+
content: {
|
|
957
|
+
"application/json": components["schemas"]["CodeContextRequest"];
|
|
958
|
+
};
|
|
959
|
+
};
|
|
960
|
+
responses: {
|
|
961
|
+
/** @description Successfully created context with session ID */
|
|
962
|
+
200: {
|
|
963
|
+
headers: {
|
|
964
|
+
[name: string]: unknown;
|
|
965
|
+
};
|
|
966
|
+
content: {
|
|
967
|
+
"application/json": components["schemas"]["CodeContext"];
|
|
968
|
+
};
|
|
969
|
+
};
|
|
970
|
+
400: components["responses"]["BadRequest"];
|
|
971
|
+
500: components["responses"]["InternalServerError"];
|
|
972
|
+
};
|
|
973
|
+
};
|
|
974
|
+
runCode: {
|
|
975
|
+
parameters: {
|
|
976
|
+
query?: never;
|
|
977
|
+
header?: never;
|
|
978
|
+
path?: never;
|
|
979
|
+
cookie?: never;
|
|
980
|
+
};
|
|
981
|
+
requestBody: {
|
|
982
|
+
content: {
|
|
983
|
+
"application/json": components["schemas"]["RunCodeRequest"];
|
|
984
|
+
};
|
|
985
|
+
};
|
|
986
|
+
responses: {
|
|
987
|
+
/** @description Stream of code execution events */
|
|
988
|
+
200: {
|
|
989
|
+
headers: {
|
|
990
|
+
[name: string]: unknown;
|
|
991
|
+
};
|
|
992
|
+
content: {
|
|
993
|
+
"text/event-stream": components["schemas"]["ServerStreamEvent"];
|
|
994
|
+
};
|
|
995
|
+
};
|
|
996
|
+
400: components["responses"]["BadRequest"];
|
|
997
|
+
500: components["responses"]["InternalServerError"];
|
|
998
|
+
};
|
|
999
|
+
};
|
|
1000
|
+
interruptCode: {
|
|
1001
|
+
parameters: {
|
|
1002
|
+
query: {
|
|
1003
|
+
/**
|
|
1004
|
+
* @description Session ID of the execution context to interrupt
|
|
1005
|
+
* @example session-123
|
|
1006
|
+
*/
|
|
1007
|
+
id: string;
|
|
1008
|
+
};
|
|
1009
|
+
header?: never;
|
|
1010
|
+
path?: never;
|
|
1011
|
+
cookie?: never;
|
|
1012
|
+
};
|
|
1013
|
+
requestBody?: never;
|
|
1014
|
+
responses: {
|
|
1015
|
+
/** @description Code execution successfully interrupted */
|
|
1016
|
+
200: {
|
|
1017
|
+
headers: {
|
|
1018
|
+
[name: string]: unknown;
|
|
1019
|
+
};
|
|
1020
|
+
content?: never;
|
|
1021
|
+
};
|
|
1022
|
+
400: components["responses"]["BadRequest"];
|
|
1023
|
+
500: components["responses"]["InternalServerError"];
|
|
1024
|
+
};
|
|
1025
|
+
};
|
|
1026
|
+
runCommand: {
|
|
1027
|
+
parameters: {
|
|
1028
|
+
query?: never;
|
|
1029
|
+
header?: never;
|
|
1030
|
+
path?: never;
|
|
1031
|
+
cookie?: never;
|
|
1032
|
+
};
|
|
1033
|
+
requestBody: {
|
|
1034
|
+
content: {
|
|
1035
|
+
"application/json": components["schemas"]["RunCommandRequest"];
|
|
1036
|
+
};
|
|
1037
|
+
};
|
|
1038
|
+
responses: {
|
|
1039
|
+
/** @description Stream of command execution events */
|
|
1040
|
+
200: {
|
|
1041
|
+
headers: {
|
|
1042
|
+
[name: string]: unknown;
|
|
1043
|
+
};
|
|
1044
|
+
content: {
|
|
1045
|
+
"text/event-stream": components["schemas"]["ServerStreamEvent"];
|
|
1046
|
+
};
|
|
1047
|
+
};
|
|
1048
|
+
400: components["responses"]["BadRequest"];
|
|
1049
|
+
500: components["responses"]["InternalServerError"];
|
|
1050
|
+
};
|
|
1051
|
+
};
|
|
1052
|
+
interruptCommand: {
|
|
1053
|
+
parameters: {
|
|
1054
|
+
query: {
|
|
1055
|
+
/**
|
|
1056
|
+
* @description Session ID of the execution context to interrupt
|
|
1057
|
+
* @example session-456
|
|
1058
|
+
*/
|
|
1059
|
+
id: string;
|
|
1060
|
+
};
|
|
1061
|
+
header?: never;
|
|
1062
|
+
path?: never;
|
|
1063
|
+
cookie?: never;
|
|
1064
|
+
};
|
|
1065
|
+
requestBody?: never;
|
|
1066
|
+
responses: {
|
|
1067
|
+
/** @description Command execution successfully interrupted */
|
|
1068
|
+
200: {
|
|
1069
|
+
headers: {
|
|
1070
|
+
[name: string]: unknown;
|
|
1071
|
+
};
|
|
1072
|
+
content?: never;
|
|
1073
|
+
};
|
|
1074
|
+
400: components["responses"]["BadRequest"];
|
|
1075
|
+
500: components["responses"]["InternalServerError"];
|
|
1076
|
+
};
|
|
1077
|
+
};
|
|
1078
|
+
getCommandStatus: {
|
|
1079
|
+
parameters: {
|
|
1080
|
+
query?: never;
|
|
1081
|
+
header?: never;
|
|
1082
|
+
path: {
|
|
1083
|
+
/**
|
|
1084
|
+
* @description Command ID returned by RunCommand
|
|
1085
|
+
* @example cmd-abc123
|
|
1086
|
+
*/
|
|
1087
|
+
id: string;
|
|
1088
|
+
};
|
|
1089
|
+
cookie?: never;
|
|
1090
|
+
};
|
|
1091
|
+
requestBody?: never;
|
|
1092
|
+
responses: {
|
|
1093
|
+
/** @description Command status */
|
|
1094
|
+
200: {
|
|
1095
|
+
headers: {
|
|
1096
|
+
[name: string]: unknown;
|
|
1097
|
+
};
|
|
1098
|
+
content: {
|
|
1099
|
+
"application/json": components["schemas"]["CommandStatusResponse"];
|
|
1100
|
+
};
|
|
1101
|
+
};
|
|
1102
|
+
400: components["responses"]["BadRequest"];
|
|
1103
|
+
404: components["responses"]["NotFound"];
|
|
1104
|
+
500: components["responses"]["InternalServerError"];
|
|
1105
|
+
};
|
|
1106
|
+
};
|
|
1107
|
+
getBackgroundCommandLogs: {
|
|
1108
|
+
parameters: {
|
|
1109
|
+
query?: {
|
|
1110
|
+
/**
|
|
1111
|
+
* @description Optional 0-based line cursor (behaves like a file seek). When provided, only
|
|
1112
|
+
* stdout/stderr lines after this line are returned. The response includes the
|
|
1113
|
+
* latest line index (`cursor`) so the client can request incremental output
|
|
1114
|
+
* on subsequent calls. If omitted, the full log is returned.
|
|
1115
|
+
* @example 120
|
|
1116
|
+
*/
|
|
1117
|
+
cursor?: number;
|
|
1118
|
+
};
|
|
1119
|
+
header?: never;
|
|
1120
|
+
path: {
|
|
1121
|
+
/**
|
|
1122
|
+
* @description Command ID returned by RunCommand
|
|
1123
|
+
* @example cmd-abc123
|
|
1124
|
+
*/
|
|
1125
|
+
id: string;
|
|
1126
|
+
};
|
|
1127
|
+
cookie?: never;
|
|
1128
|
+
};
|
|
1129
|
+
requestBody?: never;
|
|
1130
|
+
responses: {
|
|
1131
|
+
/** @description Command output (plain text) and status metadata via headers */
|
|
1132
|
+
200: {
|
|
1133
|
+
headers: {
|
|
1134
|
+
/** @description Highest available 0-based line index after applying the request cursor (use as the next cursor for incremental reads) */
|
|
1135
|
+
"EXECD-COMMANDS-TAIL-CURSOR"?: number;
|
|
1136
|
+
[name: string]: unknown;
|
|
1137
|
+
};
|
|
1138
|
+
content: {
|
|
1139
|
+
/**
|
|
1140
|
+
* @example line1
|
|
1141
|
+
* line2
|
|
1142
|
+
* warn: something on stderr
|
|
1143
|
+
*/
|
|
1144
|
+
"text/plain": string;
|
|
1145
|
+
};
|
|
1146
|
+
};
|
|
1147
|
+
400: components["responses"]["BadRequest"];
|
|
1148
|
+
404: components["responses"]["NotFound"];
|
|
1149
|
+
500: components["responses"]["InternalServerError"];
|
|
1150
|
+
};
|
|
1151
|
+
};
|
|
1152
|
+
getFilesInfo: {
|
|
1153
|
+
parameters: {
|
|
1154
|
+
query: {
|
|
1155
|
+
/** @description File path(s) to get info for (can be specified multiple times) */
|
|
1156
|
+
path: string[];
|
|
1157
|
+
};
|
|
1158
|
+
header?: never;
|
|
1159
|
+
path?: never;
|
|
1160
|
+
cookie?: never;
|
|
1161
|
+
};
|
|
1162
|
+
requestBody?: never;
|
|
1163
|
+
responses: {
|
|
1164
|
+
/** @description Map of file paths to FileInfo objects */
|
|
1165
|
+
200: {
|
|
1166
|
+
headers: {
|
|
1167
|
+
[name: string]: unknown;
|
|
1168
|
+
};
|
|
1169
|
+
content: {
|
|
1170
|
+
"application/json": {
|
|
1171
|
+
[key: string]: components["schemas"]["FileInfo"];
|
|
1172
|
+
};
|
|
1173
|
+
};
|
|
1174
|
+
};
|
|
1175
|
+
404: components["responses"]["NotFound"];
|
|
1176
|
+
500: components["responses"]["InternalServerError"];
|
|
1177
|
+
};
|
|
1178
|
+
};
|
|
1179
|
+
removeFiles: {
|
|
1180
|
+
parameters: {
|
|
1181
|
+
query: {
|
|
1182
|
+
/**
|
|
1183
|
+
* @description File path(s) to delete (can be specified multiple times)
|
|
1184
|
+
* @example [
|
|
1185
|
+
* "/workspace/temp.txt"
|
|
1186
|
+
* ]
|
|
1187
|
+
*/
|
|
1188
|
+
path: string[];
|
|
1189
|
+
};
|
|
1190
|
+
header?: never;
|
|
1191
|
+
path?: never;
|
|
1192
|
+
cookie?: never;
|
|
1193
|
+
};
|
|
1194
|
+
requestBody?: never;
|
|
1195
|
+
responses: {
|
|
1196
|
+
/** @description Files deleted successfully */
|
|
1197
|
+
200: {
|
|
1198
|
+
headers: {
|
|
1199
|
+
[name: string]: unknown;
|
|
1200
|
+
};
|
|
1201
|
+
content?: never;
|
|
1202
|
+
};
|
|
1203
|
+
500: components["responses"]["InternalServerError"];
|
|
1204
|
+
};
|
|
1205
|
+
};
|
|
1206
|
+
chmodFiles: {
|
|
1207
|
+
parameters: {
|
|
1208
|
+
query?: never;
|
|
1209
|
+
header?: never;
|
|
1210
|
+
path?: never;
|
|
1211
|
+
cookie?: never;
|
|
1212
|
+
};
|
|
1213
|
+
requestBody: {
|
|
1214
|
+
content: {
|
|
1215
|
+
/**
|
|
1216
|
+
* @example {
|
|
1217
|
+
* "/workspace/script.sh": {
|
|
1218
|
+
* "owner": "admin",
|
|
1219
|
+
* "group": "admin",
|
|
1220
|
+
* "mode": 755
|
|
1221
|
+
* },
|
|
1222
|
+
* "/workspace/config.json": {
|
|
1223
|
+
* "owner": "admin",
|
|
1224
|
+
* "group": "admin",
|
|
1225
|
+
* "mode": 755
|
|
1226
|
+
* }
|
|
1227
|
+
* }
|
|
1228
|
+
*/
|
|
1229
|
+
"application/json": {
|
|
1230
|
+
[key: string]: components["schemas"]["Permission"];
|
|
1231
|
+
};
|
|
1232
|
+
};
|
|
1233
|
+
};
|
|
1234
|
+
responses: {
|
|
1235
|
+
/** @description Permissions changed successfully */
|
|
1236
|
+
200: {
|
|
1237
|
+
headers: {
|
|
1238
|
+
[name: string]: unknown;
|
|
1239
|
+
};
|
|
1240
|
+
content?: never;
|
|
1241
|
+
};
|
|
1242
|
+
400: components["responses"]["BadRequest"];
|
|
1243
|
+
500: components["responses"]["InternalServerError"];
|
|
1244
|
+
};
|
|
1245
|
+
};
|
|
1246
|
+
renameFiles: {
|
|
1247
|
+
parameters: {
|
|
1248
|
+
query?: never;
|
|
1249
|
+
header?: never;
|
|
1250
|
+
path?: never;
|
|
1251
|
+
cookie?: never;
|
|
1252
|
+
};
|
|
1253
|
+
requestBody: {
|
|
1254
|
+
content: {
|
|
1255
|
+
/**
|
|
1256
|
+
* @example [
|
|
1257
|
+
* {
|
|
1258
|
+
* "src": "/workspace/old_name.txt",
|
|
1259
|
+
* "dest": "/workspace/new_name.txt"
|
|
1260
|
+
* },
|
|
1261
|
+
* {
|
|
1262
|
+
* "src": "/workspace/file.py",
|
|
1263
|
+
* "dest": "/archive/file.py"
|
|
1264
|
+
* }
|
|
1265
|
+
* ]
|
|
1266
|
+
*/
|
|
1267
|
+
"application/json": components["schemas"]["RenameFileItem"][];
|
|
1268
|
+
};
|
|
1269
|
+
};
|
|
1270
|
+
responses: {
|
|
1271
|
+
/** @description Files renamed/moved successfully */
|
|
1272
|
+
200: {
|
|
1273
|
+
headers: {
|
|
1274
|
+
[name: string]: unknown;
|
|
1275
|
+
};
|
|
1276
|
+
content?: never;
|
|
1277
|
+
};
|
|
1278
|
+
400: components["responses"]["BadRequest"];
|
|
1279
|
+
404: components["responses"]["NotFound"];
|
|
1280
|
+
500: components["responses"]["InternalServerError"];
|
|
1281
|
+
};
|
|
1282
|
+
};
|
|
1283
|
+
searchFiles: {
|
|
1284
|
+
parameters: {
|
|
1285
|
+
query: {
|
|
1286
|
+
/** @description Root directory path to search in */
|
|
1287
|
+
path: string;
|
|
1288
|
+
/** @description Glob pattern to match files (default is **) */
|
|
1289
|
+
pattern?: string;
|
|
1290
|
+
};
|
|
1291
|
+
header?: never;
|
|
1292
|
+
path?: never;
|
|
1293
|
+
cookie?: never;
|
|
1294
|
+
};
|
|
1295
|
+
requestBody?: never;
|
|
1296
|
+
responses: {
|
|
1297
|
+
/** @description Array of matching files with metadata */
|
|
1298
|
+
200: {
|
|
1299
|
+
headers: {
|
|
1300
|
+
[name: string]: unknown;
|
|
1301
|
+
};
|
|
1302
|
+
content: {
|
|
1303
|
+
"application/json": components["schemas"]["FileInfo"][];
|
|
1304
|
+
};
|
|
1305
|
+
};
|
|
1306
|
+
400: components["responses"]["BadRequest"];
|
|
1307
|
+
404: components["responses"]["NotFound"];
|
|
1308
|
+
500: components["responses"]["InternalServerError"];
|
|
1309
|
+
};
|
|
1310
|
+
};
|
|
1311
|
+
replaceContent: {
|
|
1312
|
+
parameters: {
|
|
1313
|
+
query?: never;
|
|
1314
|
+
header?: never;
|
|
1315
|
+
path?: never;
|
|
1316
|
+
cookie?: never;
|
|
1317
|
+
};
|
|
1318
|
+
requestBody: {
|
|
1319
|
+
content: {
|
|
1320
|
+
/**
|
|
1321
|
+
* @example {
|
|
1322
|
+
* "/workspace/config.yaml": {
|
|
1323
|
+
* "old": "localhost:8080",
|
|
1324
|
+
* "new": "0.0.0.0:9090"
|
|
1325
|
+
* },
|
|
1326
|
+
* "/workspace/app.py": {
|
|
1327
|
+
* "old": "DEBUG = True",
|
|
1328
|
+
* "new": "DEBUG = False"
|
|
1329
|
+
* }
|
|
1330
|
+
* }
|
|
1331
|
+
*/
|
|
1332
|
+
"application/json": {
|
|
1333
|
+
[key: string]: components["schemas"]["ReplaceFileContentItem"];
|
|
1334
|
+
};
|
|
1335
|
+
};
|
|
1336
|
+
};
|
|
1337
|
+
responses: {
|
|
1338
|
+
/** @description Content replaced successfully */
|
|
1339
|
+
200: {
|
|
1340
|
+
headers: {
|
|
1341
|
+
[name: string]: unknown;
|
|
1342
|
+
};
|
|
1343
|
+
content?: never;
|
|
1344
|
+
};
|
|
1345
|
+
400: components["responses"]["BadRequest"];
|
|
1346
|
+
500: components["responses"]["InternalServerError"];
|
|
1347
|
+
};
|
|
1348
|
+
};
|
|
1349
|
+
uploadFile: {
|
|
1350
|
+
parameters: {
|
|
1351
|
+
query?: never;
|
|
1352
|
+
header?: never;
|
|
1353
|
+
path?: never;
|
|
1354
|
+
cookie?: never;
|
|
1355
|
+
};
|
|
1356
|
+
requestBody: {
|
|
1357
|
+
content: {
|
|
1358
|
+
"multipart/form-data": {
|
|
1359
|
+
/**
|
|
1360
|
+
* @description JSON-encoded file metadata (FileMetadata object)
|
|
1361
|
+
* @example {"path":"/workspace/file.txt","owner":"admin","group":"admin","mode":755}
|
|
1362
|
+
*/
|
|
1363
|
+
metadata?: string;
|
|
1364
|
+
/**
|
|
1365
|
+
* Format: binary
|
|
1366
|
+
* @description File to upload
|
|
1367
|
+
*/
|
|
1368
|
+
file?: string;
|
|
1369
|
+
};
|
|
1370
|
+
};
|
|
1371
|
+
};
|
|
1372
|
+
responses: {
|
|
1373
|
+
/** @description Files uploaded successfully */
|
|
1374
|
+
200: {
|
|
1375
|
+
headers: {
|
|
1376
|
+
[name: string]: unknown;
|
|
1377
|
+
};
|
|
1378
|
+
content?: never;
|
|
1379
|
+
};
|
|
1380
|
+
400: components["responses"]["BadRequest"];
|
|
1381
|
+
500: components["responses"]["InternalServerError"];
|
|
1382
|
+
};
|
|
1383
|
+
};
|
|
1384
|
+
downloadFile: {
|
|
1385
|
+
parameters: {
|
|
1386
|
+
query: {
|
|
1387
|
+
/**
|
|
1388
|
+
* @description Absolute or relative path of the file to download
|
|
1389
|
+
* @example /workspace/data.csv
|
|
1390
|
+
*/
|
|
1391
|
+
path: string;
|
|
1392
|
+
};
|
|
1393
|
+
header?: {
|
|
1394
|
+
/**
|
|
1395
|
+
* @description HTTP Range header for partial content requests
|
|
1396
|
+
* @example bytes=0-1023
|
|
1397
|
+
*/
|
|
1398
|
+
Range?: string;
|
|
1399
|
+
};
|
|
1400
|
+
path?: never;
|
|
1401
|
+
cookie?: never;
|
|
1402
|
+
};
|
|
1403
|
+
requestBody?: never;
|
|
1404
|
+
responses: {
|
|
1405
|
+
/** @description File content */
|
|
1406
|
+
200: {
|
|
1407
|
+
headers: {
|
|
1408
|
+
/** @description Attachment header with filename */
|
|
1409
|
+
"Content-Disposition"?: string;
|
|
1410
|
+
/** @description File size in bytes */
|
|
1411
|
+
"Content-Length"?: number;
|
|
1412
|
+
[name: string]: unknown;
|
|
1413
|
+
};
|
|
1414
|
+
content: {
|
|
1415
|
+
"application/octet-stream": string;
|
|
1416
|
+
};
|
|
1417
|
+
};
|
|
1418
|
+
/** @description Partial file content (when Range header is provided) */
|
|
1419
|
+
206: {
|
|
1420
|
+
headers: {
|
|
1421
|
+
/** @description Range of bytes being returned */
|
|
1422
|
+
"Content-Range"?: string;
|
|
1423
|
+
/** @description Length of the returned range */
|
|
1424
|
+
"Content-Length"?: number;
|
|
1425
|
+
[name: string]: unknown;
|
|
1426
|
+
};
|
|
1427
|
+
content: {
|
|
1428
|
+
"application/octet-stream": string;
|
|
1429
|
+
};
|
|
1430
|
+
};
|
|
1431
|
+
400: components["responses"]["BadRequest"];
|
|
1432
|
+
404: components["responses"]["NotFound"];
|
|
1433
|
+
/** @description Requested range not satisfiable */
|
|
1434
|
+
416: {
|
|
1435
|
+
headers: {
|
|
1436
|
+
[name: string]: unknown;
|
|
1437
|
+
};
|
|
1438
|
+
content: {
|
|
1439
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1440
|
+
};
|
|
1441
|
+
};
|
|
1442
|
+
500: components["responses"]["InternalServerError"];
|
|
1443
|
+
};
|
|
1444
|
+
};
|
|
1445
|
+
makeDirs: {
|
|
1446
|
+
parameters: {
|
|
1447
|
+
query?: never;
|
|
1448
|
+
header?: never;
|
|
1449
|
+
path?: never;
|
|
1450
|
+
cookie?: never;
|
|
1451
|
+
};
|
|
1452
|
+
requestBody: {
|
|
1453
|
+
content: {
|
|
1454
|
+
/**
|
|
1455
|
+
* @example {
|
|
1456
|
+
* "/workspace/project": {
|
|
1457
|
+
* "owner": "admin",
|
|
1458
|
+
* "group": "admin",
|
|
1459
|
+
* "mode": 755
|
|
1460
|
+
* },
|
|
1461
|
+
* "/workspace/logs": {
|
|
1462
|
+
* "owner": "admin",
|
|
1463
|
+
* "group": "admin",
|
|
1464
|
+
* "mode": 755
|
|
1465
|
+
* }
|
|
1466
|
+
* }
|
|
1467
|
+
*/
|
|
1468
|
+
"application/json": {
|
|
1469
|
+
[key: string]: components["schemas"]["Permission"];
|
|
1470
|
+
};
|
|
1471
|
+
};
|
|
1472
|
+
};
|
|
1473
|
+
responses: {
|
|
1474
|
+
/** @description Directories created successfully */
|
|
1475
|
+
200: {
|
|
1476
|
+
headers: {
|
|
1477
|
+
[name: string]: unknown;
|
|
1478
|
+
};
|
|
1479
|
+
content?: never;
|
|
1480
|
+
};
|
|
1481
|
+
400: components["responses"]["BadRequest"];
|
|
1482
|
+
500: components["responses"]["InternalServerError"];
|
|
1483
|
+
};
|
|
1484
|
+
};
|
|
1485
|
+
removeDirs: {
|
|
1486
|
+
parameters: {
|
|
1487
|
+
query: {
|
|
1488
|
+
/**
|
|
1489
|
+
* @description Directory path(s) to delete (can be specified multiple times)
|
|
1490
|
+
* @example [
|
|
1491
|
+
* "/workspace/temp"
|
|
1492
|
+
* ]
|
|
1493
|
+
*/
|
|
1494
|
+
path: string[];
|
|
1495
|
+
};
|
|
1496
|
+
header?: never;
|
|
1497
|
+
path?: never;
|
|
1498
|
+
cookie?: never;
|
|
1499
|
+
};
|
|
1500
|
+
requestBody?: never;
|
|
1501
|
+
responses: {
|
|
1502
|
+
/** @description Directories deleted successfully */
|
|
1503
|
+
200: {
|
|
1504
|
+
headers: {
|
|
1505
|
+
[name: string]: unknown;
|
|
1506
|
+
};
|
|
1507
|
+
content?: never;
|
|
1508
|
+
};
|
|
1509
|
+
500: components["responses"]["InternalServerError"];
|
|
1510
|
+
};
|
|
1511
|
+
};
|
|
1512
|
+
getMetrics: {
|
|
1513
|
+
parameters: {
|
|
1514
|
+
query?: never;
|
|
1515
|
+
header?: never;
|
|
1516
|
+
path?: never;
|
|
1517
|
+
cookie?: never;
|
|
1518
|
+
};
|
|
1519
|
+
requestBody?: never;
|
|
1520
|
+
responses: {
|
|
1521
|
+
/** @description Current system metrics including CPU and memory usage */
|
|
1522
|
+
200: {
|
|
1523
|
+
headers: {
|
|
1524
|
+
[name: string]: unknown;
|
|
1525
|
+
};
|
|
1526
|
+
content: {
|
|
1527
|
+
"application/json": components["schemas"]["Metrics"];
|
|
1528
|
+
};
|
|
1529
|
+
};
|
|
1530
|
+
500: components["responses"]["InternalServerError"];
|
|
1531
|
+
};
|
|
1532
|
+
};
|
|
1533
|
+
watchMetrics: {
|
|
1534
|
+
parameters: {
|
|
1535
|
+
query?: never;
|
|
1536
|
+
header?: never;
|
|
1537
|
+
path?: never;
|
|
1538
|
+
cookie?: never;
|
|
1539
|
+
};
|
|
1540
|
+
requestBody?: never;
|
|
1541
|
+
responses: {
|
|
1542
|
+
/** @description Stream of system metrics updated every second */
|
|
1543
|
+
200: {
|
|
1544
|
+
headers: {
|
|
1545
|
+
[name: string]: unknown;
|
|
1546
|
+
};
|
|
1547
|
+
content: {
|
|
1548
|
+
"text/event-stream": components["schemas"]["Metrics"];
|
|
1549
|
+
};
|
|
1550
|
+
};
|
|
1551
|
+
500: components["responses"]["InternalServerError"];
|
|
1552
|
+
};
|
|
1553
|
+
};
|
|
1554
|
+
}
|
|
1555
|
+
//# sourceMappingURL=execd.d.ts.map
|