@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,15 +1,20 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { APIClient, APIResponseSchema } from '../api';
|
|
3
|
-
import { throwSandboxError, API_VERSION } from './util';
|
|
4
1
|
import type { ExecuteOptions, Execution, ExecutionStatus } from '@agentuity/core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { type APIClient, APIResponseSchema } from '../api';
|
|
4
|
+
import { API_VERSION, throwSandboxError } from './util';
|
|
5
5
|
|
|
6
|
-
const ExecuteRequestSchema = z
|
|
6
|
+
export const ExecuteRequestSchema = z
|
|
7
7
|
.object({
|
|
8
8
|
command: z.array(z.string()).describe('Command and arguments to execute'),
|
|
9
9
|
files: z
|
|
10
|
-
.
|
|
10
|
+
.array(
|
|
11
|
+
z.object({
|
|
12
|
+
path: z.string().describe('File path relative to workspace'),
|
|
13
|
+
content: z.string().describe('Base64-encoded file content'),
|
|
14
|
+
})
|
|
15
|
+
)
|
|
11
16
|
.optional()
|
|
12
|
-
.describe('Files to write before execution
|
|
17
|
+
.describe('Files to write before execution'),
|
|
13
18
|
timeout: z.string().optional().describe('Execution timeout (e.g., "30s", "5m")'),
|
|
14
19
|
stream: z
|
|
15
20
|
.object({
|
|
@@ -22,7 +27,7 @@ const ExecuteRequestSchema = z
|
|
|
22
27
|
})
|
|
23
28
|
.describe('Request body for executing a command in a sandbox');
|
|
24
29
|
|
|
25
|
-
const ExecuteDataSchema = z
|
|
30
|
+
export const ExecuteDataSchema = z
|
|
26
31
|
.object({
|
|
27
32
|
executionId: z.string().describe('Unique identifier for the execution'),
|
|
28
33
|
status: z
|
|
@@ -35,7 +40,7 @@ const ExecuteDataSchema = z
|
|
|
35
40
|
})
|
|
36
41
|
.describe('Response data from command execution');
|
|
37
42
|
|
|
38
|
-
const ExecuteResponseSchema = APIResponseSchema(ExecuteDataSchema);
|
|
43
|
+
export const ExecuteResponseSchema = APIResponseSchema(ExecuteDataSchema);
|
|
39
44
|
|
|
40
45
|
export interface SandboxExecuteParams {
|
|
41
46
|
sandboxId: string;
|
|
@@ -62,9 +67,10 @@ export async function sandboxExecute(
|
|
|
62
67
|
};
|
|
63
68
|
|
|
64
69
|
if (options.files && options.files.length > 0) {
|
|
65
|
-
body.files =
|
|
66
|
-
|
|
67
|
-
|
|
70
|
+
body.files = options.files.map((f) => ({
|
|
71
|
+
path: f.path,
|
|
72
|
+
content: f.content.toString('base64'),
|
|
73
|
+
}));
|
|
68
74
|
}
|
|
69
75
|
if (options.timeout) {
|
|
70
76
|
body.timeout = options.timeout;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { APIClient, APIResponseSchema } from '../api';
|
|
3
|
-
import { throwSandboxError, API_VERSION } from './util';
|
|
4
1
|
import type { ExecutionStatus } from '@agentuity/core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { type APIClient, APIResponseSchema } from '../api';
|
|
4
|
+
import { API_VERSION, throwSandboxError } from './util';
|
|
5
5
|
|
|
6
|
-
const ExecutionInfoSchema = z
|
|
6
|
+
export const ExecutionInfoSchema = z
|
|
7
7
|
.object({
|
|
8
8
|
executionId: z.string().describe('Unique identifier for the execution'),
|
|
9
9
|
sandboxId: z.string().describe('ID of the sandbox where the execution ran'),
|
|
@@ -25,15 +25,15 @@ const ExecutionInfoSchema = z
|
|
|
25
25
|
})
|
|
26
26
|
.describe('Detailed information about a command execution');
|
|
27
27
|
|
|
28
|
-
const ExecutionGetResponseSchema = APIResponseSchema(ExecutionInfoSchema);
|
|
28
|
+
export const ExecutionGetResponseSchema = APIResponseSchema(ExecutionInfoSchema);
|
|
29
29
|
|
|
30
|
-
const ExecutionListDataSchema = z
|
|
30
|
+
export const ExecutionListDataSchema = z
|
|
31
31
|
.object({
|
|
32
32
|
executions: z.array(ExecutionInfoSchema).describe('List of executions'),
|
|
33
33
|
})
|
|
34
34
|
.describe('List of executions for a sandbox');
|
|
35
35
|
|
|
36
|
-
const ExecutionListResponseSchema = APIResponseSchema(ExecutionListDataSchema);
|
|
36
|
+
export const ExecutionListResponseSchema = APIResponseSchema(ExecutionListDataSchema);
|
|
37
37
|
|
|
38
38
|
export interface ExecutionInfo {
|
|
39
39
|
executionId: string;
|
package/src/api/sandbox/get.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { APIClient, APIResponseSchema } from '../api';
|
|
3
|
-
import { throwSandboxError, API_VERSION } from './util';
|
|
4
1
|
import type {
|
|
5
2
|
SandboxInfo,
|
|
6
|
-
SandboxStatus,
|
|
7
3
|
SandboxRuntimeInfo,
|
|
8
4
|
SandboxSnapshotInfo,
|
|
5
|
+
SandboxStatus,
|
|
9
6
|
} from '@agentuity/core';
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
import { type APIClient, APIResponseSchema } from '../api';
|
|
9
|
+
import { API_VERSION, throwSandboxError } from './util';
|
|
10
10
|
|
|
11
|
-
const SandboxResourcesSchema = z
|
|
11
|
+
export const SandboxResourcesSchema = z
|
|
12
12
|
.object({
|
|
13
13
|
memory: z.string().optional().describe('Memory limit (e.g., "512Mi", "1Gi")'),
|
|
14
14
|
cpu: z.string().optional().describe('CPU limit in millicores (e.g., "500m", "1000m")'),
|
|
@@ -16,7 +16,7 @@ const SandboxResourcesSchema = z
|
|
|
16
16
|
})
|
|
17
17
|
.describe('Resource limits for the sandbox');
|
|
18
18
|
|
|
19
|
-
const SandboxUserInfoSchema = z
|
|
19
|
+
export const SandboxUserInfoSchema = z
|
|
20
20
|
.object({
|
|
21
21
|
id: z.string().describe('User ID'),
|
|
22
22
|
firstName: z.string().optional().describe("User's first name"),
|
|
@@ -24,28 +24,28 @@ const SandboxUserInfoSchema = z
|
|
|
24
24
|
})
|
|
25
25
|
.describe('User who created the sandbox');
|
|
26
26
|
|
|
27
|
-
const SandboxAgentInfoSchema = z
|
|
27
|
+
export const SandboxAgentInfoSchema = z
|
|
28
28
|
.object({
|
|
29
29
|
id: z.string().describe('Agent ID'),
|
|
30
30
|
name: z.string().describe('Agent name'),
|
|
31
31
|
})
|
|
32
32
|
.describe('Agent associated with the sandbox');
|
|
33
33
|
|
|
34
|
-
const SandboxProjectInfoSchema = z
|
|
34
|
+
export const SandboxProjectInfoSchema = z
|
|
35
35
|
.object({
|
|
36
36
|
id: z.string().describe('Project ID'),
|
|
37
37
|
name: z.string().describe('Project name'),
|
|
38
38
|
})
|
|
39
39
|
.describe('Project associated with the sandbox');
|
|
40
40
|
|
|
41
|
-
const SandboxOrgInfoSchema = z
|
|
41
|
+
export const SandboxOrgInfoSchema = z
|
|
42
42
|
.object({
|
|
43
43
|
id: z.string().describe('Organization ID'),
|
|
44
44
|
name: z.string().describe('Organization name'),
|
|
45
45
|
})
|
|
46
46
|
.describe('Organization associated with the sandbox');
|
|
47
47
|
|
|
48
|
-
const SandboxRuntimeInfoSchema = z
|
|
48
|
+
export const SandboxRuntimeInfoSchema = z
|
|
49
49
|
.object({
|
|
50
50
|
id: z.string().describe('Runtime ID'),
|
|
51
51
|
name: z.string().describe('Runtime name (e.g., "bun:1")'),
|
|
@@ -55,7 +55,7 @@ const SandboxRuntimeInfoSchema = z
|
|
|
55
55
|
})
|
|
56
56
|
.describe('Runtime information');
|
|
57
57
|
|
|
58
|
-
const SandboxSnapshotUserInfoSchema = z
|
|
58
|
+
export const SandboxSnapshotUserInfoSchema = z
|
|
59
59
|
.object({
|
|
60
60
|
id: z.string().describe('User ID'),
|
|
61
61
|
firstName: z.string().optional().describe("User's first name"),
|
|
@@ -63,7 +63,7 @@ const SandboxSnapshotUserInfoSchema = z
|
|
|
63
63
|
})
|
|
64
64
|
.describe('Snapshot user information');
|
|
65
65
|
|
|
66
|
-
const SandboxSnapshotOrgInfoSchema = z
|
|
66
|
+
export const SandboxSnapshotOrgInfoSchema = z
|
|
67
67
|
.object({
|
|
68
68
|
id: z.string().describe('Organization ID'),
|
|
69
69
|
name: z.string().describe('Organization name'),
|
|
@@ -71,7 +71,7 @@ const SandboxSnapshotOrgInfoSchema = z
|
|
|
71
71
|
})
|
|
72
72
|
.describe('Snapshot organization information');
|
|
73
73
|
|
|
74
|
-
const SandboxSnapshotInfoSchema = z
|
|
74
|
+
export const SandboxSnapshotInfoSchema = z
|
|
75
75
|
.union([
|
|
76
76
|
z
|
|
77
77
|
.object({
|
|
@@ -98,7 +98,7 @@ const SandboxSnapshotInfoSchema = z
|
|
|
98
98
|
])
|
|
99
99
|
.describe('Snapshot information (discriminated union)');
|
|
100
100
|
|
|
101
|
-
const SandboxInfoDataSchema = z
|
|
101
|
+
export const SandboxInfoDataSchema = z
|
|
102
102
|
.object({
|
|
103
103
|
sandboxId: z.string().describe('Unique identifier for the sandbox'),
|
|
104
104
|
identifier: z.string().optional().describe('Short identifier for DNS hostname'),
|
|
@@ -144,7 +144,7 @@ const SandboxInfoDataSchema = z
|
|
|
144
144
|
})
|
|
145
145
|
.describe('Detailed information about a sandbox');
|
|
146
146
|
|
|
147
|
-
const SandboxGetResponseSchema = APIResponseSchema(SandboxInfoDataSchema);
|
|
147
|
+
export const SandboxGetResponseSchema = APIResponseSchema(SandboxInfoDataSchema);
|
|
148
148
|
|
|
149
149
|
export interface SandboxGetParams {
|
|
150
150
|
sandboxId: string;
|
package/src/api/sandbox/index.ts
CHANGED
|
@@ -1,124 +1,186 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export
|
|
3
|
-
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export {
|
|
10
|
-
export type {
|
|
11
|
-
export {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
export type { CLISandboxInfo, CLISandboxListData, CLISandboxListOptions } from './cli-list';
|
|
2
|
+
export { cliSandboxList, SandboxListDataSchema, SandboxListResponseSchema } from './cli-list';
|
|
3
|
+
export type {
|
|
4
|
+
ExecuteOptions,
|
|
5
|
+
SandboxClientOptions,
|
|
6
|
+
SandboxClientRunIO,
|
|
7
|
+
SandboxInstance,
|
|
8
|
+
} from './client';
|
|
9
|
+
export { SandboxClient } from './client';
|
|
10
|
+
export type { SandboxCreateParams, SandboxCreateResponse } from './create';
|
|
11
|
+
export {
|
|
12
|
+
SandboxCreateDataSchema,
|
|
13
|
+
SandboxCreateRequestSchema,
|
|
14
|
+
SandboxCreateResponseSchema,
|
|
15
|
+
sandboxCreate,
|
|
16
|
+
} from './create';
|
|
16
17
|
export type { SandboxDestroyParams } from './destroy';
|
|
17
|
-
export {
|
|
18
|
-
export type {
|
|
19
|
-
export {
|
|
18
|
+
export { DestroyResponseSchema, sandboxDestroy } from './destroy';
|
|
19
|
+
export type { SandboxExecuteParams } from './execute';
|
|
20
|
+
export {
|
|
21
|
+
ExecuteDataSchema,
|
|
22
|
+
ExecuteRequestSchema,
|
|
23
|
+
ExecuteResponseSchema,
|
|
24
|
+
sandboxExecute,
|
|
25
|
+
} from './execute';
|
|
20
26
|
export type {
|
|
21
|
-
ExecutionInfo,
|
|
22
27
|
ExecutionGetParams,
|
|
28
|
+
ExecutionInfo,
|
|
23
29
|
ExecutionListParams,
|
|
24
30
|
ExecutionListResponse,
|
|
25
31
|
} from './execution';
|
|
26
32
|
export {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
throwSandboxError,
|
|
35
|
-
writeAndDrain,
|
|
36
|
-
} from './util';
|
|
37
|
-
export type { SandboxErrorCode, SandboxErrorContext } from './util';
|
|
38
|
-
export { SandboxClient } from './client';
|
|
33
|
+
ExecutionGetResponseSchema,
|
|
34
|
+
ExecutionInfoSchema,
|
|
35
|
+
ExecutionListDataSchema,
|
|
36
|
+
ExecutionListResponseSchema,
|
|
37
|
+
executionGet,
|
|
38
|
+
executionList,
|
|
39
|
+
} from './execution';
|
|
39
40
|
export type {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
ArchiveFormat,
|
|
42
|
+
DownloadArchiveParams,
|
|
43
|
+
FileInfo,
|
|
44
|
+
ListFilesParams,
|
|
45
|
+
ListFilesResult,
|
|
46
|
+
MkDirParams,
|
|
47
|
+
ReadFileParams,
|
|
48
|
+
RmDirParams,
|
|
49
|
+
RmFileParams,
|
|
50
|
+
SetEnvParams,
|
|
51
|
+
SetEnvResult,
|
|
52
|
+
UploadArchiveParams,
|
|
53
|
+
WriteFilesParams,
|
|
54
|
+
WriteFilesResult,
|
|
55
|
+
} from './files';
|
|
45
56
|
export {
|
|
46
|
-
|
|
47
|
-
sandboxReadFile,
|
|
48
|
-
sandboxMkDir,
|
|
49
|
-
sandboxRmDir,
|
|
50
|
-
sandboxRmFile,
|
|
51
|
-
sandboxListFiles,
|
|
52
|
-
sandboxDownloadArchive,
|
|
53
|
-
sandboxUploadArchive,
|
|
54
|
-
sandboxSetEnv,
|
|
57
|
+
FileInfoSchema,
|
|
55
58
|
FileToWriteSchema,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
WriteFilesResponseSchema,
|
|
59
|
+
ListFilesDataSchema,
|
|
60
|
+
ListFilesResponseSchema,
|
|
59
61
|
MkDirRequestSchema,
|
|
60
62
|
MkDirResponseSchema,
|
|
61
63
|
RmDirRequestSchema,
|
|
62
64
|
RmDirResponseSchema,
|
|
63
65
|
RmFileRequestSchema,
|
|
64
66
|
RmFileResponseSchema,
|
|
65
|
-
FileInfoSchema,
|
|
66
|
-
ListFilesDataSchema,
|
|
67
|
-
ListFilesResponseSchema,
|
|
68
|
-
UploadArchiveResponseSchema,
|
|
69
|
-
SetEnvRequestSchema,
|
|
70
67
|
SetEnvDataSchema,
|
|
68
|
+
SetEnvRequestSchema,
|
|
71
69
|
SetEnvResponseSchema,
|
|
70
|
+
sandboxDownloadArchive,
|
|
71
|
+
sandboxListFiles,
|
|
72
|
+
sandboxMkDir,
|
|
73
|
+
sandboxReadFile,
|
|
74
|
+
sandboxRmDir,
|
|
75
|
+
sandboxRmFile,
|
|
76
|
+
sandboxSetEnv,
|
|
77
|
+
sandboxUploadArchive,
|
|
78
|
+
sandboxWriteFiles,
|
|
79
|
+
UploadArchiveResponseSchema,
|
|
80
|
+
WriteFilesDataSchema,
|
|
81
|
+
WriteFilesRequestSchema,
|
|
82
|
+
WriteFilesResponseSchema,
|
|
72
83
|
} from './files';
|
|
73
|
-
export type {
|
|
74
|
-
WriteFilesParams,
|
|
75
|
-
WriteFilesResult,
|
|
76
|
-
ReadFileParams,
|
|
77
|
-
MkDirParams,
|
|
78
|
-
RmDirParams,
|
|
79
|
-
RmFileParams,
|
|
80
|
-
ListFilesParams,
|
|
81
|
-
ListFilesResult,
|
|
82
|
-
FileInfo,
|
|
83
|
-
ArchiveFormat,
|
|
84
|
-
DownloadArchiveParams,
|
|
85
|
-
UploadArchiveParams,
|
|
86
|
-
SetEnvParams,
|
|
87
|
-
SetEnvResult,
|
|
88
|
-
} from './files';
|
|
84
|
+
export type { SandboxGetParams } from './get';
|
|
89
85
|
export {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
86
|
+
SandboxAgentInfoSchema,
|
|
87
|
+
SandboxGetResponseSchema,
|
|
88
|
+
SandboxInfoDataSchema,
|
|
89
|
+
SandboxProjectInfoSchema,
|
|
90
|
+
SandboxResourcesSchema,
|
|
91
|
+
SandboxUserInfoSchema,
|
|
92
|
+
sandboxGet,
|
|
93
|
+
} from './get';
|
|
94
|
+
export type { SandboxListParams } from './list';
|
|
95
|
+
export {
|
|
96
|
+
ListSandboxesDataSchema,
|
|
97
|
+
ListSandboxesResponseSchema,
|
|
98
|
+
SandboxInfoSchema,
|
|
99
|
+
SandboxOrgInfoSchema,
|
|
100
|
+
SandboxRuntimeInfoSchema,
|
|
101
|
+
SandboxSnapshotInfoSchema,
|
|
102
|
+
SandboxSnapshotOrgInfoSchema,
|
|
103
|
+
SandboxSnapshotUserInfoSchema,
|
|
104
|
+
sandboxList,
|
|
105
|
+
} from './list';
|
|
106
|
+
export type { ResolvedSandboxInfo } from './resolve';
|
|
107
|
+
export {
|
|
108
|
+
SandboxResolveDataSchema,
|
|
109
|
+
SandboxResolveError,
|
|
110
|
+
SandboxResolveResponseSchema,
|
|
111
|
+
sandboxResolve,
|
|
112
|
+
} from './resolve';
|
|
113
|
+
export type { SandboxRunParams } from './run';
|
|
114
|
+
export { sandboxRun } from './run';
|
|
115
|
+
export type { RuntimeListParams } from './runtime';
|
|
116
|
+
export {
|
|
117
|
+
ListRuntimesDataSchema,
|
|
118
|
+
ListRuntimesResponseSchema,
|
|
119
|
+
RuntimeInfoSchema,
|
|
120
|
+
RuntimeRequirementsSchema,
|
|
121
|
+
runtimeList,
|
|
122
|
+
} from './runtime';
|
|
102
123
|
export type {
|
|
103
|
-
|
|
104
|
-
|
|
124
|
+
SnapshotBuildFinalizeParams,
|
|
125
|
+
SnapshotBuildGitInfo,
|
|
126
|
+
SnapshotBuildInitParams,
|
|
127
|
+
SnapshotBuildInitResponse,
|
|
105
128
|
SnapshotCreateParams,
|
|
106
|
-
SnapshotGetParams,
|
|
107
|
-
SnapshotListParams,
|
|
108
|
-
SnapshotListResponse,
|
|
109
129
|
SnapshotDeleteParams,
|
|
110
|
-
|
|
111
|
-
|
|
130
|
+
SnapshotFileInfo,
|
|
131
|
+
SnapshotGetParams,
|
|
132
|
+
SnapshotInfo,
|
|
112
133
|
SnapshotLineageEntry,
|
|
134
|
+
SnapshotLineageParams,
|
|
113
135
|
SnapshotLineageResponse,
|
|
136
|
+
SnapshotListParams,
|
|
137
|
+
SnapshotListResponse,
|
|
114
138
|
SnapshotPublicGetParams,
|
|
115
139
|
SnapshotPublicListParams,
|
|
116
|
-
|
|
117
|
-
SnapshotBuildInitParams,
|
|
118
|
-
SnapshotBuildInitResponse,
|
|
119
|
-
SnapshotBuildFinalizeParams,
|
|
140
|
+
SnapshotTagParams,
|
|
120
141
|
SnapshotUploadParams,
|
|
121
142
|
SnapshotUploadResponse,
|
|
122
143
|
} from './snapshot';
|
|
123
|
-
export {
|
|
144
|
+
export {
|
|
145
|
+
SnapshotBuildGitInfoSchema,
|
|
146
|
+
SnapshotBuildInitAPIResponseSchema,
|
|
147
|
+
SnapshotBuildInitResponseSchema,
|
|
148
|
+
SnapshotCreateResponseSchema,
|
|
149
|
+
SnapshotDeleteResponseSchema,
|
|
150
|
+
SnapshotFileInfoSchema,
|
|
151
|
+
SnapshotGetResponseSchema,
|
|
152
|
+
SnapshotInfoSchema,
|
|
153
|
+
SnapshotLineageDataSchema,
|
|
154
|
+
SnapshotLineageEntrySchema,
|
|
155
|
+
SnapshotLineageResponseSchema,
|
|
156
|
+
SnapshotListDataSchema,
|
|
157
|
+
SnapshotListResponseSchema,
|
|
158
|
+
SnapshotOrgInfoSchema,
|
|
159
|
+
SnapshotUploadResponseSchema,
|
|
160
|
+
SnapshotUserInfoSchema,
|
|
161
|
+
snapshotBuildFinalize,
|
|
162
|
+
snapshotBuildInit,
|
|
163
|
+
snapshotCreate,
|
|
164
|
+
snapshotDelete,
|
|
165
|
+
snapshotGet,
|
|
166
|
+
snapshotLineage,
|
|
167
|
+
snapshotList,
|
|
168
|
+
snapshotPublicGet,
|
|
169
|
+
snapshotPublicList,
|
|
170
|
+
snapshotTag,
|
|
171
|
+
snapshotUpload,
|
|
172
|
+
} from './snapshot';
|
|
124
173
|
export type { SnapshotBuildFile } from './snapshot-build';
|
|
174
|
+
export { SnapshotBuildFileSchema } from './snapshot-build';
|
|
175
|
+
export type { SandboxErrorCode, SandboxErrorContext } from './util';
|
|
176
|
+
export {
|
|
177
|
+
ExecutionCancelledError,
|
|
178
|
+
ExecutionNotFoundError,
|
|
179
|
+
ExecutionTimeoutError,
|
|
180
|
+
SandboxNotFoundError,
|
|
181
|
+
SandboxResponseError,
|
|
182
|
+
SandboxTerminatedError,
|
|
183
|
+
SnapshotNotFoundError,
|
|
184
|
+
throwSandboxError,
|
|
185
|
+
writeAndDrain,
|
|
186
|
+
} from './util';
|
package/src/api/sandbox/list.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { APIClient, APIResponseSchema } from '../api';
|
|
3
|
-
import { throwSandboxError, API_VERSION } from './util';
|
|
4
1
|
import type {
|
|
5
2
|
ListSandboxesParams,
|
|
6
3
|
ListSandboxesResponse,
|
|
7
|
-
SandboxStatus,
|
|
8
4
|
SandboxRuntimeInfo,
|
|
9
5
|
SandboxSnapshotInfo,
|
|
6
|
+
SandboxStatus,
|
|
10
7
|
} from '@agentuity/core';
|
|
8
|
+
import { z } from 'zod';
|
|
9
|
+
import { type APIClient, APIResponseSchema } from '../api';
|
|
10
|
+
import { API_VERSION, throwSandboxError } from './util';
|
|
11
11
|
|
|
12
|
-
const SandboxOrgInfoSchema = z
|
|
12
|
+
export const SandboxOrgInfoSchema = z
|
|
13
13
|
.object({
|
|
14
14
|
id: z.string().describe('Organization ID'),
|
|
15
15
|
name: z.string().describe('Organization name'),
|
|
16
16
|
})
|
|
17
17
|
.describe('Organization associated with the sandbox');
|
|
18
18
|
|
|
19
|
-
const SandboxRuntimeInfoSchema = z
|
|
19
|
+
export const SandboxRuntimeInfoSchema = z
|
|
20
20
|
.object({
|
|
21
21
|
id: z.string().describe('Runtime ID'),
|
|
22
22
|
name: z.string().describe('Runtime name (e.g., "bun:1")'),
|
|
@@ -26,7 +26,7 @@ const SandboxRuntimeInfoSchema = z
|
|
|
26
26
|
})
|
|
27
27
|
.describe('Runtime information');
|
|
28
28
|
|
|
29
|
-
const SandboxSnapshotUserInfoSchema = z
|
|
29
|
+
export const SandboxSnapshotUserInfoSchema = z
|
|
30
30
|
.object({
|
|
31
31
|
id: z.string().describe('User ID'),
|
|
32
32
|
firstName: z.string().optional().describe("User's first name"),
|
|
@@ -34,7 +34,7 @@ const SandboxSnapshotUserInfoSchema = z
|
|
|
34
34
|
})
|
|
35
35
|
.describe('Snapshot user information');
|
|
36
36
|
|
|
37
|
-
const SandboxSnapshotOrgInfoSchema = z
|
|
37
|
+
export const SandboxSnapshotOrgInfoSchema = z
|
|
38
38
|
.object({
|
|
39
39
|
id: z.string().describe('Organization ID'),
|
|
40
40
|
name: z.string().describe('Organization name'),
|
|
@@ -42,7 +42,7 @@ const SandboxSnapshotOrgInfoSchema = z
|
|
|
42
42
|
})
|
|
43
43
|
.describe('Snapshot organization information');
|
|
44
44
|
|
|
45
|
-
const SandboxSnapshotInfoSchema = z
|
|
45
|
+
export const SandboxSnapshotInfoSchema = z
|
|
46
46
|
.union([
|
|
47
47
|
z
|
|
48
48
|
.object({
|
|
@@ -69,7 +69,7 @@ const SandboxSnapshotInfoSchema = z
|
|
|
69
69
|
])
|
|
70
70
|
.describe('Snapshot information (discriminated union)');
|
|
71
71
|
|
|
72
|
-
const SandboxInfoSchema = z
|
|
72
|
+
export const SandboxInfoSchema = z
|
|
73
73
|
.object({
|
|
74
74
|
sandboxId: z.string().describe('Unique identifier for the sandbox'),
|
|
75
75
|
identifier: z.string().optional().describe('Short identifier for DNS hostname'),
|
|
@@ -96,14 +96,14 @@ const SandboxInfoSchema = z
|
|
|
96
96
|
})
|
|
97
97
|
.describe('Summary information about a sandbox');
|
|
98
98
|
|
|
99
|
-
const ListSandboxesDataSchema = z
|
|
99
|
+
export const ListSandboxesDataSchema = z
|
|
100
100
|
.object({
|
|
101
101
|
sandboxes: z.array(SandboxInfoSchema).describe('List of sandbox entries'),
|
|
102
102
|
total: z.number().describe('Total number of sandboxes matching the query'),
|
|
103
103
|
})
|
|
104
104
|
.describe('Paginated list of sandboxes');
|
|
105
105
|
|
|
106
|
-
const ListSandboxesResponseSchema = APIResponseSchema(ListSandboxesDataSchema);
|
|
106
|
+
export const ListSandboxesResponseSchema = APIResponseSchema(ListSandboxesDataSchema);
|
|
107
107
|
|
|
108
108
|
export interface SandboxListParams extends ListSandboxesParams {
|
|
109
109
|
orgId?: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
1
|
import { StructuredError } from '@agentuity/core';
|
|
3
|
-
import {
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { type APIClient, APIResponseSchemaOptionalData } from '../api';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Data schema for sandbox resolve endpoint
|
|
7
7
|
*/
|
|
8
|
-
const SandboxResolveDataSchema = z.object({
|
|
8
|
+
export const SandboxResolveDataSchema = z.object({
|
|
9
9
|
id: z.string(),
|
|
10
10
|
name: z.string().nullable(),
|
|
11
11
|
region: z.string(),
|
|
@@ -17,7 +17,7 @@ const SandboxResolveDataSchema = z.object({
|
|
|
17
17
|
/**
|
|
18
18
|
* Response schema for sandbox resolve endpoint using standardized discriminated union
|
|
19
19
|
*/
|
|
20
|
-
const SandboxResolveResponseSchema = APIResponseSchemaOptionalData(SandboxResolveDataSchema);
|
|
20
|
+
export const SandboxResolveResponseSchema = APIResponseSchemaOptionalData(SandboxResolveDataSchema);
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Resolved sandbox info returned from the CLI API
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { APIClient, APIResponseSchema } from '../api';
|
|
3
|
-
import { throwSandboxError, API_VERSION } from './util';
|
|
4
1
|
import type { ListRuntimesParams, ListRuntimesResponse, SandboxRuntime } from '@agentuity/core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { type APIClient, APIResponseSchema } from '../api';
|
|
4
|
+
import { API_VERSION, throwSandboxError } from './util';
|
|
5
5
|
|
|
6
|
-
const RuntimeRequirementsSchema = z
|
|
6
|
+
export const RuntimeRequirementsSchema = z
|
|
7
7
|
.object({
|
|
8
8
|
memory: z.string().optional().describe('Memory requirement (e.g., "1Gi")'),
|
|
9
9
|
cpu: z.string().optional().describe('CPU requirement (e.g., "1")'),
|
|
@@ -12,7 +12,7 @@ const RuntimeRequirementsSchema = z
|
|
|
12
12
|
})
|
|
13
13
|
.describe('Runtime resource requirements');
|
|
14
14
|
|
|
15
|
-
const RuntimeInfoSchema = z
|
|
15
|
+
export const RuntimeInfoSchema = z
|
|
16
16
|
.object({
|
|
17
17
|
id: z.string().describe('Unique runtime identifier'),
|
|
18
18
|
name: z.string().describe('Runtime name (e.g., "bun:1", "python:3.14")'),
|
|
@@ -26,14 +26,14 @@ const RuntimeInfoSchema = z
|
|
|
26
26
|
})
|
|
27
27
|
.describe('Information about a sandbox runtime');
|
|
28
28
|
|
|
29
|
-
const ListRuntimesDataSchema = z
|
|
29
|
+
export const ListRuntimesDataSchema = z
|
|
30
30
|
.object({
|
|
31
31
|
runtimes: z.array(RuntimeInfoSchema).describe('List of runtime entries'),
|
|
32
32
|
total: z.number().describe('Total number of runtimes'),
|
|
33
33
|
})
|
|
34
34
|
.describe('List of sandbox runtimes');
|
|
35
35
|
|
|
36
|
-
const ListRuntimesResponseSchema = APIResponseSchema(ListRuntimesDataSchema);
|
|
36
|
+
export const ListRuntimesResponseSchema = APIResponseSchema(ListRuntimesDataSchema);
|
|
37
37
|
|
|
38
38
|
export interface RuntimeListParams extends ListRuntimesParams {
|
|
39
39
|
orgId?: string;
|