rl-rock 1.2.3 → 1.2.4
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/dist/index.d.mts +30 -173
- package/dist/index.d.ts +30 -173
- package/dist/index.js +90 -124
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +91 -124
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -11
package/dist/index.d.mts
CHANGED
|
@@ -218,21 +218,10 @@ type ChmodRequest = z.infer<typeof ChmodRequestSchema>;
|
|
|
218
218
|
* HTTP layer automatically converts from API snake_case
|
|
219
219
|
*/
|
|
220
220
|
|
|
221
|
-
/**
|
|
222
|
-
* Header-derived fields schema (reusable)
|
|
223
|
-
*/
|
|
224
|
-
declare const HeaderFieldsSchema: {
|
|
225
|
-
cluster: z.ZodOptional<z.ZodString>;
|
|
226
|
-
requestId: z.ZodOptional<z.ZodString>;
|
|
227
|
-
eagleeyeTraceid: z.ZodOptional<z.ZodString>;
|
|
228
|
-
};
|
|
229
221
|
/**
|
|
230
222
|
* Base sandbox response
|
|
231
223
|
*/
|
|
232
224
|
declare const SandboxResponseSchema: z.ZodObject<{
|
|
233
|
-
cluster: z.ZodOptional<z.ZodString>;
|
|
234
|
-
requestId: z.ZodOptional<z.ZodString>;
|
|
235
|
-
eagleeyeTraceid: z.ZodOptional<z.ZodString>;
|
|
236
225
|
code: z.ZodOptional<z.ZodNativeEnum<typeof Codes>>;
|
|
237
226
|
exitCode: z.ZodOptional<z.ZodNumber>;
|
|
238
227
|
failureReason: z.ZodOptional<z.ZodString>;
|
|
@@ -240,48 +229,30 @@ declare const SandboxResponseSchema: z.ZodObject<{
|
|
|
240
229
|
code?: Codes | undefined;
|
|
241
230
|
exitCode?: number | undefined;
|
|
242
231
|
failureReason?: string | undefined;
|
|
243
|
-
cluster?: string | undefined;
|
|
244
|
-
requestId?: string | undefined;
|
|
245
|
-
eagleeyeTraceid?: string | undefined;
|
|
246
232
|
}, {
|
|
247
233
|
code?: Codes | undefined;
|
|
248
234
|
exitCode?: number | undefined;
|
|
249
235
|
failureReason?: string | undefined;
|
|
250
|
-
cluster?: string | undefined;
|
|
251
|
-
requestId?: string | undefined;
|
|
252
|
-
eagleeyeTraceid?: string | undefined;
|
|
253
236
|
}>;
|
|
254
237
|
type SandboxResponse = z.infer<typeof SandboxResponseSchema>;
|
|
255
238
|
/**
|
|
256
239
|
* Is alive response
|
|
257
240
|
*/
|
|
258
241
|
declare const IsAliveResponseSchema: z.ZodObject<{
|
|
259
|
-
cluster: z.ZodOptional<z.ZodString>;
|
|
260
|
-
requestId: z.ZodOptional<z.ZodString>;
|
|
261
|
-
eagleeyeTraceid: z.ZodOptional<z.ZodString>;
|
|
262
242
|
isAlive: z.ZodBoolean;
|
|
263
243
|
message: z.ZodDefault<z.ZodString>;
|
|
264
244
|
}, "strip", z.ZodTypeAny, {
|
|
265
245
|
message: string;
|
|
266
246
|
isAlive: boolean;
|
|
267
|
-
cluster?: string | undefined;
|
|
268
|
-
requestId?: string | undefined;
|
|
269
|
-
eagleeyeTraceid?: string | undefined;
|
|
270
247
|
}, {
|
|
271
248
|
isAlive: boolean;
|
|
272
249
|
message?: string | undefined;
|
|
273
|
-
cluster?: string | undefined;
|
|
274
|
-
requestId?: string | undefined;
|
|
275
|
-
eagleeyeTraceid?: string | undefined;
|
|
276
250
|
}>;
|
|
277
251
|
type IsAliveResponse = z.infer<typeof IsAliveResponseSchema>;
|
|
278
252
|
/**
|
|
279
253
|
* Sandbox status response
|
|
280
254
|
*/
|
|
281
255
|
declare const SandboxStatusResponseSchema: z.ZodObject<{
|
|
282
|
-
cluster: z.ZodOptional<z.ZodString>;
|
|
283
|
-
requestId: z.ZodOptional<z.ZodString>;
|
|
284
|
-
eagleeyeTraceid: z.ZodOptional<z.ZodString>;
|
|
285
256
|
sandboxId: z.ZodOptional<z.ZodString>;
|
|
286
257
|
status: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
287
258
|
portMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -297,12 +268,12 @@ declare const SandboxStatusResponseSchema: z.ZodObject<{
|
|
|
297
268
|
cpus: z.ZodOptional<z.ZodNumber>;
|
|
298
269
|
memory: z.ZodOptional<z.ZodString>;
|
|
299
270
|
state: z.ZodOptional<z.ZodUnknown>;
|
|
271
|
+
cluster: z.ZodOptional<z.ZodString>;
|
|
272
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
273
|
+
eagleeyeTraceid: z.ZodOptional<z.ZodString>;
|
|
300
274
|
}, "strip", z.ZodTypeAny, {
|
|
301
275
|
isAlive: boolean;
|
|
302
276
|
status?: Record<string, unknown> | undefined;
|
|
303
|
-
cluster?: string | undefined;
|
|
304
|
-
requestId?: string | undefined;
|
|
305
|
-
eagleeyeTraceid?: string | undefined;
|
|
306
277
|
sandboxId?: string | undefined;
|
|
307
278
|
portMapping?: Record<string, unknown> | undefined;
|
|
308
279
|
hostName?: string | undefined;
|
|
@@ -316,11 +287,11 @@ declare const SandboxStatusResponseSchema: z.ZodObject<{
|
|
|
316
287
|
cpus?: number | undefined;
|
|
317
288
|
memory?: string | undefined;
|
|
318
289
|
state?: unknown;
|
|
319
|
-
}, {
|
|
320
|
-
status?: Record<string, unknown> | undefined;
|
|
321
290
|
cluster?: string | undefined;
|
|
322
291
|
requestId?: string | undefined;
|
|
323
292
|
eagleeyeTraceid?: string | undefined;
|
|
293
|
+
}, {
|
|
294
|
+
status?: Record<string, unknown> | undefined;
|
|
324
295
|
isAlive?: boolean | undefined;
|
|
325
296
|
sandboxId?: string | undefined;
|
|
326
297
|
portMapping?: Record<string, unknown> | undefined;
|
|
@@ -335,15 +306,15 @@ declare const SandboxStatusResponseSchema: z.ZodObject<{
|
|
|
335
306
|
cpus?: number | undefined;
|
|
336
307
|
memory?: string | undefined;
|
|
337
308
|
state?: unknown;
|
|
309
|
+
cluster?: string | undefined;
|
|
310
|
+
requestId?: string | undefined;
|
|
311
|
+
eagleeyeTraceid?: string | undefined;
|
|
338
312
|
}>;
|
|
339
313
|
type SandboxStatusResponse = z.infer<typeof SandboxStatusResponseSchema>;
|
|
340
314
|
/**
|
|
341
315
|
* Command execution response
|
|
342
316
|
*/
|
|
343
317
|
declare const CommandResponseSchema: z.ZodObject<{
|
|
344
|
-
cluster: z.ZodOptional<z.ZodString>;
|
|
345
|
-
requestId: z.ZodOptional<z.ZodString>;
|
|
346
|
-
eagleeyeTraceid: z.ZodOptional<z.ZodString>;
|
|
347
318
|
stdout: z.ZodDefault<z.ZodString>;
|
|
348
319
|
stderr: z.ZodDefault<z.ZodString>;
|
|
349
320
|
exitCode: z.ZodOptional<z.ZodNumber>;
|
|
@@ -351,14 +322,8 @@ declare const CommandResponseSchema: z.ZodObject<{
|
|
|
351
322
|
stdout: string;
|
|
352
323
|
stderr: string;
|
|
353
324
|
exitCode?: number | undefined;
|
|
354
|
-
cluster?: string | undefined;
|
|
355
|
-
requestId?: string | undefined;
|
|
356
|
-
eagleeyeTraceid?: string | undefined;
|
|
357
325
|
}, {
|
|
358
326
|
exitCode?: number | undefined;
|
|
359
|
-
cluster?: string | undefined;
|
|
360
|
-
requestId?: string | undefined;
|
|
361
|
-
eagleeyeTraceid?: string | undefined;
|
|
362
327
|
stdout?: string | undefined;
|
|
363
328
|
stderr?: string | undefined;
|
|
364
329
|
}>;
|
|
@@ -367,22 +332,13 @@ type CommandResponse = z.infer<typeof CommandResponseSchema>;
|
|
|
367
332
|
* Write file response
|
|
368
333
|
*/
|
|
369
334
|
declare const WriteFileResponseSchema: z.ZodObject<{
|
|
370
|
-
cluster: z.ZodOptional<z.ZodString>;
|
|
371
|
-
requestId: z.ZodOptional<z.ZodString>;
|
|
372
|
-
eagleeyeTraceid: z.ZodOptional<z.ZodString>;
|
|
373
335
|
success: z.ZodDefault<z.ZodBoolean>;
|
|
374
336
|
message: z.ZodDefault<z.ZodString>;
|
|
375
337
|
}, "strip", z.ZodTypeAny, {
|
|
376
338
|
message: string;
|
|
377
339
|
success: boolean;
|
|
378
|
-
cluster?: string | undefined;
|
|
379
|
-
requestId?: string | undefined;
|
|
380
|
-
eagleeyeTraceid?: string | undefined;
|
|
381
340
|
}, {
|
|
382
341
|
message?: string | undefined;
|
|
383
|
-
cluster?: string | undefined;
|
|
384
|
-
requestId?: string | undefined;
|
|
385
|
-
eagleeyeTraceid?: string | undefined;
|
|
386
342
|
success?: boolean | undefined;
|
|
387
343
|
}>;
|
|
388
344
|
type WriteFileResponse = z.infer<typeof WriteFileResponseSchema>;
|
|
@@ -390,44 +346,26 @@ type WriteFileResponse = z.infer<typeof WriteFileResponseSchema>;
|
|
|
390
346
|
* Read file response
|
|
391
347
|
*/
|
|
392
348
|
declare const ReadFileResponseSchema: z.ZodObject<{
|
|
393
|
-
cluster: z.ZodOptional<z.ZodString>;
|
|
394
|
-
requestId: z.ZodOptional<z.ZodString>;
|
|
395
|
-
eagleeyeTraceid: z.ZodOptional<z.ZodString>;
|
|
396
349
|
content: z.ZodDefault<z.ZodString>;
|
|
397
350
|
}, "strip", z.ZodTypeAny, {
|
|
398
351
|
content: string;
|
|
399
|
-
cluster?: string | undefined;
|
|
400
|
-
requestId?: string | undefined;
|
|
401
|
-
eagleeyeTraceid?: string | undefined;
|
|
402
352
|
}, {
|
|
403
353
|
content?: string | undefined;
|
|
404
|
-
cluster?: string | undefined;
|
|
405
|
-
requestId?: string | undefined;
|
|
406
|
-
eagleeyeTraceid?: string | undefined;
|
|
407
354
|
}>;
|
|
408
355
|
type ReadFileResponse = z.infer<typeof ReadFileResponseSchema>;
|
|
409
356
|
/**
|
|
410
357
|
* Upload response
|
|
411
358
|
*/
|
|
412
359
|
declare const UploadResponseSchema: z.ZodObject<{
|
|
413
|
-
cluster: z.ZodOptional<z.ZodString>;
|
|
414
|
-
requestId: z.ZodOptional<z.ZodString>;
|
|
415
|
-
eagleeyeTraceid: z.ZodOptional<z.ZodString>;
|
|
416
360
|
success: z.ZodDefault<z.ZodBoolean>;
|
|
417
361
|
message: z.ZodDefault<z.ZodString>;
|
|
418
362
|
fileName: z.ZodOptional<z.ZodString>;
|
|
419
363
|
}, "strip", z.ZodTypeAny, {
|
|
420
364
|
message: string;
|
|
421
365
|
success: boolean;
|
|
422
|
-
cluster?: string | undefined;
|
|
423
|
-
requestId?: string | undefined;
|
|
424
|
-
eagleeyeTraceid?: string | undefined;
|
|
425
366
|
fileName?: string | undefined;
|
|
426
367
|
}, {
|
|
427
368
|
message?: string | undefined;
|
|
428
|
-
cluster?: string | undefined;
|
|
429
|
-
requestId?: string | undefined;
|
|
430
|
-
eagleeyeTraceid?: string | undefined;
|
|
431
369
|
success?: boolean | undefined;
|
|
432
370
|
fileName?: string | undefined;
|
|
433
371
|
}>;
|
|
@@ -436,9 +374,6 @@ type UploadResponse = z.infer<typeof UploadResponseSchema>;
|
|
|
436
374
|
* Bash observation (execution result)
|
|
437
375
|
*/
|
|
438
376
|
declare const ObservationSchema: z.ZodObject<{
|
|
439
|
-
cluster: z.ZodOptional<z.ZodString>;
|
|
440
|
-
requestId: z.ZodOptional<z.ZodString>;
|
|
441
|
-
eagleeyeTraceid: z.ZodOptional<z.ZodString>;
|
|
442
377
|
output: z.ZodDefault<z.ZodString>;
|
|
443
378
|
exitCode: z.ZodOptional<z.ZodNumber>;
|
|
444
379
|
failureReason: z.ZodDefault<z.ZodString>;
|
|
@@ -448,15 +383,9 @@ declare const ObservationSchema: z.ZodObject<{
|
|
|
448
383
|
output: string;
|
|
449
384
|
expectString: string;
|
|
450
385
|
exitCode?: number | undefined;
|
|
451
|
-
cluster?: string | undefined;
|
|
452
|
-
requestId?: string | undefined;
|
|
453
|
-
eagleeyeTraceid?: string | undefined;
|
|
454
386
|
}, {
|
|
455
387
|
exitCode?: number | undefined;
|
|
456
388
|
failureReason?: string | undefined;
|
|
457
|
-
cluster?: string | undefined;
|
|
458
|
-
requestId?: string | undefined;
|
|
459
|
-
eagleeyeTraceid?: string | undefined;
|
|
460
389
|
output?: string | undefined;
|
|
461
390
|
expectString?: string | undefined;
|
|
462
391
|
}>;
|
|
@@ -465,21 +394,12 @@ type Observation = z.infer<typeof ObservationSchema>;
|
|
|
465
394
|
* Create session response
|
|
466
395
|
*/
|
|
467
396
|
declare const CreateSessionResponseSchema: z.ZodObject<{
|
|
468
|
-
cluster: z.ZodOptional<z.ZodString>;
|
|
469
|
-
requestId: z.ZodOptional<z.ZodString>;
|
|
470
|
-
eagleeyeTraceid: z.ZodOptional<z.ZodString>;
|
|
471
397
|
output: z.ZodDefault<z.ZodString>;
|
|
472
398
|
sessionType: z.ZodDefault<z.ZodLiteral<"bash">>;
|
|
473
399
|
}, "strip", z.ZodTypeAny, {
|
|
474
400
|
output: string;
|
|
475
401
|
sessionType: "bash";
|
|
476
|
-
cluster?: string | undefined;
|
|
477
|
-
requestId?: string | undefined;
|
|
478
|
-
eagleeyeTraceid?: string | undefined;
|
|
479
402
|
}, {
|
|
480
|
-
cluster?: string | undefined;
|
|
481
|
-
requestId?: string | undefined;
|
|
482
|
-
eagleeyeTraceid?: string | undefined;
|
|
483
403
|
output?: string | undefined;
|
|
484
404
|
sessionType?: "bash" | undefined;
|
|
485
405
|
}>;
|
|
@@ -488,59 +408,29 @@ type CreateSessionResponse = z.infer<typeof CreateSessionResponseSchema>;
|
|
|
488
408
|
* Close session response
|
|
489
409
|
*/
|
|
490
410
|
declare const CloseSessionResponseSchema: z.ZodObject<{
|
|
491
|
-
cluster: z.ZodOptional<z.ZodString>;
|
|
492
|
-
requestId: z.ZodOptional<z.ZodString>;
|
|
493
|
-
eagleeyeTraceid: z.ZodOptional<z.ZodString>;
|
|
494
411
|
sessionType: z.ZodDefault<z.ZodLiteral<"bash">>;
|
|
495
412
|
}, "strip", z.ZodTypeAny, {
|
|
496
413
|
sessionType: "bash";
|
|
497
|
-
cluster?: string | undefined;
|
|
498
|
-
requestId?: string | undefined;
|
|
499
|
-
eagleeyeTraceid?: string | undefined;
|
|
500
414
|
}, {
|
|
501
|
-
cluster?: string | undefined;
|
|
502
|
-
requestId?: string | undefined;
|
|
503
|
-
eagleeyeTraceid?: string | undefined;
|
|
504
415
|
sessionType?: "bash" | undefined;
|
|
505
416
|
}>;
|
|
506
417
|
type CloseSessionResponse = z.infer<typeof CloseSessionResponseSchema>;
|
|
507
418
|
/**
|
|
508
419
|
* Close response
|
|
509
420
|
*/
|
|
510
|
-
declare const CloseResponseSchema: z.ZodObject<{
|
|
511
|
-
cluster: z.ZodOptional<z.ZodString>;
|
|
512
|
-
requestId: z.ZodOptional<z.ZodString>;
|
|
513
|
-
eagleeyeTraceid: z.ZodOptional<z.ZodString>;
|
|
514
|
-
}, "strip", z.ZodTypeAny, {
|
|
515
|
-
cluster?: string | undefined;
|
|
516
|
-
requestId?: string | undefined;
|
|
517
|
-
eagleeyeTraceid?: string | undefined;
|
|
518
|
-
}, {
|
|
519
|
-
cluster?: string | undefined;
|
|
520
|
-
requestId?: string | undefined;
|
|
521
|
-
eagleeyeTraceid?: string | undefined;
|
|
522
|
-
}>;
|
|
421
|
+
declare const CloseResponseSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
523
422
|
type CloseResponse = z.infer<typeof CloseResponseSchema>;
|
|
524
423
|
/**
|
|
525
424
|
* Chown response
|
|
526
425
|
*/
|
|
527
426
|
declare const ChownResponseSchema: z.ZodObject<{
|
|
528
|
-
cluster: z.ZodOptional<z.ZodString>;
|
|
529
|
-
requestId: z.ZodOptional<z.ZodString>;
|
|
530
|
-
eagleeyeTraceid: z.ZodOptional<z.ZodString>;
|
|
531
427
|
success: z.ZodDefault<z.ZodBoolean>;
|
|
532
428
|
message: z.ZodDefault<z.ZodString>;
|
|
533
429
|
}, "strip", z.ZodTypeAny, {
|
|
534
430
|
message: string;
|
|
535
431
|
success: boolean;
|
|
536
|
-
cluster?: string | undefined;
|
|
537
|
-
requestId?: string | undefined;
|
|
538
|
-
eagleeyeTraceid?: string | undefined;
|
|
539
432
|
}, {
|
|
540
433
|
message?: string | undefined;
|
|
541
|
-
cluster?: string | undefined;
|
|
542
|
-
requestId?: string | undefined;
|
|
543
|
-
eagleeyeTraceid?: string | undefined;
|
|
544
434
|
success?: boolean | undefined;
|
|
545
435
|
}>;
|
|
546
436
|
type ChownResponse = z.infer<typeof ChownResponseSchema>;
|
|
@@ -548,22 +438,13 @@ type ChownResponse = z.infer<typeof ChownResponseSchema>;
|
|
|
548
438
|
* Chmod response
|
|
549
439
|
*/
|
|
550
440
|
declare const ChmodResponseSchema: z.ZodObject<{
|
|
551
|
-
cluster: z.ZodOptional<z.ZodString>;
|
|
552
|
-
requestId: z.ZodOptional<z.ZodString>;
|
|
553
|
-
eagleeyeTraceid: z.ZodOptional<z.ZodString>;
|
|
554
441
|
success: z.ZodDefault<z.ZodBoolean>;
|
|
555
442
|
message: z.ZodDefault<z.ZodString>;
|
|
556
443
|
}, "strip", z.ZodTypeAny, {
|
|
557
444
|
message: string;
|
|
558
445
|
success: boolean;
|
|
559
|
-
cluster?: string | undefined;
|
|
560
|
-
requestId?: string | undefined;
|
|
561
|
-
eagleeyeTraceid?: string | undefined;
|
|
562
446
|
}, {
|
|
563
447
|
message?: string | undefined;
|
|
564
|
-
cluster?: string | undefined;
|
|
565
|
-
requestId?: string | undefined;
|
|
566
|
-
eagleeyeTraceid?: string | undefined;
|
|
567
448
|
success?: boolean | undefined;
|
|
568
449
|
}>;
|
|
569
450
|
type ChmodResponse = z.infer<typeof ChmodResponseSchema>;
|
|
@@ -571,22 +452,13 @@ type ChmodResponse = z.infer<typeof ChmodResponseSchema>;
|
|
|
571
452
|
* Execute bash session response
|
|
572
453
|
*/
|
|
573
454
|
declare const ExecuteBashSessionResponseSchema: z.ZodObject<{
|
|
574
|
-
cluster: z.ZodOptional<z.ZodString>;
|
|
575
|
-
requestId: z.ZodOptional<z.ZodString>;
|
|
576
|
-
eagleeyeTraceid: z.ZodOptional<z.ZodString>;
|
|
577
455
|
success: z.ZodDefault<z.ZodBoolean>;
|
|
578
456
|
message: z.ZodDefault<z.ZodString>;
|
|
579
457
|
}, "strip", z.ZodTypeAny, {
|
|
580
458
|
message: string;
|
|
581
459
|
success: boolean;
|
|
582
|
-
cluster?: string | undefined;
|
|
583
|
-
requestId?: string | undefined;
|
|
584
|
-
eagleeyeTraceid?: string | undefined;
|
|
585
460
|
}, {
|
|
586
461
|
message?: string | undefined;
|
|
587
|
-
cluster?: string | undefined;
|
|
588
|
-
requestId?: string | undefined;
|
|
589
|
-
eagleeyeTraceid?: string | undefined;
|
|
590
462
|
success?: boolean | undefined;
|
|
591
463
|
}>;
|
|
592
464
|
type ExecuteBashSessionResponse = z.infer<typeof ExecuteBashSessionResponseSchema>;
|
|
@@ -594,22 +466,13 @@ type ExecuteBashSessionResponse = z.infer<typeof ExecuteBashSessionResponseSchem
|
|
|
594
466
|
* OSS setup response
|
|
595
467
|
*/
|
|
596
468
|
declare const OssSetupResponseSchema: z.ZodObject<{
|
|
597
|
-
cluster: z.ZodOptional<z.ZodString>;
|
|
598
|
-
requestId: z.ZodOptional<z.ZodString>;
|
|
599
|
-
eagleeyeTraceid: z.ZodOptional<z.ZodString>;
|
|
600
469
|
success: z.ZodDefault<z.ZodBoolean>;
|
|
601
470
|
message: z.ZodDefault<z.ZodString>;
|
|
602
471
|
}, "strip", z.ZodTypeAny, {
|
|
603
472
|
message: string;
|
|
604
473
|
success: boolean;
|
|
605
|
-
cluster?: string | undefined;
|
|
606
|
-
requestId?: string | undefined;
|
|
607
|
-
eagleeyeTraceid?: string | undefined;
|
|
608
474
|
}, {
|
|
609
475
|
message?: string | undefined;
|
|
610
|
-
cluster?: string | undefined;
|
|
611
|
-
requestId?: string | undefined;
|
|
612
|
-
eagleeyeTraceid?: string | undefined;
|
|
613
476
|
success?: boolean | undefined;
|
|
614
477
|
}>;
|
|
615
478
|
type OssSetupResponse = z.infer<typeof OssSetupResponseSchema>;
|
|
@@ -692,6 +555,15 @@ declare function raiseForCode(code: Codes | null | undefined, message: string):
|
|
|
692
555
|
*/
|
|
693
556
|
declare function fromRockException(e: RockException): SandboxResponse;
|
|
694
557
|
|
|
558
|
+
/**
|
|
559
|
+
* HTTP response with headers
|
|
560
|
+
*/
|
|
561
|
+
interface HttpResponse<T = unknown> {
|
|
562
|
+
status: string;
|
|
563
|
+
result?: T;
|
|
564
|
+
error?: string;
|
|
565
|
+
headers: Record<string, string>;
|
|
566
|
+
}
|
|
695
567
|
/**
|
|
696
568
|
* HTTP utilities class
|
|
697
569
|
*/
|
|
@@ -706,23 +578,17 @@ declare class HttpUtils {
|
|
|
706
578
|
* Send POST request
|
|
707
579
|
* Automatically converts request body from camelCase to snake_case
|
|
708
580
|
* Automatically converts response from snake_case to camelCase
|
|
709
|
-
* Returns structured response with headers
|
|
710
581
|
*/
|
|
711
|
-
static post<T = unknown>(url: string, headers: Record<string, string>, data: Record<string, unknown>, readTimeout?: number): Promise<
|
|
712
|
-
status: string;
|
|
713
|
-
result: T;
|
|
714
|
-
headers: Record<string, string>;
|
|
715
|
-
}>;
|
|
582
|
+
static post<T = unknown>(url: string, headers: Record<string, string>, data: Record<string, unknown>, readTimeout?: number): Promise<HttpResponse<T>>;
|
|
716
583
|
/**
|
|
717
584
|
* Send GET request
|
|
718
585
|
* Automatically converts response from snake_case to camelCase
|
|
719
|
-
* Returns structured response with headers
|
|
720
586
|
*/
|
|
721
|
-
static get<T = unknown>(url: string, headers: Record<string, string>): Promise<
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
587
|
+
static get<T = unknown>(url: string, headers: Record<string, string>): Promise<HttpResponse<T>>;
|
|
588
|
+
/**
|
|
589
|
+
* Extract headers from axios response
|
|
590
|
+
*/
|
|
591
|
+
private static extractHeaders;
|
|
726
592
|
/**
|
|
727
593
|
* Convert camelCase key to snake_case
|
|
728
594
|
*/
|
|
@@ -731,13 +597,8 @@ declare class HttpUtils {
|
|
|
731
597
|
* Send multipart/form-data request
|
|
732
598
|
* Automatically converts form data keys to snake_case
|
|
733
599
|
* Automatically converts response from snake_case to camelCase
|
|
734
|
-
* Returns structured response with headers
|
|
735
600
|
*/
|
|
736
|
-
static postMultipart<T = unknown>(url: string, headers: Record<string, string>, data?: Record<string, string | number | boolean>, files?: Record<string, File | Buffer | [string, Buffer, string]>): Promise<
|
|
737
|
-
status: string;
|
|
738
|
-
result: T;
|
|
739
|
-
headers: Record<string, string>;
|
|
740
|
-
}>;
|
|
601
|
+
static postMultipart<T = unknown>(url: string, headers: Record<string, string>, data?: Record<string, string | number | boolean>, files?: Record<string, File | Buffer | [string, Buffer, string]>): Promise<HttpResponse<T>>;
|
|
741
602
|
/**
|
|
742
603
|
* Guess MIME type from filename
|
|
743
604
|
*/
|
|
@@ -1028,10 +889,10 @@ declare const SandboxConfigSchema: z.ZodObject<{
|
|
|
1028
889
|
cluster: z.ZodDefault<z.ZodString>;
|
|
1029
890
|
namespace: z.ZodOptional<z.ZodString>;
|
|
1030
891
|
}, "strip", z.ZodTypeAny, {
|
|
1031
|
-
cluster: string;
|
|
1032
892
|
image: string;
|
|
1033
893
|
cpus: number;
|
|
1034
894
|
memory: string;
|
|
895
|
+
cluster: string;
|
|
1035
896
|
baseUrl: string;
|
|
1036
897
|
extraHeaders: Record<string, string>;
|
|
1037
898
|
autoClearSeconds: number;
|
|
@@ -1042,13 +903,13 @@ declare const SandboxConfigSchema: z.ZodObject<{
|
|
|
1042
903
|
xrlAuthorization?: string | undefined;
|
|
1043
904
|
routeKey?: string | undefined;
|
|
1044
905
|
}, {
|
|
1045
|
-
cluster?: string | undefined;
|
|
1046
906
|
image?: string | undefined;
|
|
1047
907
|
userId?: string | undefined;
|
|
1048
908
|
experimentId?: string | undefined;
|
|
1049
909
|
namespace?: string | undefined;
|
|
1050
910
|
cpus?: number | undefined;
|
|
1051
911
|
memory?: string | undefined;
|
|
912
|
+
cluster?: string | undefined;
|
|
1052
913
|
baseUrl?: string | undefined;
|
|
1053
914
|
xrlAuthorization?: string | undefined;
|
|
1054
915
|
extraHeaders?: Record<string, string> | undefined;
|
|
@@ -1080,10 +941,10 @@ declare const SandboxGroupConfigSchema: z.ZodObject<{
|
|
|
1080
941
|
startConcurrency: z.ZodDefault<z.ZodNumber>;
|
|
1081
942
|
startRetryTimes: z.ZodDefault<z.ZodNumber>;
|
|
1082
943
|
}, "strip", z.ZodTypeAny, {
|
|
1083
|
-
cluster: string;
|
|
1084
944
|
image: string;
|
|
1085
945
|
cpus: number;
|
|
1086
946
|
memory: string;
|
|
947
|
+
cluster: string;
|
|
1087
948
|
baseUrl: string;
|
|
1088
949
|
extraHeaders: Record<string, string>;
|
|
1089
950
|
autoClearSeconds: number;
|
|
@@ -1097,13 +958,13 @@ declare const SandboxGroupConfigSchema: z.ZodObject<{
|
|
|
1097
958
|
xrlAuthorization?: string | undefined;
|
|
1098
959
|
routeKey?: string | undefined;
|
|
1099
960
|
}, {
|
|
1100
|
-
cluster?: string | undefined;
|
|
1101
961
|
image?: string | undefined;
|
|
1102
962
|
userId?: string | undefined;
|
|
1103
963
|
experimentId?: string | undefined;
|
|
1104
964
|
namespace?: string | undefined;
|
|
1105
965
|
cpus?: number | undefined;
|
|
1106
966
|
memory?: string | undefined;
|
|
967
|
+
cluster?: string | undefined;
|
|
1107
968
|
baseUrl?: string | undefined;
|
|
1108
969
|
xrlAuthorization?: string | undefined;
|
|
1109
970
|
extraHeaders?: Record<string, string> | undefined;
|
|
@@ -1333,10 +1194,6 @@ declare class Sandbox extends AbstractSandbox {
|
|
|
1333
1194
|
getConfig(): SandboxConfig;
|
|
1334
1195
|
private buildHeaders;
|
|
1335
1196
|
private addUserDefinedTags;
|
|
1336
|
-
/**
|
|
1337
|
-
* Extract header-derived fields from response headers
|
|
1338
|
-
*/
|
|
1339
|
-
private extractHeaderFields;
|
|
1340
1197
|
start(): Promise<void>;
|
|
1341
1198
|
stop(): Promise<void>;
|
|
1342
1199
|
isAlive(): Promise<IsAliveResponse>;
|
|
@@ -1490,4 +1347,4 @@ declare class ModelService {
|
|
|
1490
1347
|
*/
|
|
1491
1348
|
declare const VERSION = "1.2.1";
|
|
1492
1349
|
|
|
1493
|
-
export { BadRequestRockError, type BaseConfig, type BashAction, BashActionSchema, type ChmodRequest, ChmodRequestSchema, type ChmodResponse, ChmodResponseSchema, type ChownRequest, ChownRequestSchema, type ChownResponse, ChownResponseSchema, type CloseResponse, CloseResponseSchema, type CloseSessionRequest, CloseSessionRequestSchema, type CloseSessionResponse, CloseSessionResponseSchema, Codes, type Command, type CommandResponse, CommandResponseSchema, CommandRockError, CommandSchema, Constants, type CreateBashSessionRequest, CreateBashSessionRequestSchema, type CreateSessionResponse, CreateSessionResponseSchema, Deploy, EnvHubClient, type EnvHubClientConfig, EnvHubClientConfigSchema, EnvHubError, type ExecuteBashSessionResponse, ExecuteBashSessionResponseSchema,
|
|
1350
|
+
export { BadRequestRockError, type BaseConfig, type BashAction, BashActionSchema, type ChmodRequest, ChmodRequestSchema, type ChmodResponse, ChmodResponseSchema, type ChownRequest, ChownRequestSchema, type ChownResponse, ChownResponseSchema, type CloseResponse, CloseResponseSchema, type CloseSessionRequest, CloseSessionRequestSchema, type CloseSessionResponse, CloseSessionResponseSchema, Codes, type Command, type CommandResponse, CommandResponseSchema, CommandRockError, CommandSchema, Constants, type CreateBashSessionRequest, CreateBashSessionRequestSchema, type CreateSessionResponse, CreateSessionResponseSchema, Deploy, EnvHubClient, type EnvHubClientConfig, EnvHubClientConfigSchema, EnvHubError, type ExecuteBashSessionResponse, ExecuteBashSessionResponseSchema, HttpUtils, InternalServerRockError, InvalidParameterRockException, type IsAliveResponse, IsAliveResponseSchema, LinuxFileSystem, LinuxRemoteUser, ModelClient, type ModelClientConfig, ModelService, type ModelServiceConfig, Network, type Observation, ObservationSchema, type OssSetupResponse, OssSetupResponseSchema, PID_PREFIX, PID_SUFFIX, Process, type ReadFileRequest, ReadFileRequestSchema, type ReadFileResponse, ReadFileResponseSchema, ReasonPhrases, type ResetResult, RockEnv, type RockEnvConfig, type RockEnvInfo, RockEnvInfoSchema, RockException, RunMode, type RunModeType$1 as RunModeType, Sandbox, type SandboxConfig, SandboxConfigSchema, SandboxGroup, type SandboxGroupConfig, SandboxGroupConfigSchema, type SandboxResponse, SandboxResponseSchema, type RunModeType as SandboxRunModeType, type SandboxStatusResponse, SandboxStatusResponseSchema, SpeedupType, type StepResult, type UploadRequest, UploadRequestSchema, type UploadResponse, UploadResponseSchema, VERSION, type WriteFileRequest, WriteFileRequestSchema, type WriteFileResponse, WriteFileResponseSchema, arunWithRetry, createRockEnvInfo, createSandboxConfig, createSandboxGroupConfig, deprecated, deprecatedClass, extractNohupPid as extractNohupPidFromSandbox, fromRockException, getEnv, getReasonPhrase, getRequiredEnv, isBrowser, isClientError, isCommandError, isEnvSet, isError, isNode, isServerError, isSuccess, make, raiseForCode, retryAsync, sleep, withRetry, withTimeLogging };
|