@agentuity/server 1.0.2 → 1.0.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/api/db/index.d.ts +4 -4
- package/dist/api/db/index.d.ts.map +1 -1
- package/dist/api/db/index.js +3 -3
- package/dist/api/db/index.js.map +1 -1
- package/dist/api/db/logs.d.ts +20 -1
- package/dist/api/db/logs.d.ts.map +1 -1
- package/dist/api/db/logs.js +1 -1
- package/dist/api/db/logs.js.map +1 -1
- package/dist/api/db/tables.d.ts +20 -1
- package/dist/api/db/tables.d.ts.map +1 -1
- package/dist/api/db/tables.js +1 -1
- package/dist/api/db/tables.js.map +1 -1
- package/dist/api/eval/get.d.ts +20 -1
- package/dist/api/eval/get.d.ts.map +1 -1
- package/dist/api/eval/get.js +1 -1
- package/dist/api/eval/get.js.map +1 -1
- package/dist/api/eval/index.d.ts +4 -4
- package/dist/api/eval/index.d.ts.map +1 -1
- package/dist/api/eval/index.js +4 -4
- package/dist/api/eval/index.js.map +1 -1
- package/dist/api/eval/list.d.ts +19 -1
- package/dist/api/eval/list.d.ts.map +1 -1
- package/dist/api/eval/list.js +1 -1
- package/dist/api/eval/list.js.map +1 -1
- package/dist/api/eval/run-get.d.ts +26 -1
- package/dist/api/eval/run-get.d.ts.map +1 -1
- package/dist/api/eval/run-get.js +1 -1
- package/dist/api/eval/run-get.js.map +1 -1
- package/dist/api/eval/run-list.d.ts +25 -1
- package/dist/api/eval/run-list.d.ts.map +1 -1
- package/dist/api/eval/run-list.js +1 -1
- package/dist/api/eval/run-list.js.map +1 -1
- package/dist/api/project/agent.d.ts +54 -0
- package/dist/api/project/agent.d.ts.map +1 -1
- package/dist/api/project/agent.js +2 -2
- package/dist/api/project/agent.js.map +1 -1
- package/dist/api/project/create.d.ts +2 -3
- package/dist/api/project/create.d.ts.map +1 -1
- package/dist/api/project/create.js +1 -1
- package/dist/api/project/create.js.map +1 -1
- package/dist/api/project/delete.d.ts +9 -1
- package/dist/api/project/delete.d.ts.map +1 -1
- package/dist/api/project/delete.js +1 -1
- package/dist/api/project/delete.js.map +1 -1
- package/dist/api/project/deploy.d.ts +65 -0
- package/dist/api/project/deploy.d.ts.map +1 -1
- package/dist/api/project/deploy.js +5 -5
- package/dist/api/project/deploy.js.map +1 -1
- package/dist/api/project/deployment.d.ts +136 -0
- package/dist/api/project/deployment.d.ts.map +1 -1
- package/dist/api/project/deployment.js +5 -5
- package/dist/api/project/deployment.js.map +1 -1
- package/dist/api/project/env-delete.d.ts +8 -1
- package/dist/api/project/env-delete.d.ts.map +1 -1
- package/dist/api/project/env-delete.js +1 -1
- package/dist/api/project/env-delete.js.map +1 -1
- package/dist/api/project/env-update.d.ts +15 -1
- package/dist/api/project/env-update.d.ts.map +1 -1
- package/dist/api/project/env-update.js +1 -1
- package/dist/api/project/env-update.js.map +1 -1
- package/dist/api/project/exists.d.ts +2 -3
- package/dist/api/project/exists.d.ts.map +1 -1
- package/dist/api/project/exists.js +2 -2
- package/dist/api/project/exists.js.map +1 -1
- package/dist/api/project/get.d.ts +19 -1
- package/dist/api/project/get.d.ts.map +1 -1
- package/dist/api/project/get.js +1 -1
- package/dist/api/project/get.js.map +1 -1
- package/dist/api/project/list.d.ts +2 -3
- package/dist/api/project/list.d.ts.map +1 -1
- package/dist/api/project/list.js +1 -1
- package/dist/api/project/list.js.map +1 -1
- package/dist/api/project/malware.d.ts +27 -0
- package/dist/api/project/malware.d.ts.map +1 -1
- package/dist/api/project/malware.js +1 -1
- package/dist/api/project/malware.js.map +1 -1
- package/dist/api/project/update-region.d.ts +11 -1
- package/dist/api/project/update-region.d.ts.map +1 -1
- package/dist/api/project/update-region.js +1 -1
- package/dist/api/project/update-region.js.map +1 -1
- package/dist/api/queue/analytics.d.ts +144 -2
- package/dist/api/queue/analytics.d.ts.map +1 -1
- package/dist/api/queue/analytics.js +5 -5
- package/dist/api/queue/analytics.js.map +1 -1
- package/dist/api/queue/destinations.d.ts +96 -2
- package/dist/api/queue/destinations.d.ts.map +1 -1
- package/dist/api/queue/destinations.js +7 -7
- package/dist/api/queue/destinations.js.map +1 -1
- package/dist/api/queue/dlq.d.ts +70 -2
- package/dist/api/queue/dlq.d.ts.map +1 -1
- package/dist/api/queue/dlq.js +5 -5
- package/dist/api/queue/dlq.js.map +1 -1
- package/dist/api/queue/index.d.ts +9 -9
- package/dist/api/queue/index.d.ts.map +1 -1
- package/dist/api/queue/index.js +11 -11
- package/dist/api/queue/index.js.map +1 -1
- package/dist/api/queue/messages.d.ts +173 -2
- package/dist/api/queue/messages.d.ts.map +1 -1
- package/dist/api/queue/messages.js +10 -10
- package/dist/api/queue/messages.js.map +1 -1
- package/dist/api/queue/queues.d.ts +75 -2
- package/dist/api/queue/queues.d.ts.map +1 -1
- package/dist/api/queue/queues.js +6 -6
- package/dist/api/queue/queues.js.map +1 -1
- package/dist/api/queue/sources.d.ts +72 -2
- package/dist/api/queue/sources.d.ts.map +1 -1
- package/dist/api/queue/sources.js +6 -6
- package/dist/api/queue/sources.js.map +1 -1
- package/dist/api/sandbox/cli-list.d.ts +4 -5
- package/dist/api/sandbox/cli-list.d.ts.map +1 -1
- package/dist/api/sandbox/cli-list.js +3 -3
- package/dist/api/sandbox/cli-list.js.map +1 -1
- package/dist/api/sandbox/create.d.ts +82 -1
- package/dist/api/sandbox/create.d.ts.map +1 -1
- package/dist/api/sandbox/create.js +13 -7
- package/dist/api/sandbox/create.js.map +1 -1
- package/dist/api/sandbox/destroy.d.ts +9 -1
- package/dist/api/sandbox/destroy.d.ts.map +1 -1
- package/dist/api/sandbox/destroy.js +2 -2
- package/dist/api/sandbox/destroy.js.map +1 -1
- package/dist/api/sandbox/execute.d.ts +52 -1
- package/dist/api/sandbox/execute.d.ts.map +1 -1
- package/dist/api/sandbox/execute.js +13 -7
- package/dist/api/sandbox/execute.js.map +1 -1
- package/dist/api/sandbox/execution.d.ts +104 -1
- package/dist/api/sandbox/execution.d.ts.map +1 -1
- package/dist/api/sandbox/execution.js +5 -5
- package/dist/api/sandbox/execution.js.map +1 -1
- package/dist/api/sandbox/get.d.ts +233 -1
- package/dist/api/sandbox/get.d.ts.map +1 -1
- package/dist/api/sandbox/get.js +12 -12
- package/dist/api/sandbox/get.js.map +1 -1
- package/dist/api/sandbox/index.d.ts +25 -25
- package/dist/api/sandbox/index.d.ts.map +1 -1
- package/dist/api/sandbox/index.js +13 -13
- package/dist/api/sandbox/index.js.map +1 -1
- package/dist/api/sandbox/list.d.ts +230 -1
- package/dist/api/sandbox/list.d.ts.map +1 -1
- package/dist/api/sandbox/list.js +9 -9
- package/dist/api/sandbox/list.js.map +1 -1
- package/dist/api/sandbox/resolve.d.ts +30 -0
- package/dist/api/sandbox/resolve.d.ts.map +1 -1
- package/dist/api/sandbox/resolve.js +3 -3
- package/dist/api/sandbox/resolve.js.map +1 -1
- package/dist/api/sandbox/runtime.d.ts +69 -1
- package/dist/api/sandbox/runtime.d.ts.map +1 -1
- package/dist/api/sandbox/runtime.js +5 -5
- package/dist/api/sandbox/runtime.js.map +1 -1
- package/dist/api/sandbox/snapshot.d.ts +202 -9
- package/dist/api/sandbox/snapshot.d.ts.map +1 -1
- package/dist/api/sandbox/snapshot.js +17 -17
- package/dist/api/sandbox/snapshot.js.map +1 -1
- package/dist/api/stream/get.d.ts +3 -4
- package/dist/api/stream/get.d.ts.map +1 -1
- package/dist/api/stream/get.js +2 -2
- package/dist/api/stream/get.js.map +1 -1
- package/dist/api/stream/list.d.ts +4 -5
- package/dist/api/stream/list.d.ts.map +1 -1
- package/dist/api/stream/list.js +3 -3
- package/dist/api/stream/list.js.map +1 -1
- package/package.json +4 -4
- package/src/api/db/index.ts +15 -13
- package/src/api/db/logs.ts +2 -2
- package/src/api/db/tables.ts +2 -2
- package/src/api/eval/get.ts +2 -2
- package/src/api/eval/index.ts +19 -7
- package/src/api/eval/list.ts +2 -2
- package/src/api/eval/run-get.ts +2 -2
- package/src/api/eval/run-list.ts +2 -2
- package/src/api/project/agent.ts +2 -2
- package/src/api/project/create.ts +2 -2
- package/src/api/project/delete.ts +2 -2
- package/src/api/project/deploy.ts +7 -5
- package/src/api/project/deployment.ts +5 -5
- package/src/api/project/env-delete.ts +2 -2
- package/src/api/project/env-update.ts +2 -2
- package/src/api/project/exists.ts +2 -2
- package/src/api/project/get.ts +2 -2
- package/src/api/project/list.ts +2 -2
- package/src/api/project/malware.ts +1 -1
- package/src/api/project/update-region.ts +2 -2
- package/src/api/queue/analytics.ts +15 -11
- package/src/api/queue/destinations.ts +14 -12
- package/src/api/queue/dlq.ts +10 -10
- package/src/api/queue/index.ts +136 -108
- package/src/api/queue/messages.ts +22 -22
- package/src/api/queue/queues.ts +14 -14
- package/src/api/queue/sources.ts +11 -11
- package/src/api/sandbox/cli-list.ts +4 -4
- package/src/api/sandbox/create.ts +17 -11
- package/src/api/sandbox/destroy.ts +4 -4
- package/src/api/sandbox/execute.ts +17 -11
- package/src/api/sandbox/execution.ts +7 -7
- package/src/api/sandbox/get.ts +15 -15
- package/src/api/sandbox/index.ts +155 -93
- package/src/api/sandbox/list.ts +12 -12
- package/src/api/sandbox/resolve.ts +4 -4
- package/src/api/sandbox/runtime.ts +7 -7
- package/src/api/sandbox/snapshot.ts +20 -18
- package/src/api/stream/get.ts +3 -3
- package/src/api/stream/list.ts +4 -4
|
@@ -1,5 +1,56 @@
|
|
|
1
|
-
import { APIClient } from '../api';
|
|
2
1
|
import type { ExecuteOptions, Execution } from '@agentuity/core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { type APIClient } from '../api';
|
|
4
|
+
export declare const ExecuteRequestSchema: z.ZodObject<{
|
|
5
|
+
command: z.ZodArray<z.ZodString>;
|
|
6
|
+
files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
7
|
+
path: z.ZodString;
|
|
8
|
+
content: z.ZodString;
|
|
9
|
+
}, z.core.$strip>>>;
|
|
10
|
+
timeout: z.ZodOptional<z.ZodString>;
|
|
11
|
+
stream: z.ZodOptional<z.ZodObject<{
|
|
12
|
+
stdout: z.ZodOptional<z.ZodString>;
|
|
13
|
+
stderr: z.ZodOptional<z.ZodString>;
|
|
14
|
+
timestamps: z.ZodOptional<z.ZodBoolean>;
|
|
15
|
+
}, z.core.$strip>>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export declare const ExecuteDataSchema: z.ZodObject<{
|
|
18
|
+
executionId: z.ZodString;
|
|
19
|
+
status: z.ZodEnum<{
|
|
20
|
+
failed: "failed";
|
|
21
|
+
completed: "completed";
|
|
22
|
+
timeout: "timeout";
|
|
23
|
+
running: "running";
|
|
24
|
+
queued: "queued";
|
|
25
|
+
cancelled: "cancelled";
|
|
26
|
+
}>;
|
|
27
|
+
exitCode: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
stdoutStreamUrl: z.ZodOptional<z.ZodString>;
|
|
30
|
+
stderrStreamUrl: z.ZodOptional<z.ZodString>;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
export declare const ExecuteResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
33
|
+
success: z.ZodLiteral<false>;
|
|
34
|
+
message: z.ZodString;
|
|
35
|
+
code: z.ZodOptional<z.ZodString>;
|
|
36
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
37
|
+
success: z.ZodLiteral<true>;
|
|
38
|
+
data: z.ZodObject<{
|
|
39
|
+
executionId: z.ZodString;
|
|
40
|
+
status: z.ZodEnum<{
|
|
41
|
+
failed: "failed";
|
|
42
|
+
completed: "completed";
|
|
43
|
+
timeout: "timeout";
|
|
44
|
+
running: "running";
|
|
45
|
+
queued: "queued";
|
|
46
|
+
cancelled: "cancelled";
|
|
47
|
+
}>;
|
|
48
|
+
exitCode: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
50
|
+
stdoutStreamUrl: z.ZodOptional<z.ZodString>;
|
|
51
|
+
stderrStreamUrl: z.ZodOptional<z.ZodString>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
}, z.core.$strip>], "success">;
|
|
3
54
|
export interface SandboxExecuteParams {
|
|
4
55
|
sandboxId: string;
|
|
5
56
|
options: ExecuteOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../../src/api/sandbox/execute.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../../src/api/sandbox/execute.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAmB,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,QAAQ,CAAC;AAG3D,eAAO,MAAM,oBAAoB;;;;;;;;;;;;iBAsB8B,CAAC;AAEhE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;iBAWoB,CAAC;AAEnD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;8BAAuC,CAAC;AAE1E,MAAM,WAAW,oBAAoB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,cAAc,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,WAAW,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,wBAAsB,cAAc,CACnC,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,oBAAoB,GAC1B,OAAO,CAAC,SAAS,CAAC,CA8CpB"}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { APIResponseSchema } from '../api';
|
|
3
|
-
import {
|
|
4
|
-
const ExecuteRequestSchema = z
|
|
3
|
+
import { API_VERSION, throwSandboxError } from './util';
|
|
4
|
+
export const ExecuteRequestSchema = z
|
|
5
5
|
.object({
|
|
6
6
|
command: z.array(z.string()).describe('Command and arguments to execute'),
|
|
7
7
|
files: z
|
|
8
|
-
.
|
|
8
|
+
.array(z.object({
|
|
9
|
+
path: z.string().describe('File path relative to workspace'),
|
|
10
|
+
content: z.string().describe('Base64-encoded file content'),
|
|
11
|
+
}))
|
|
9
12
|
.optional()
|
|
10
|
-
.describe('Files to write before execution
|
|
13
|
+
.describe('Files to write before execution'),
|
|
11
14
|
timeout: z.string().optional().describe('Execution timeout (e.g., "30s", "5m")'),
|
|
12
15
|
stream: z
|
|
13
16
|
.object({
|
|
@@ -19,7 +22,7 @@ const ExecuteRequestSchema = z
|
|
|
19
22
|
.describe('Stream configuration for output redirection'),
|
|
20
23
|
})
|
|
21
24
|
.describe('Request body for executing a command in a sandbox');
|
|
22
|
-
const ExecuteDataSchema = z
|
|
25
|
+
export const ExecuteDataSchema = z
|
|
23
26
|
.object({
|
|
24
27
|
executionId: z.string().describe('Unique identifier for the execution'),
|
|
25
28
|
status: z
|
|
@@ -31,7 +34,7 @@ const ExecuteDataSchema = z
|
|
|
31
34
|
stderrStreamUrl: z.string().optional().describe('URL for streaming stderr output'),
|
|
32
35
|
})
|
|
33
36
|
.describe('Response data from command execution');
|
|
34
|
-
const ExecuteResponseSchema = APIResponseSchema(ExecuteDataSchema);
|
|
37
|
+
export const ExecuteResponseSchema = APIResponseSchema(ExecuteDataSchema);
|
|
35
38
|
/**
|
|
36
39
|
* Executes a command in an existing sandbox.
|
|
37
40
|
*
|
|
@@ -46,7 +49,10 @@ export async function sandboxExecute(client, params) {
|
|
|
46
49
|
command: options.command,
|
|
47
50
|
};
|
|
48
51
|
if (options.files && options.files.length > 0) {
|
|
49
|
-
body.files =
|
|
52
|
+
body.files = options.files.map((f) => ({
|
|
53
|
+
path: f.path,
|
|
54
|
+
content: f.content.toString('base64'),
|
|
55
|
+
}));
|
|
50
56
|
}
|
|
51
57
|
if (options.timeout) {
|
|
52
58
|
body.timeout = options.timeout;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../src/api/sandbox/execute.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../src/api/sandbox/execute.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAExD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC;KACnC,MAAM,CAAC;IACP,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,kCAAkC,CAAC;IACzE,KAAK,EAAE,CAAC;SACN,KAAK,CACL,CAAC,CAAC,MAAM,CAAC;QACR,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;QAC5D,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;KAC3D,CAAC,CACF;SACA,QAAQ,EAAE;SACV,QAAQ,CAAC,iCAAiC,CAAC;IAC7C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;IAChF,MAAM,EAAE,CAAC;SACP,MAAM,CAAC;QACP,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;QACrE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;QACrE,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;KACtF,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,C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Ae,EAAE,IAAI,CAAC,IAAI,CAAC,eAAe;SAC1C,CAAC;IACH,CAAC;IAED,iBAAiB,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;AACxC,CAAC"}
|
|
@@ -1,5 +1,108 @@
|
|
|
1
|
-
import { APIClient } from '../api';
|
|
2
1
|
import type { ExecutionStatus } from '@agentuity/core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { type APIClient } from '../api';
|
|
4
|
+
export declare const ExecutionInfoSchema: z.ZodObject<{
|
|
5
|
+
executionId: z.ZodString;
|
|
6
|
+
sandboxId: z.ZodString;
|
|
7
|
+
type: z.ZodOptional<z.ZodString>;
|
|
8
|
+
status: z.ZodEnum<{
|
|
9
|
+
failed: "failed";
|
|
10
|
+
completed: "completed";
|
|
11
|
+
timeout: "timeout";
|
|
12
|
+
running: "running";
|
|
13
|
+
queued: "queued";
|
|
14
|
+
cancelled: "cancelled";
|
|
15
|
+
}>;
|
|
16
|
+
command: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
17
|
+
exitCode: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
startedAt: z.ZodOptional<z.ZodString>;
|
|
20
|
+
completedAt: z.ZodOptional<z.ZodString>;
|
|
21
|
+
error: z.ZodOptional<z.ZodString>;
|
|
22
|
+
stdoutStreamUrl: z.ZodOptional<z.ZodString>;
|
|
23
|
+
stderrStreamUrl: z.ZodOptional<z.ZodString>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
export declare const ExecutionGetResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
26
|
+
success: z.ZodLiteral<false>;
|
|
27
|
+
message: z.ZodString;
|
|
28
|
+
code: z.ZodOptional<z.ZodString>;
|
|
29
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
30
|
+
success: z.ZodLiteral<true>;
|
|
31
|
+
data: z.ZodObject<{
|
|
32
|
+
executionId: z.ZodString;
|
|
33
|
+
sandboxId: z.ZodString;
|
|
34
|
+
type: z.ZodOptional<z.ZodString>;
|
|
35
|
+
status: z.ZodEnum<{
|
|
36
|
+
failed: "failed";
|
|
37
|
+
completed: "completed";
|
|
38
|
+
timeout: "timeout";
|
|
39
|
+
running: "running";
|
|
40
|
+
queued: "queued";
|
|
41
|
+
cancelled: "cancelled";
|
|
42
|
+
}>;
|
|
43
|
+
command: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
44
|
+
exitCode: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
startedAt: z.ZodOptional<z.ZodString>;
|
|
47
|
+
completedAt: z.ZodOptional<z.ZodString>;
|
|
48
|
+
error: z.ZodOptional<z.ZodString>;
|
|
49
|
+
stdoutStreamUrl: z.ZodOptional<z.ZodString>;
|
|
50
|
+
stderrStreamUrl: z.ZodOptional<z.ZodString>;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
}, z.core.$strip>], "success">;
|
|
53
|
+
export declare const ExecutionListDataSchema: z.ZodObject<{
|
|
54
|
+
executions: z.ZodArray<z.ZodObject<{
|
|
55
|
+
executionId: z.ZodString;
|
|
56
|
+
sandboxId: z.ZodString;
|
|
57
|
+
type: z.ZodOptional<z.ZodString>;
|
|
58
|
+
status: z.ZodEnum<{
|
|
59
|
+
failed: "failed";
|
|
60
|
+
completed: "completed";
|
|
61
|
+
timeout: "timeout";
|
|
62
|
+
running: "running";
|
|
63
|
+
queued: "queued";
|
|
64
|
+
cancelled: "cancelled";
|
|
65
|
+
}>;
|
|
66
|
+
command: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
67
|
+
exitCode: z.ZodOptional<z.ZodNumber>;
|
|
68
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
69
|
+
startedAt: z.ZodOptional<z.ZodString>;
|
|
70
|
+
completedAt: z.ZodOptional<z.ZodString>;
|
|
71
|
+
error: z.ZodOptional<z.ZodString>;
|
|
72
|
+
stdoutStreamUrl: z.ZodOptional<z.ZodString>;
|
|
73
|
+
stderrStreamUrl: z.ZodOptional<z.ZodString>;
|
|
74
|
+
}, z.core.$strip>>;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
export declare const ExecutionListResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
77
|
+
success: z.ZodLiteral<false>;
|
|
78
|
+
message: z.ZodString;
|
|
79
|
+
code: z.ZodOptional<z.ZodString>;
|
|
80
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
81
|
+
success: z.ZodLiteral<true>;
|
|
82
|
+
data: z.ZodObject<{
|
|
83
|
+
executions: z.ZodArray<z.ZodObject<{
|
|
84
|
+
executionId: z.ZodString;
|
|
85
|
+
sandboxId: z.ZodString;
|
|
86
|
+
type: z.ZodOptional<z.ZodString>;
|
|
87
|
+
status: z.ZodEnum<{
|
|
88
|
+
failed: "failed";
|
|
89
|
+
completed: "completed";
|
|
90
|
+
timeout: "timeout";
|
|
91
|
+
running: "running";
|
|
92
|
+
queued: "queued";
|
|
93
|
+
cancelled: "cancelled";
|
|
94
|
+
}>;
|
|
95
|
+
command: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
96
|
+
exitCode: z.ZodOptional<z.ZodNumber>;
|
|
97
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
98
|
+
startedAt: z.ZodOptional<z.ZodString>;
|
|
99
|
+
completedAt: z.ZodOptional<z.ZodString>;
|
|
100
|
+
error: z.ZodOptional<z.ZodString>;
|
|
101
|
+
stdoutStreamUrl: z.ZodOptional<z.ZodString>;
|
|
102
|
+
stderrStreamUrl: z.ZodOptional<z.ZodString>;
|
|
103
|
+
}, z.core.$strip>>;
|
|
104
|
+
}, z.core.$strip>;
|
|
105
|
+
}, z.core.$strip>], "success">;
|
|
3
106
|
export interface ExecutionInfo {
|
|
4
107
|
executionId: string;
|
|
5
108
|
sandboxId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../../../src/api/sandbox/execution.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../../../src/api/sandbox/execution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,QAAQ,CAAC;AAG3D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;iBAoB4B,CAAC;AAE7D,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAAyC,CAAC;AAEjF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;iBAIU,CAAC;AAE/C,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAA6C,CAAC;AAEtF,MAAM,WAAW,aAAa;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,kBAAkB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,YAAY,CACjC,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,kBAAkB,GACxB,OAAO,CAAC,aAAa,CAAC,CAmCxB;AAED,MAAM,WAAW,mBAAmB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,qBAAqB;IACrC,UAAU,EAAE,aAAa,EAAE,CAAC;CAC5B;AAED;;;;;;;GAOG;AACH,wBAAsB,aAAa,CAClC,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,mBAAmB,GACzB,OAAO,CAAC,qBAAqB,CAAC,CAqChC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { APIResponseSchema } from '../api';
|
|
3
|
-
import {
|
|
4
|
-
const ExecutionInfoSchema = z
|
|
3
|
+
import { API_VERSION, throwSandboxError } from './util';
|
|
4
|
+
export const ExecutionInfoSchema = z
|
|
5
5
|
.object({
|
|
6
6
|
executionId: z.string().describe('Unique identifier for the execution'),
|
|
7
7
|
sandboxId: z.string().describe('ID of the sandbox where the execution ran'),
|
|
@@ -22,13 +22,13 @@ const ExecutionInfoSchema = z
|
|
|
22
22
|
stderrStreamUrl: z.string().optional().describe('URL to stream stderr output'),
|
|
23
23
|
})
|
|
24
24
|
.describe('Detailed information about a command execution');
|
|
25
|
-
const ExecutionGetResponseSchema = APIResponseSchema(ExecutionInfoSchema);
|
|
26
|
-
const ExecutionListDataSchema = z
|
|
25
|
+
export const ExecutionGetResponseSchema = APIResponseSchema(ExecutionInfoSchema);
|
|
26
|
+
export const ExecutionListDataSchema = z
|
|
27
27
|
.object({
|
|
28
28
|
executions: z.array(ExecutionInfoSchema).describe('List of executions'),
|
|
29
29
|
})
|
|
30
30
|
.describe('List of executions for a sandbox');
|
|
31
|
-
const ExecutionListResponseSchema = APIResponseSchema(ExecutionListDataSchema);
|
|
31
|
+
export const ExecutionListResponseSchema = APIResponseSchema(ExecutionListDataSchema);
|
|
32
32
|
/**
|
|
33
33
|
* Retrieves detailed information about a specific execution.
|
|
34
34
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution.js","sourceRoot":"","sources":["../../../src/api/sandbox/execution.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"execution.js","sourceRoot":"","sources":["../../../src/api/sandbox/execution.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAExD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC;KAClC,MAAM,CAAC;IACP,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC;IACvE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;IAC3E,IAAI,EAAE,CAAC;SACL,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,wDAAwD,CAAC;IACpE,MAAM,EAAE,CAAC;SACP,IAAI,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;SAC1E,QAAQ,CAAC,iCAAiC,CAAC;IAC7C,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;IAC7E,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IAC7E,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,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AC,CAAC;SACH,CAAC;IACH,CAAC;IAED,iBAAiB,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;AACxC,CAAC"}
|
|
@@ -1,5 +1,237 @@
|
|
|
1
|
-
import { APIClient } from '../api';
|
|
2
1
|
import type { SandboxInfo } from '@agentuity/core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { type APIClient } from '../api';
|
|
4
|
+
export declare const SandboxResourcesSchema: z.ZodObject<{
|
|
5
|
+
memory: z.ZodOptional<z.ZodString>;
|
|
6
|
+
cpu: z.ZodOptional<z.ZodString>;
|
|
7
|
+
disk: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export declare const SandboxUserInfoSchema: z.ZodObject<{
|
|
10
|
+
id: z.ZodString;
|
|
11
|
+
firstName: z.ZodOptional<z.ZodString>;
|
|
12
|
+
lastName: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export declare const SandboxAgentInfoSchema: z.ZodObject<{
|
|
15
|
+
id: z.ZodString;
|
|
16
|
+
name: z.ZodString;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export declare const SandboxProjectInfoSchema: z.ZodObject<{
|
|
19
|
+
id: z.ZodString;
|
|
20
|
+
name: z.ZodString;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export declare const SandboxOrgInfoSchema: z.ZodObject<{
|
|
23
|
+
id: z.ZodString;
|
|
24
|
+
name: z.ZodString;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
export declare const SandboxRuntimeInfoSchema: z.ZodObject<{
|
|
27
|
+
id: z.ZodString;
|
|
28
|
+
name: z.ZodString;
|
|
29
|
+
iconUrl: z.ZodOptional<z.ZodString>;
|
|
30
|
+
brandColor: z.ZodOptional<z.ZodString>;
|
|
31
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
export declare const SandboxSnapshotUserInfoSchema: z.ZodObject<{
|
|
34
|
+
id: z.ZodString;
|
|
35
|
+
firstName: z.ZodOptional<z.ZodString>;
|
|
36
|
+
lastName: z.ZodOptional<z.ZodString>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
export declare const SandboxSnapshotOrgInfoSchema: z.ZodObject<{
|
|
39
|
+
id: z.ZodString;
|
|
40
|
+
name: z.ZodString;
|
|
41
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
export declare const SandboxSnapshotInfoSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
44
|
+
id: z.ZodString;
|
|
45
|
+
name: z.ZodOptional<z.ZodString>;
|
|
46
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
47
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
48
|
+
public: z.ZodLiteral<true>;
|
|
49
|
+
org: z.ZodObject<{
|
|
50
|
+
id: z.ZodString;
|
|
51
|
+
name: z.ZodString;
|
|
52
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
55
|
+
id: z.ZodString;
|
|
56
|
+
name: z.ZodOptional<z.ZodString>;
|
|
57
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
58
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
59
|
+
public: z.ZodLiteral<false>;
|
|
60
|
+
user: z.ZodObject<{
|
|
61
|
+
id: z.ZodString;
|
|
62
|
+
firstName: z.ZodOptional<z.ZodString>;
|
|
63
|
+
lastName: z.ZodOptional<z.ZodString>;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
}, z.core.$strip>]>;
|
|
66
|
+
export declare const SandboxInfoDataSchema: z.ZodObject<{
|
|
67
|
+
sandboxId: z.ZodString;
|
|
68
|
+
identifier: z.ZodOptional<z.ZodString>;
|
|
69
|
+
name: z.ZodOptional<z.ZodString>;
|
|
70
|
+
description: z.ZodOptional<z.ZodString>;
|
|
71
|
+
status: z.ZodEnum<{
|
|
72
|
+
idle: "idle";
|
|
73
|
+
failed: "failed";
|
|
74
|
+
deleted: "deleted";
|
|
75
|
+
creating: "creating";
|
|
76
|
+
running: "running";
|
|
77
|
+
terminated: "terminated";
|
|
78
|
+
}>;
|
|
79
|
+
mode: z.ZodOptional<z.ZodString>;
|
|
80
|
+
createdAt: z.ZodString;
|
|
81
|
+
region: z.ZodOptional<z.ZodString>;
|
|
82
|
+
runtime: z.ZodOptional<z.ZodObject<{
|
|
83
|
+
id: z.ZodString;
|
|
84
|
+
name: z.ZodString;
|
|
85
|
+
iconUrl: z.ZodOptional<z.ZodString>;
|
|
86
|
+
brandColor: z.ZodOptional<z.ZodString>;
|
|
87
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
88
|
+
}, z.core.$strip>>;
|
|
89
|
+
snapshot: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
90
|
+
id: z.ZodString;
|
|
91
|
+
name: z.ZodOptional<z.ZodString>;
|
|
92
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
93
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
94
|
+
public: z.ZodLiteral<true>;
|
|
95
|
+
org: z.ZodObject<{
|
|
96
|
+
id: z.ZodString;
|
|
97
|
+
name: z.ZodString;
|
|
98
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
99
|
+
}, z.core.$strip>;
|
|
100
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
101
|
+
id: z.ZodString;
|
|
102
|
+
name: z.ZodOptional<z.ZodString>;
|
|
103
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
104
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
105
|
+
public: z.ZodLiteral<false>;
|
|
106
|
+
user: z.ZodObject<{
|
|
107
|
+
id: z.ZodString;
|
|
108
|
+
firstName: z.ZodOptional<z.ZodString>;
|
|
109
|
+
lastName: z.ZodOptional<z.ZodString>;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
}, z.core.$strip>]>>;
|
|
112
|
+
executions: z.ZodNumber;
|
|
113
|
+
exitCode: z.ZodOptional<z.ZodNumber>;
|
|
114
|
+
stdoutStreamUrl: z.ZodOptional<z.ZodString>;
|
|
115
|
+
stderrStreamUrl: z.ZodOptional<z.ZodString>;
|
|
116
|
+
dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
117
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
118
|
+
resources: z.ZodOptional<z.ZodObject<{
|
|
119
|
+
memory: z.ZodOptional<z.ZodString>;
|
|
120
|
+
cpu: z.ZodOptional<z.ZodString>;
|
|
121
|
+
disk: z.ZodOptional<z.ZodString>;
|
|
122
|
+
}, z.core.$strip>>;
|
|
123
|
+
cpuTimeMs: z.ZodOptional<z.ZodNumber>;
|
|
124
|
+
memoryByteSec: z.ZodOptional<z.ZodNumber>;
|
|
125
|
+
networkEgressBytes: z.ZodOptional<z.ZodNumber>;
|
|
126
|
+
networkEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
127
|
+
networkPort: z.ZodOptional<z.ZodNumber>;
|
|
128
|
+
url: z.ZodOptional<z.ZodString>;
|
|
129
|
+
user: z.ZodOptional<z.ZodObject<{
|
|
130
|
+
id: z.ZodString;
|
|
131
|
+
firstName: z.ZodOptional<z.ZodString>;
|
|
132
|
+
lastName: z.ZodOptional<z.ZodString>;
|
|
133
|
+
}, z.core.$strip>>;
|
|
134
|
+
agent: z.ZodOptional<z.ZodObject<{
|
|
135
|
+
id: z.ZodString;
|
|
136
|
+
name: z.ZodString;
|
|
137
|
+
}, z.core.$strip>>;
|
|
138
|
+
project: z.ZodOptional<z.ZodObject<{
|
|
139
|
+
id: z.ZodString;
|
|
140
|
+
name: z.ZodString;
|
|
141
|
+
}, z.core.$strip>>;
|
|
142
|
+
org: z.ZodObject<{
|
|
143
|
+
id: z.ZodString;
|
|
144
|
+
name: z.ZodString;
|
|
145
|
+
}, z.core.$strip>;
|
|
146
|
+
}, z.core.$strip>;
|
|
147
|
+
export declare const SandboxGetResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
148
|
+
success: z.ZodLiteral<false>;
|
|
149
|
+
message: z.ZodString;
|
|
150
|
+
code: z.ZodOptional<z.ZodString>;
|
|
151
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
152
|
+
success: z.ZodLiteral<true>;
|
|
153
|
+
data: z.ZodObject<{
|
|
154
|
+
sandboxId: z.ZodString;
|
|
155
|
+
identifier: z.ZodOptional<z.ZodString>;
|
|
156
|
+
name: z.ZodOptional<z.ZodString>;
|
|
157
|
+
description: z.ZodOptional<z.ZodString>;
|
|
158
|
+
status: z.ZodEnum<{
|
|
159
|
+
idle: "idle";
|
|
160
|
+
failed: "failed";
|
|
161
|
+
deleted: "deleted";
|
|
162
|
+
creating: "creating";
|
|
163
|
+
running: "running";
|
|
164
|
+
terminated: "terminated";
|
|
165
|
+
}>;
|
|
166
|
+
mode: z.ZodOptional<z.ZodString>;
|
|
167
|
+
createdAt: z.ZodString;
|
|
168
|
+
region: z.ZodOptional<z.ZodString>;
|
|
169
|
+
runtime: z.ZodOptional<z.ZodObject<{
|
|
170
|
+
id: z.ZodString;
|
|
171
|
+
name: z.ZodString;
|
|
172
|
+
iconUrl: z.ZodOptional<z.ZodString>;
|
|
173
|
+
brandColor: z.ZodOptional<z.ZodString>;
|
|
174
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
175
|
+
}, z.core.$strip>>;
|
|
176
|
+
snapshot: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
177
|
+
id: z.ZodString;
|
|
178
|
+
name: z.ZodOptional<z.ZodString>;
|
|
179
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
180
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
181
|
+
public: z.ZodLiteral<true>;
|
|
182
|
+
org: z.ZodObject<{
|
|
183
|
+
id: z.ZodString;
|
|
184
|
+
name: z.ZodString;
|
|
185
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
186
|
+
}, z.core.$strip>;
|
|
187
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
188
|
+
id: z.ZodString;
|
|
189
|
+
name: z.ZodOptional<z.ZodString>;
|
|
190
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
191
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
192
|
+
public: z.ZodLiteral<false>;
|
|
193
|
+
user: z.ZodObject<{
|
|
194
|
+
id: z.ZodString;
|
|
195
|
+
firstName: z.ZodOptional<z.ZodString>;
|
|
196
|
+
lastName: z.ZodOptional<z.ZodString>;
|
|
197
|
+
}, z.core.$strip>;
|
|
198
|
+
}, z.core.$strip>]>>;
|
|
199
|
+
executions: z.ZodNumber;
|
|
200
|
+
exitCode: z.ZodOptional<z.ZodNumber>;
|
|
201
|
+
stdoutStreamUrl: z.ZodOptional<z.ZodString>;
|
|
202
|
+
stderrStreamUrl: z.ZodOptional<z.ZodString>;
|
|
203
|
+
dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
204
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
205
|
+
resources: z.ZodOptional<z.ZodObject<{
|
|
206
|
+
memory: z.ZodOptional<z.ZodString>;
|
|
207
|
+
cpu: z.ZodOptional<z.ZodString>;
|
|
208
|
+
disk: z.ZodOptional<z.ZodString>;
|
|
209
|
+
}, z.core.$strip>>;
|
|
210
|
+
cpuTimeMs: z.ZodOptional<z.ZodNumber>;
|
|
211
|
+
memoryByteSec: z.ZodOptional<z.ZodNumber>;
|
|
212
|
+
networkEgressBytes: z.ZodOptional<z.ZodNumber>;
|
|
213
|
+
networkEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
214
|
+
networkPort: z.ZodOptional<z.ZodNumber>;
|
|
215
|
+
url: z.ZodOptional<z.ZodString>;
|
|
216
|
+
user: z.ZodOptional<z.ZodObject<{
|
|
217
|
+
id: z.ZodString;
|
|
218
|
+
firstName: z.ZodOptional<z.ZodString>;
|
|
219
|
+
lastName: z.ZodOptional<z.ZodString>;
|
|
220
|
+
}, z.core.$strip>>;
|
|
221
|
+
agent: z.ZodOptional<z.ZodObject<{
|
|
222
|
+
id: z.ZodString;
|
|
223
|
+
name: z.ZodString;
|
|
224
|
+
}, z.core.$strip>>;
|
|
225
|
+
project: z.ZodOptional<z.ZodObject<{
|
|
226
|
+
id: z.ZodString;
|
|
227
|
+
name: z.ZodString;
|
|
228
|
+
}, z.core.$strip>>;
|
|
229
|
+
org: z.ZodObject<{
|
|
230
|
+
id: z.ZodString;
|
|
231
|
+
name: z.ZodString;
|
|
232
|
+
}, z.core.$strip>;
|
|
233
|
+
}, z.core.$strip>;
|
|
234
|
+
}, z.core.$strip>], "success">;
|
|
3
235
|
export interface SandboxGetParams {
|
|
4
236
|
sandboxId: string;
|
|
5
237
|
orgId?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../src/api/sandbox/get.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../src/api/sandbox/get.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,WAAW,EAIX,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,QAAQ,CAAC;AAG3D,eAAO,MAAM,sBAAsB;;;;iBAMU,CAAC;AAE9C,eAAO,MAAM,qBAAqB;;;;iBAMQ,CAAC;AAE3C,eAAO,MAAM,sBAAsB;;;iBAKY,CAAC;AAEhD,eAAO,MAAM,wBAAwB;;;iBAKY,CAAC;AAElD,eAAO,MAAM,oBAAoB;;;iBAKqB,CAAC;AAEvD,eAAO,MAAM,wBAAwB;;;;;;iBAQJ,CAAC;AAElC,eAAO,MAAM,6BAA6B;;;;iBAMH,CAAC;AAExC,eAAO,MAAM,4BAA4B;;;;iBAMM,CAAC;AAEhD,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;mBAyBkB,CAAC;AAEzD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA4CgB,CAAC;AAEnD,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAA2C,CAAC;AAEjF,MAAM,WAAW,gBAAgB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,wBAAsB,UAAU,CAC/B,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,gBAAgB,GACtB,OAAO,CAAC,WAAW,CAAC,CAkDtB"}
|
package/dist/api/sandbox/get.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { APIResponseSchema } from '../api';
|
|
3
|
-
import {
|
|
4
|
-
const SandboxResourcesSchema = z
|
|
3
|
+
import { API_VERSION, throwSandboxError } from './util';
|
|
4
|
+
export const SandboxResourcesSchema = z
|
|
5
5
|
.object({
|
|
6
6
|
memory: z.string().optional().describe('Memory limit (e.g., "512Mi", "1Gi")'),
|
|
7
7
|
cpu: z.string().optional().describe('CPU limit in millicores (e.g., "500m", "1000m")'),
|
|
8
8
|
disk: z.string().optional().describe('Disk limit (e.g., "1Gi", "10Gi")'),
|
|
9
9
|
})
|
|
10
10
|
.describe('Resource limits for the sandbox');
|
|
11
|
-
const SandboxUserInfoSchema = z
|
|
11
|
+
export const SandboxUserInfoSchema = z
|
|
12
12
|
.object({
|
|
13
13
|
id: z.string().describe('User ID'),
|
|
14
14
|
firstName: z.string().optional().describe("User's first name"),
|
|
15
15
|
lastName: z.string().optional().describe("User's last name"),
|
|
16
16
|
})
|
|
17
17
|
.describe('User who created the sandbox');
|
|
18
|
-
const SandboxAgentInfoSchema = z
|
|
18
|
+
export const SandboxAgentInfoSchema = z
|
|
19
19
|
.object({
|
|
20
20
|
id: z.string().describe('Agent ID'),
|
|
21
21
|
name: z.string().describe('Agent name'),
|
|
22
22
|
})
|
|
23
23
|
.describe('Agent associated with the sandbox');
|
|
24
|
-
const SandboxProjectInfoSchema = z
|
|
24
|
+
export const SandboxProjectInfoSchema = z
|
|
25
25
|
.object({
|
|
26
26
|
id: z.string().describe('Project ID'),
|
|
27
27
|
name: z.string().describe('Project name'),
|
|
28
28
|
})
|
|
29
29
|
.describe('Project associated with the sandbox');
|
|
30
|
-
const SandboxOrgInfoSchema = z
|
|
30
|
+
export const SandboxOrgInfoSchema = z
|
|
31
31
|
.object({
|
|
32
32
|
id: z.string().describe('Organization ID'),
|
|
33
33
|
name: z.string().describe('Organization name'),
|
|
34
34
|
})
|
|
35
35
|
.describe('Organization associated with the sandbox');
|
|
36
|
-
const SandboxRuntimeInfoSchema = z
|
|
36
|
+
export const SandboxRuntimeInfoSchema = z
|
|
37
37
|
.object({
|
|
38
38
|
id: z.string().describe('Runtime ID'),
|
|
39
39
|
name: z.string().describe('Runtime name (e.g., "bun:1")'),
|
|
@@ -42,21 +42,21 @@ const SandboxRuntimeInfoSchema = z
|
|
|
42
42
|
tags: z.array(z.string()).optional().describe('Optional tags for categorization'),
|
|
43
43
|
})
|
|
44
44
|
.describe('Runtime information');
|
|
45
|
-
const SandboxSnapshotUserInfoSchema = z
|
|
45
|
+
export const SandboxSnapshotUserInfoSchema = z
|
|
46
46
|
.object({
|
|
47
47
|
id: z.string().describe('User ID'),
|
|
48
48
|
firstName: z.string().optional().describe("User's first name"),
|
|
49
49
|
lastName: z.string().optional().describe("User's last name"),
|
|
50
50
|
})
|
|
51
51
|
.describe('Snapshot user information');
|
|
52
|
-
const SandboxSnapshotOrgInfoSchema = z
|
|
52
|
+
export const SandboxSnapshotOrgInfoSchema = z
|
|
53
53
|
.object({
|
|
54
54
|
id: z.string().describe('Organization ID'),
|
|
55
55
|
name: z.string().describe('Organization name'),
|
|
56
56
|
slug: z.string().optional().describe('Organization slug'),
|
|
57
57
|
})
|
|
58
58
|
.describe('Snapshot organization information');
|
|
59
|
-
const SandboxSnapshotInfoSchema = z
|
|
59
|
+
export const SandboxSnapshotInfoSchema = z
|
|
60
60
|
.union([
|
|
61
61
|
z
|
|
62
62
|
.object({
|
|
@@ -80,7 +80,7 @@ const SandboxSnapshotInfoSchema = z
|
|
|
80
80
|
.describe('Private snapshot'),
|
|
81
81
|
])
|
|
82
82
|
.describe('Snapshot information (discriminated union)');
|
|
83
|
-
const SandboxInfoDataSchema = z
|
|
83
|
+
export const SandboxInfoDataSchema = z
|
|
84
84
|
.object({
|
|
85
85
|
sandboxId: z.string().describe('Unique identifier for the sandbox'),
|
|
86
86
|
identifier: z.string().optional().describe('Short identifier for DNS hostname'),
|
|
@@ -125,7 +125,7 @@ const SandboxInfoDataSchema = z
|
|
|
125
125
|
org: SandboxOrgInfoSchema.describe('Organization associated with the sandbox'),
|
|
126
126
|
})
|
|
127
127
|
.describe('Detailed information about a sandbox');
|
|
128
|
-
const SandboxGetResponseSchema = APIResponseSchema(SandboxInfoDataSchema);
|
|
128
|
+
export const SandboxGetResponseSchema = APIResponseSchema(SandboxInfoDataSchema);
|
|
129
129
|
/**
|
|
130
130
|
* Retrieves information about a specific sandbox.
|
|
131
131
|
*
|