@finalai/final-agent-provider 0.10.1 → 0.11.0
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/HOSTING.md +334 -245
- package/README.md +126 -40
- package/WORKSPACE-EGRESS.md +11 -11
- package/dist/modules/catalog.d.mts +9 -0
- package/dist/modules/catalog.mjs +21 -0
- package/dist/modules/catalog.mjs.map +7 -0
- package/dist/modules/harnesses/acp-agent.d.mts +4 -0
- package/dist/modules/harnesses/acp-agent.mjs +35 -0
- package/dist/modules/harnesses/acp-agent.mjs.map +7 -0
- package/dist/modules/harnesses/adapters.d.mts +7 -0
- package/dist/modules/harnesses/adapters.mjs +74 -0
- package/dist/modules/harnesses/adapters.mjs.map +7 -0
- package/dist/modules/harnesses/claude-code.d.mts +14 -0
- package/dist/modules/harnesses/claude-code.mjs +79 -0
- package/dist/modules/harnesses/claude-code.mjs.map +7 -0
- package/dist/modules/harnesses/codex.d.mts +12 -0
- package/dist/modules/harnesses/codex.mjs +90 -0
- package/dist/modules/harnesses/codex.mjs.map +7 -0
- package/dist/modules/harnesses/config-fields.d.mts +98 -57
- package/dist/modules/harnesses/config-fields.mjs +58 -35
- package/dist/modules/harnesses/config-fields.mjs.map +3 -3
- package/dist/modules/harnesses/definitions.d.mts +3 -0
- package/dist/modules/harnesses/definitions.mjs +21 -0
- package/dist/modules/harnesses/definitions.mjs.map +7 -0
- package/dist/modules/harnesses/fidelity.d.mts +1 -1
- package/dist/modules/harnesses/fidelity.mjs +17 -14
- package/dist/modules/harnesses/fidelity.mjs.map +2 -2
- package/dist/modules/harnesses/final.d.mts +12 -0
- package/dist/modules/harnesses/final.mjs +70 -0
- package/dist/modules/harnesses/final.mjs.map +7 -0
- package/dist/modules/harnesses/index.d.mts +13 -12
- package/dist/modules/harnesses/index.mjs +86 -45
- package/dist/modules/harnesses/index.mjs.map +3 -3
- package/dist/modules/harnesses/names.d.mts +43 -0
- package/dist/modules/harnesses/names.mjs +59 -0
- package/dist/modules/harnesses/names.mjs.map +7 -0
- package/dist/modules/harnesses/nanocode-claude.d.mts +18 -0
- package/dist/modules/harnesses/nanocode-claude.mjs +101 -0
- package/dist/modules/harnesses/nanocode-claude.mjs.map +7 -0
- package/dist/modules/harnesses/nanocode-codex.d.mts +13 -0
- package/dist/modules/harnesses/nanocode-codex.mjs +64 -0
- package/dist/modules/harnesses/nanocode-codex.mjs.map +7 -0
- package/dist/modules/harnesses/pi.d.mts +12 -0
- package/dist/modules/harnesses/pi.mjs +71 -0
- package/dist/modules/harnesses/pi.mjs.map +7 -0
- package/dist/modules/integrations.d.mts +9 -0
- package/dist/modules/integrations.mjs +29 -0
- package/dist/modules/integrations.mjs.map +7 -0
- package/dist/modules/provider/general.bundle.d.mts +1 -0
- package/dist/modules/provider/general.bundle.mjs +5 -0
- package/dist/modules/provider/general.bundle.mjs.map +7 -0
- package/dist/modules/provider/general.d.mts +11 -0
- package/dist/modules/provider/general.mjs +130 -0
- package/dist/modules/provider/general.mjs.map +7 -0
- package/dist/modules/provider/index.d.mts +3 -0
- package/dist/modules/provider/index.mjs +13 -0
- package/dist/modules/provider/index.mjs.map +7 -0
- package/dist/modules/sandboxes/access.d.mts +34 -0
- package/dist/modules/sandboxes/access.mjs +15 -0
- package/dist/modules/sandboxes/access.mjs.map +7 -0
- package/dist/modules/sandboxes/computer.d.mts +24 -51
- package/dist/modules/sandboxes/computer.mjs +523 -888
- package/dist/modules/sandboxes/computer.mjs.map +3 -3
- package/dist/modules/sandboxes/computers-api.d.mts +3 -2
- package/dist/modules/sandboxes/computers-api.mjs +2 -4
- package/dist/modules/sandboxes/computers-api.mjs.map +2 -2
- package/dist/modules/sandboxes/device-api.d.mts +4 -3
- package/dist/modules/sandboxes/device-api.mjs +2 -4
- package/dist/modules/sandboxes/device-api.mjs.map +2 -2
- package/dist/modules/sandboxes/device.d.mts +6 -6
- package/dist/modules/sandboxes/device.mjs +126 -121
- package/dist/modules/sandboxes/device.mjs.map +3 -3
- package/dist/modules/sandboxes/egress.d.mts +10 -9
- package/dist/modules/sandboxes/egress.mjs +73 -56
- package/dist/modules/sandboxes/egress.mjs.map +2 -2
- package/dist/modules/sandboxes/environment.d.mts +35 -269
- package/dist/modules/sandboxes/environment.mjs +27 -104
- package/dist/modules/sandboxes/environment.mjs.map +3 -3
- package/dist/modules/sandboxes/index.d.mts +9 -69
- package/dist/modules/sandboxes/index.mjs +35 -95
- package/dist/modules/sandboxes/index.mjs.map +3 -3
- package/dist/modules/sandboxes/local.d.mts +28 -0
- package/dist/modules/sandboxes/local.mjs +499 -0
- package/dist/modules/sandboxes/local.mjs.map +7 -0
- package/dist/modules/sandboxes/session.d.mts +0 -3
- package/dist/modules/sandboxes/session.mjs +2 -22
- package/dist/modules/sandboxes/session.mjs.map +2 -2
- package/dist/modules/sandboxes/testing/fake-machine.mjs +0 -28
- package/dist/modules/sandboxes/testing/fake-machine.mjs.map +2 -2
- package/package.json +76 -104
- package/dist/modules/connections.d.mts +0 -11
- package/dist/modules/connections.mjs +0 -16
- package/dist/modules/connections.mjs.map +0 -7
- package/dist/modules/harnesses/acp-describe.d.mts +0 -20
- package/dist/modules/harnesses/acp-describe.mjs +0 -110
- package/dist/modules/harnesses/acp-describe.mjs.map +0 -7
- package/dist/modules/harnesses/local-stdio.d.mts +0 -47
- package/dist/modules/harnesses/local-stdio.mjs +0 -41
- package/dist/modules/harnesses/local-stdio.mjs.map +0 -7
- package/dist/modules/harnesses/remote-acp.d.mts +0 -76
- package/dist/modules/harnesses/remote-acp.mjs +0 -83
- package/dist/modules/harnesses/remote-acp.mjs.map +0 -7
- package/dist/modules/harnesses/remote-claude-code.d.mts +0 -88
- package/dist/modules/harnesses/remote-claude-code.mjs +0 -113
- package/dist/modules/harnesses/remote-claude-code.mjs.map +0 -7
- package/dist/modules/harnesses/remote-client-tls.d.mts +0 -35
- package/dist/modules/harnesses/remote-client-tls.mjs +0 -37
- package/dist/modules/harnesses/remote-client-tls.mjs.map +0 -7
- package/dist/modules/harnesses/remote-codex.d.mts +0 -98
- package/dist/modules/harnesses/remote-codex.mjs +0 -128
- package/dist/modules/harnesses/remote-codex.mjs.map +0 -7
- package/dist/modules/harnesses/remote-pi.d.mts +0 -78
- package/dist/modules/harnesses/remote-pi.mjs +0 -104
- package/dist/modules/harnesses/remote-pi.mjs.map +0 -7
- package/dist/modules/harnesses/remote-url.d.mts +0 -5
- package/dist/modules/harnesses/remote-url.mjs +0 -19
- package/dist/modules/harnesses/remote-url.mjs.map +0 -7
- package/dist/modules/harnesses/serverless-final.d.mts +0 -63
- package/dist/modules/harnesses/serverless-final.mjs +0 -88
- package/dist/modules/harnesses/serverless-final.mjs.map +0 -7
- package/dist/modules/harnesses/serverless-nanocode-claude.d.mts +0 -64
- package/dist/modules/harnesses/serverless-nanocode-claude.mjs +0 -105
- package/dist/modules/harnesses/serverless-nanocode-claude.mjs.map +0 -7
- package/dist/modules/harnesses/serverless-nanocode-codex.d.mts +0 -66
- package/dist/modules/harnesses/serverless-nanocode-codex.mjs +0 -113
- package/dist/modules/harnesses/serverless-nanocode-codex.mjs.map +0 -7
- package/dist/modules/harnesses/serverless-pi.d.mts +0 -64
- package/dist/modules/harnesses/serverless-pi.mjs +0 -98
- package/dist/modules/harnesses/serverless-pi.mjs.map +0 -7
- package/dist/modules/runtime/index.d.mts +0 -7
- package/dist/modules/runtime/index.mjs +0 -18
- package/dist/modules/runtime/index.mjs.map +0 -7
- package/dist/modules/runtime/local-stdio.d.mts +0 -10
- package/dist/modules/runtime/local-stdio.mjs +0 -106
- package/dist/modules/runtime/local-stdio.mjs.map +0 -7
- package/dist/modules/runtime/remote-acp.d.mts +0 -16
- package/dist/modules/runtime/remote-acp.mjs +0 -152
- package/dist/modules/runtime/remote-acp.mjs.map +0 -7
- package/dist/modules/runtime/remote-claude-code.d.mts +0 -5
- package/dist/modules/runtime/remote-claude-code.mjs +0 -47
- package/dist/modules/runtime/remote-claude-code.mjs.map +0 -7
- package/dist/modules/runtime/remote-codex.d.mts +0 -5
- package/dist/modules/runtime/remote-codex.mjs +0 -47
- package/dist/modules/runtime/remote-codex.mjs.map +0 -7
- package/dist/modules/runtime/remote-host.d.mts +0 -127
- package/dist/modules/runtime/remote-host.mjs +0 -387
- package/dist/modules/runtime/remote-host.mjs.map +0 -7
- package/dist/modules/runtime/remote-pi.d.mts +0 -5
- package/dist/modules/runtime/remote-pi.mjs +0 -44
- package/dist/modules/runtime/remote-pi.mjs.map +0 -7
- package/dist/modules/sandboxes/guide.d.mts +0 -35
- package/dist/modules/sandboxes/guide.mjs +0 -119
- package/dist/modules/sandboxes/guide.mjs.map +0 -7
- package/dist/modules/sandboxes/workspace-setup.d.mts +0 -42
- package/dist/modules/sandboxes/workspace-setup.mjs +0 -242
- package/dist/modules/sandboxes/workspace-setup.mjs.map +0 -7
- package/dist/modules/testing/harness.d.mts +0 -9
- package/dist/modules/testing/harness.mjs +0 -123
- package/dist/modules/testing/harness.mjs.map +0 -7
|
@@ -1,284 +1,50 @@
|
|
|
1
|
-
import { NetworkPolicy, SandboxAccess, SandboxAttach } from '@finalai/agent-provider';
|
|
2
1
|
import * as z from 'zod';
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
2
|
+
export declare const COMPUTER_PROVIDER = "computer";
|
|
3
|
+
export declare const DEVICE_PROVIDER = "device";
|
|
5
4
|
export declare const DEVICE_API_ACTING_USER_HEADER = "Final-Acting-User-Id";
|
|
6
|
-
export declare
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Ephemeral = "ephemeral"
|
|
10
|
-
}
|
|
11
|
-
export declare enum TemplateWhenMissing {
|
|
12
|
-
Skip = "skip",
|
|
13
|
-
Fail = "fail"
|
|
14
|
-
}
|
|
15
|
-
export declare const repositoryAliasSchema: z.ZodString;
|
|
16
|
-
export declare const computerRepositorySchema: z.ZodObject<{
|
|
17
|
-
alias: z.ZodString;
|
|
18
|
-
repository: z.ZodString;
|
|
19
|
-
ref: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
20
|
-
}, z.core.$strip>;
|
|
21
|
-
export declare const computerNetworkPolicySchema: z.ZodUnion<readonly [z.ZodEnum<typeof NetworkPolicy>, z.ZodObject<{
|
|
22
|
-
mode: z.ZodEnum<typeof NetworkPolicy>;
|
|
23
|
-
allow: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
24
|
-
}, z.core.$strip>]>;
|
|
25
|
-
export declare const computerParametersSchema: z.ZodObject<{
|
|
26
|
-
repositories: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
27
|
-
alias: z.ZodString;
|
|
28
|
-
repository: z.ZodString;
|
|
29
|
-
ref: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
30
|
-
}, z.core.$strip>>>;
|
|
31
|
-
variables: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
32
|
-
workspace: z.ZodOptional<z.ZodEnum<typeof ComputerWorkspacePolicy>>;
|
|
33
|
-
networkPolicy: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<typeof NetworkPolicy>, z.ZodObject<{
|
|
34
|
-
mode: z.ZodEnum<typeof NetworkPolicy>;
|
|
35
|
-
allow: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
36
|
-
}, z.core.$strip>]>>;
|
|
37
|
-
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
38
|
-
}, z.core.$strip>;
|
|
39
|
-
export declare const computerTemplateSchema: z.ZodObject<{
|
|
40
|
-
version: z.ZodDefault<z.ZodLiteral<2>>;
|
|
41
|
-
build: z.ZodPrefault<z.ZodObject<{
|
|
42
|
-
timeoutMinutes: z.ZodDefault<z.ZodNumber>;
|
|
43
|
-
steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
44
|
-
run: z.ZodString;
|
|
45
|
-
cwd: z.ZodDefault<z.ZodString>;
|
|
46
|
-
whenMissing: z.ZodDefault<z.ZodNullable<z.ZodEnum<typeof TemplateWhenMissing>>>;
|
|
47
|
-
timeoutMinutes: z.ZodDefault<z.ZodNumber>;
|
|
48
|
-
required: z.ZodDefault<z.ZodBoolean>;
|
|
49
|
-
}, z.core.$strip>>>;
|
|
50
|
-
verify: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
51
|
-
run: z.ZodString;
|
|
52
|
-
cwd: z.ZodDefault<z.ZodString>;
|
|
53
|
-
whenMissing: z.ZodDefault<z.ZodNullable<z.ZodEnum<typeof TemplateWhenMissing>>>;
|
|
54
|
-
timeoutMinutes: z.ZodDefault<z.ZodNumber>;
|
|
55
|
-
required: z.ZodDefault<z.ZodBoolean>;
|
|
56
|
-
}, z.core.$strip>>>;
|
|
57
|
-
}, z.core.$strip>>;
|
|
58
|
-
workspace: z.ZodPrefault<z.ZodObject<{
|
|
59
|
-
setup: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
60
|
-
run: z.ZodString;
|
|
61
|
-
cwd: z.ZodDefault<z.ZodString>;
|
|
62
|
-
whenMissing: z.ZodDefault<z.ZodNullable<z.ZodEnum<typeof TemplateWhenMissing>>>;
|
|
63
|
-
timeoutMinutes: z.ZodDefault<z.ZodNumber>;
|
|
64
|
-
required: z.ZodDefault<z.ZodBoolean>;
|
|
65
|
-
}, z.core.$strip>>>;
|
|
66
|
-
}, z.core.$strip>>;
|
|
67
|
-
services: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
5
|
+
export declare const DEFAULT_COMPUTER_IMAGE = "lineage:sandbox";
|
|
6
|
+
export declare const computerBuildSchema: z.ZodObject<{
|
|
7
|
+
steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
68
8
|
run: z.ZodString;
|
|
69
|
-
cwd: z.ZodDefault<z.ZodString>;
|
|
70
|
-
whenMissing: z.ZodDefault<z.ZodNullable<z.ZodEnum<typeof TemplateWhenMissing>>>;
|
|
71
9
|
timeoutMinutes: z.ZodDefault<z.ZodNumber>;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
ready: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
75
|
-
url: z.ZodString;
|
|
76
|
-
timeoutSeconds: z.ZodDefault<z.ZodNumber>;
|
|
77
|
-
}, z.core.$strip>>>;
|
|
78
|
-
}, z.core.$strip>>>;
|
|
79
|
-
commands: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
10
|
+
}, z.core.$strict>>>;
|
|
11
|
+
verify: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
80
12
|
run: z.ZodString;
|
|
81
|
-
description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
82
|
-
cwd: z.ZodDefault<z.ZodString>;
|
|
83
|
-
whenMissing: z.ZodDefault<z.ZodNullable<z.ZodEnum<typeof TemplateWhenMissing>>>;
|
|
84
13
|
timeoutMinutes: z.ZodDefault<z.ZodNumber>;
|
|
85
|
-
}, z.core.$
|
|
86
|
-
}, z.core.$
|
|
87
|
-
export declare const
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
whenMissing: z.ZodDefault<z.ZodNullable<z.ZodEnum<typeof TemplateWhenMissing>>>;
|
|
97
|
-
timeoutMinutes: z.ZodDefault<z.ZodNumber>;
|
|
98
|
-
required: z.ZodDefault<z.ZodBoolean>;
|
|
99
|
-
}, z.core.$strip>>>;
|
|
100
|
-
verify: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
101
|
-
run: z.ZodString;
|
|
102
|
-
cwd: z.ZodDefault<z.ZodString>;
|
|
103
|
-
whenMissing: z.ZodDefault<z.ZodNullable<z.ZodEnum<typeof TemplateWhenMissing>>>;
|
|
104
|
-
timeoutMinutes: z.ZodDefault<z.ZodNumber>;
|
|
105
|
-
required: z.ZodDefault<z.ZodBoolean>;
|
|
106
|
-
}, z.core.$strip>>>;
|
|
107
|
-
}, z.core.$strip>>;
|
|
108
|
-
workspace: z.ZodPrefault<z.ZodObject<{
|
|
109
|
-
setup: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
110
|
-
run: z.ZodString;
|
|
111
|
-
cwd: z.ZodDefault<z.ZodString>;
|
|
112
|
-
whenMissing: z.ZodDefault<z.ZodNullable<z.ZodEnum<typeof TemplateWhenMissing>>>;
|
|
113
|
-
timeoutMinutes: z.ZodDefault<z.ZodNumber>;
|
|
114
|
-
required: z.ZodDefault<z.ZodBoolean>;
|
|
115
|
-
}, z.core.$strip>>>;
|
|
116
|
-
}, z.core.$strip>>;
|
|
117
|
-
services: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
14
|
+
}, z.core.$strict>>>;
|
|
15
|
+
}, z.core.$strict>;
|
|
16
|
+
export declare const computerMachineSchema: z.ZodObject<{
|
|
17
|
+
vcpu: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
memoryMb: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
diskGb: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
}, z.core.$strict>;
|
|
21
|
+
export declare const computerEnvironmentSchema: z.ZodObject<{
|
|
22
|
+
image: z.ZodOptional<z.ZodString>;
|
|
23
|
+
build: z.ZodOptional<z.ZodObject<{
|
|
24
|
+
steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
118
25
|
run: z.ZodString;
|
|
119
|
-
cwd: z.ZodDefault<z.ZodString>;
|
|
120
|
-
whenMissing: z.ZodDefault<z.ZodNullable<z.ZodEnum<typeof TemplateWhenMissing>>>;
|
|
121
26
|
timeoutMinutes: z.ZodDefault<z.ZodNumber>;
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
ready: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
125
|
-
url: z.ZodString;
|
|
126
|
-
timeoutSeconds: z.ZodDefault<z.ZodNumber>;
|
|
127
|
-
}, z.core.$strip>>>;
|
|
128
|
-
}, z.core.$strip>>>;
|
|
129
|
-
commands: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
27
|
+
}, z.core.$strict>>>;
|
|
28
|
+
verify: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
130
29
|
run: z.ZodString;
|
|
131
|
-
description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
132
|
-
cwd: z.ZodDefault<z.ZodString>;
|
|
133
|
-
whenMissing: z.ZodDefault<z.ZodNullable<z.ZodEnum<typeof TemplateWhenMissing>>>;
|
|
134
30
|
timeoutMinutes: z.ZodDefault<z.ZodNumber>;
|
|
135
|
-
}, z.core.$
|
|
136
|
-
}, z.core.$
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}, z.core.$
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
export declare const computerEnvironmentSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
145
|
-
guide: z.ZodObject<{
|
|
146
|
-
ref: z.ZodString;
|
|
147
|
-
version: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"latest">, z.ZodNumber]>>;
|
|
148
|
-
}, z.core.$strict>;
|
|
149
|
-
parameters: z.ZodPrefault<z.ZodObject<{
|
|
150
|
-
repositories: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
151
|
-
alias: z.ZodString;
|
|
152
|
-
repository: z.ZodString;
|
|
153
|
-
ref: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
154
|
-
}, z.core.$strip>>>;
|
|
155
|
-
variables: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
156
|
-
workspace: z.ZodOptional<z.ZodEnum<typeof ComputerWorkspacePolicy>>;
|
|
157
|
-
networkPolicy: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<typeof NetworkPolicy>, z.ZodObject<{
|
|
158
|
-
mode: z.ZodEnum<typeof NetworkPolicy>;
|
|
159
|
-
allow: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
160
|
-
}, z.core.$strip>]>>;
|
|
161
|
-
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
162
|
-
}, z.core.$strip>>;
|
|
163
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
164
|
-
inline: z.ZodObject<{
|
|
165
|
-
image: z.ZodString;
|
|
166
|
-
template: z.ZodPrefault<z.ZodObject<{
|
|
167
|
-
version: z.ZodDefault<z.ZodLiteral<2>>;
|
|
168
|
-
build: z.ZodPrefault<z.ZodObject<{
|
|
169
|
-
timeoutMinutes: z.ZodDefault<z.ZodNumber>;
|
|
170
|
-
steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
171
|
-
run: z.ZodString;
|
|
172
|
-
cwd: z.ZodDefault<z.ZodString>;
|
|
173
|
-
whenMissing: z.ZodDefault<z.ZodNullable<z.ZodEnum<typeof TemplateWhenMissing>>>;
|
|
174
|
-
timeoutMinutes: z.ZodDefault<z.ZodNumber>;
|
|
175
|
-
required: z.ZodDefault<z.ZodBoolean>;
|
|
176
|
-
}, z.core.$strip>>>;
|
|
177
|
-
verify: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
178
|
-
run: z.ZodString;
|
|
179
|
-
cwd: z.ZodDefault<z.ZodString>;
|
|
180
|
-
whenMissing: z.ZodDefault<z.ZodNullable<z.ZodEnum<typeof TemplateWhenMissing>>>;
|
|
181
|
-
timeoutMinutes: z.ZodDefault<z.ZodNumber>;
|
|
182
|
-
required: z.ZodDefault<z.ZodBoolean>;
|
|
183
|
-
}, z.core.$strip>>>;
|
|
184
|
-
}, z.core.$strip>>;
|
|
185
|
-
workspace: z.ZodPrefault<z.ZodObject<{
|
|
186
|
-
setup: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
187
|
-
run: z.ZodString;
|
|
188
|
-
cwd: z.ZodDefault<z.ZodString>;
|
|
189
|
-
whenMissing: z.ZodDefault<z.ZodNullable<z.ZodEnum<typeof TemplateWhenMissing>>>;
|
|
190
|
-
timeoutMinutes: z.ZodDefault<z.ZodNumber>;
|
|
191
|
-
required: z.ZodDefault<z.ZodBoolean>;
|
|
192
|
-
}, z.core.$strip>>>;
|
|
193
|
-
}, z.core.$strip>>;
|
|
194
|
-
services: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
195
|
-
run: z.ZodString;
|
|
196
|
-
cwd: z.ZodDefault<z.ZodString>;
|
|
197
|
-
whenMissing: z.ZodDefault<z.ZodNullable<z.ZodEnum<typeof TemplateWhenMissing>>>;
|
|
198
|
-
timeoutMinutes: z.ZodDefault<z.ZodNumber>;
|
|
199
|
-
required: z.ZodDefault<z.ZodBoolean>;
|
|
200
|
-
name: z.ZodString;
|
|
201
|
-
ready: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
202
|
-
url: z.ZodString;
|
|
203
|
-
timeoutSeconds: z.ZodDefault<z.ZodNumber>;
|
|
204
|
-
}, z.core.$strip>>>;
|
|
205
|
-
}, z.core.$strip>>>;
|
|
206
|
-
commands: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
207
|
-
run: z.ZodString;
|
|
208
|
-
description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
209
|
-
cwd: z.ZodDefault<z.ZodString>;
|
|
210
|
-
whenMissing: z.ZodDefault<z.ZodNullable<z.ZodEnum<typeof TemplateWhenMissing>>>;
|
|
211
|
-
timeoutMinutes: z.ZodDefault<z.ZodNumber>;
|
|
212
|
-
}, z.core.$strip>>>;
|
|
213
|
-
}, z.core.$strip>>;
|
|
214
|
-
repositories: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
215
|
-
alias: z.ZodString;
|
|
216
|
-
repository: z.ZodString;
|
|
217
|
-
ref: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
218
|
-
}, z.core.$strip>>>;
|
|
219
|
-
variables: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
220
|
-
}, z.core.$strip>;
|
|
221
|
-
parameters: z.ZodPrefault<z.ZodObject<{
|
|
222
|
-
repositories: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
223
|
-
alias: z.ZodString;
|
|
224
|
-
repository: z.ZodString;
|
|
225
|
-
ref: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
226
|
-
}, z.core.$strip>>>;
|
|
227
|
-
variables: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
228
|
-
workspace: z.ZodOptional<z.ZodEnum<typeof ComputerWorkspacePolicy>>;
|
|
229
|
-
networkPolicy: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<typeof NetworkPolicy>, z.ZodObject<{
|
|
230
|
-
mode: z.ZodEnum<typeof NetworkPolicy>;
|
|
231
|
-
allow: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
232
|
-
}, z.core.$strip>]>>;
|
|
233
|
-
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
234
|
-
}, z.core.$strip>>;
|
|
235
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
236
|
-
image: z.ZodString;
|
|
237
|
-
parameters: z.ZodPrefault<z.ZodObject<{
|
|
238
|
-
repositories: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
239
|
-
alias: z.ZodString;
|
|
240
|
-
repository: z.ZodString;
|
|
241
|
-
ref: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
242
|
-
}, z.core.$strip>>>;
|
|
243
|
-
variables: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
244
|
-
workspace: z.ZodOptional<z.ZodEnum<typeof ComputerWorkspacePolicy>>;
|
|
245
|
-
networkPolicy: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<typeof NetworkPolicy>, z.ZodObject<{
|
|
246
|
-
mode: z.ZodEnum<typeof NetworkPolicy>;
|
|
247
|
-
allow: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
248
|
-
}, z.core.$strip>]>>;
|
|
249
|
-
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
250
|
-
}, z.core.$strip>>;
|
|
251
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
252
|
-
parameters: z.ZodPrefault<z.ZodObject<{
|
|
253
|
-
repositories: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
254
|
-
alias: z.ZodString;
|
|
255
|
-
repository: z.ZodString;
|
|
256
|
-
ref: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
257
|
-
}, z.core.$strip>>>;
|
|
258
|
-
variables: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
259
|
-
workspace: z.ZodOptional<z.ZodEnum<typeof ComputerWorkspacePolicy>>;
|
|
260
|
-
networkPolicy: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<typeof NetworkPolicy>, z.ZodObject<{
|
|
261
|
-
mode: z.ZodEnum<typeof NetworkPolicy>;
|
|
262
|
-
allow: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
263
|
-
}, z.core.$strip>]>>;
|
|
264
|
-
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
265
|
-
}, z.core.$strip>>;
|
|
266
|
-
}, z.core.$strict>]>;
|
|
267
|
-
export declare const computerOpenOptionsSchema: z.ZodObject<{
|
|
268
|
-
access: z.ZodDefault<z.ZodEnum<typeof SandboxAccess>>;
|
|
269
|
-
attach: z.ZodOptional<z.ZodEnum<typeof SandboxAttach>>;
|
|
31
|
+
}, z.core.$strict>>>;
|
|
32
|
+
}, z.core.$strict>>;
|
|
33
|
+
machine: z.ZodOptional<z.ZodObject<{
|
|
34
|
+
vcpu: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
memoryMb: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
diskGb: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
}, z.core.$strict>>;
|
|
38
|
+
region: z.ZodOptional<z.ZodString>;
|
|
39
|
+
idleTimeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
270
40
|
}, z.core.$strict>;
|
|
271
41
|
export declare const deviceEnvironmentSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
272
42
|
deviceId: z.ZodString;
|
|
273
43
|
}, z.core.$strict>, z.ZodObject<{
|
|
274
44
|
pairing: z.ZodString;
|
|
275
|
-
}, z.core.$strict
|
|
276
|
-
export type
|
|
277
|
-
export type
|
|
278
|
-
export type
|
|
279
|
-
export type
|
|
280
|
-
export type
|
|
281
|
-
export type ComputerEnvironmentOptions = z.infer<typeof computerEnvironmentSchema>;
|
|
282
|
-
export type ComputerOpenOptionsIface = z.infer<typeof computerOpenOptionsSchema>;
|
|
283
|
-
export type ComputerNetworkPolicyOption = z.infer<typeof computerNetworkPolicySchema>;
|
|
284
|
-
export type DeviceEnvironmentOptions = z.infer<typeof deviceEnvironmentSchema>;
|
|
45
|
+
}, z.core.$strict>]>;
|
|
46
|
+
export type ComputerBuildIface = z.output<typeof computerBuildSchema>;
|
|
47
|
+
export type ComputerEnvironmentIface = z.output<typeof computerEnvironmentSchema>;
|
|
48
|
+
export type ComputerEnvironmentInputIface = z.input<typeof computerEnvironmentSchema>;
|
|
49
|
+
export type DeviceEnvironmentIface = z.output<typeof deviceEnvironmentSchema>;
|
|
50
|
+
export type DeviceEnvironmentInputIface = z.input<typeof deviceEnvironmentSchema>;
|
|
@@ -1,121 +1,44 @@
|
|
|
1
|
-
import { NetworkPolicy, SandboxAccess, SandboxAttach } from "@finalai/agent-provider";
|
|
2
1
|
import * as z from "zod";
|
|
3
|
-
const
|
|
4
|
-
const
|
|
2
|
+
const COMPUTER_PROVIDER = "computer";
|
|
3
|
+
const DEVICE_PROVIDER = "device";
|
|
5
4
|
const DEVICE_API_ACTING_USER_HEADER = "Final-Acting-User-Id";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
ComputerWorkspacePolicy2["Conversation"] = "conversation";
|
|
9
|
-
ComputerWorkspacePolicy2["Ephemeral"] = "ephemeral";
|
|
10
|
-
return ComputerWorkspacePolicy2;
|
|
11
|
-
})(ComputerWorkspacePolicy || {});
|
|
12
|
-
var TemplateWhenMissing = /* @__PURE__ */ ((TemplateWhenMissing2) => {
|
|
13
|
-
TemplateWhenMissing2["Skip"] = "skip";
|
|
14
|
-
TemplateWhenMissing2["Fail"] = "fail";
|
|
15
|
-
return TemplateWhenMissing2;
|
|
16
|
-
})(TemplateWhenMissing || {});
|
|
17
|
-
const repositoryAliasSchema = z.string().regex(/^[a-zA-Z0-9][a-zA-Z0-9._-]*$/).max(120);
|
|
18
|
-
const variableNameSchema = z.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).max(256);
|
|
19
|
-
const computerRepositorySchema = z.object({
|
|
20
|
-
alias: repositoryAliasSchema,
|
|
21
|
-
// A repository the organization can reach, named as the host's repository
|
|
22
|
-
// resolver accepts it (a GitHub 'final/app', a Final repository id), or a git URL.
|
|
23
|
-
repository: z.string().min(1),
|
|
24
|
-
ref: z.string().min(1).nullable().default(null)
|
|
25
|
-
});
|
|
26
|
-
const computerNetworkPolicySchema = z.union([
|
|
27
|
-
z.nativeEnum(NetworkPolicy),
|
|
28
|
-
z.object({ mode: z.nativeEnum(NetworkPolicy), allow: z.array(z.string()).default([]) })
|
|
29
|
-
]);
|
|
30
|
-
const computerParametersSchema = z.object({
|
|
31
|
-
repositories: z.array(computerRepositorySchema).optional(),
|
|
32
|
-
// Names of variables (secrets); values are injected at start, never stored here.
|
|
33
|
-
variables: z.array(variableNameSchema).optional(),
|
|
34
|
-
workspace: z.nativeEnum(ComputerWorkspacePolicy).optional(),
|
|
35
|
-
networkPolicy: computerNetworkPolicySchema.optional(),
|
|
36
|
-
// Plain, non-secret environment values.
|
|
37
|
-
env: z.record(variableNameSchema, z.string().max(16 * 1024)).optional()
|
|
38
|
-
});
|
|
39
|
-
const templateStepSchema = z.object({
|
|
5
|
+
const DEFAULT_COMPUTER_IMAGE = "lineage:sandbox";
|
|
6
|
+
const buildStepSchema = z.strictObject({
|
|
40
7
|
run: z.string().min(1).max(10 * 1024),
|
|
41
|
-
cwd: z.string().min(1).default("."),
|
|
42
|
-
whenMissing: z.nativeEnum(TemplateWhenMissing).nullable().default(null),
|
|
43
|
-
timeoutMinutes: z.number().int().min(1).max(120).default(20),
|
|
44
|
-
required: z.boolean().default(true)
|
|
45
|
-
});
|
|
46
|
-
const templateServiceSchema = templateStepSchema.extend({
|
|
47
|
-
name: z.string().regex(/^[a-z0-9][a-z0-9-]*$/).max(64),
|
|
48
|
-
ready: z.object({ url: z.string().url(), timeoutSeconds: z.number().int().min(1).max(600).default(90) }).nullable().default(null)
|
|
49
|
-
});
|
|
50
|
-
const templateCommandSchema = z.object({
|
|
51
|
-
run: z.string().min(1).max(10 * 1024),
|
|
52
|
-
description: z.string().min(1).max(500).nullable().default(null),
|
|
53
|
-
cwd: z.string().min(1).default("."),
|
|
54
|
-
whenMissing: z.nativeEnum(TemplateWhenMissing).nullable().default(null),
|
|
55
8
|
timeoutMinutes: z.number().int().min(1).max(120).default(20)
|
|
56
9
|
});
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
build
|
|
60
|
-
|
|
61
|
-
steps: z.array(templateStepSchema).max(30).default([]),
|
|
62
|
-
verify: z.array(templateStepSchema).max(30).default([])
|
|
63
|
-
}).prefault({}),
|
|
64
|
-
workspace: z.object({ setup: z.array(templateStepSchema).max(30).default([]) }).prefault({}),
|
|
65
|
-
services: z.array(templateServiceSchema).max(20).default([]),
|
|
66
|
-
commands: z.record(
|
|
67
|
-
z.string().regex(/^[a-z0-9][a-z0-9-]*$/).max(64),
|
|
68
|
-
templateCommandSchema
|
|
69
|
-
).default({})
|
|
10
|
+
const computerBuildSchema = z.strictObject({
|
|
11
|
+
steps: z.array(buildStepSchema).max(30).default([]),
|
|
12
|
+
// Checks that the built base works; a failing one fails the build.
|
|
13
|
+
verify: z.array(buildStepSchema).max(30).default([])
|
|
70
14
|
});
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
repositories: z.array(computerRepositorySchema).default([]),
|
|
76
|
-
variables: z.array(variableNameSchema).default([])
|
|
15
|
+
const computerMachineSchema = z.strictObject({
|
|
16
|
+
vcpu: z.number().int().min(1).max(64).optional(),
|
|
17
|
+
memoryMb: z.number().int().min(512).max(262144).optional(),
|
|
18
|
+
diskGb: z.number().int().min(1).max(2048).optional()
|
|
77
19
|
});
|
|
78
|
-
const computerEnvironmentSchema = z.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
z.strictObject({
|
|
87
|
-
inline: computerInlineGuideSchema,
|
|
88
|
-
parameters: computerParametersSchema.prefault({})
|
|
89
|
-
}),
|
|
90
|
-
z.strictObject({ image: z.string().min(1), parameters: computerParametersSchema.prefault({}) }),
|
|
91
|
-
// The organization's default guide.
|
|
92
|
-
z.strictObject({ parameters: computerParametersSchema.prefault({}) })
|
|
93
|
-
]);
|
|
94
|
-
const computerOpenOptionsSchema = z.strictObject({
|
|
95
|
-
access: z.nativeEnum(SandboxAccess).default(SandboxAccess.Write),
|
|
96
|
-
attach: z.nativeEnum(SandboxAttach).optional()
|
|
20
|
+
const computerEnvironmentSchema = z.strictObject({
|
|
21
|
+
// An OCI image reference, or `lineage:<name>` for a platform image lineage.
|
|
22
|
+
image: z.string().min(1).max(512).optional(),
|
|
23
|
+
build: computerBuildSchema.optional(),
|
|
24
|
+
machine: computerMachineSchema.optional(),
|
|
25
|
+
region: z.string().min(1).max(64).optional(),
|
|
26
|
+
// Idle time before the computer pauses (its disk and processes kept).
|
|
27
|
+
idleTimeoutSeconds: z.number().int().min(60).max(7 * 24 * 60 * 60).optional()
|
|
97
28
|
});
|
|
98
29
|
const deviceEnvironmentSchema = z.union([
|
|
99
30
|
z.strictObject({ deviceId: z.string().uuid() }),
|
|
100
31
|
// A pairing code the owner approved; resolved to a device at prepare.
|
|
101
|
-
z.strictObject({ pairing: z.string().min(1) })
|
|
102
|
-
// The only Device of the user the session acts for.
|
|
103
|
-
z.strictObject({})
|
|
32
|
+
z.strictObject({ pairing: z.string().min(1) })
|
|
104
33
|
]);
|
|
105
34
|
export {
|
|
106
|
-
|
|
107
|
-
|
|
35
|
+
COMPUTER_PROVIDER,
|
|
36
|
+
DEFAULT_COMPUTER_IMAGE,
|
|
108
37
|
DEVICE_API_ACTING_USER_HEADER,
|
|
109
|
-
|
|
110
|
-
|
|
38
|
+
DEVICE_PROVIDER,
|
|
39
|
+
computerBuildSchema,
|
|
111
40
|
computerEnvironmentSchema,
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
computerOpenOptionsSchema,
|
|
115
|
-
computerParametersSchema,
|
|
116
|
-
computerRepositorySchema,
|
|
117
|
-
computerTemplateSchema,
|
|
118
|
-
deviceEnvironmentSchema,
|
|
119
|
-
repositoryAliasSchema
|
|
41
|
+
computerMachineSchema,
|
|
42
|
+
deviceEnvironmentSchema
|
|
120
43
|
};
|
|
121
44
|
//# sourceMappingURL=environment.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/sandboxes/environment.ts"],
|
|
4
|
-
"sourcesContent": ["import
|
|
5
|
-
"mappings": "AAAA,
|
|
6
|
-
"names": [
|
|
4
|
+
"sourcesContent": ["import * as z from 'zod';\n\n// Environment options of the `computer` and `device` providers: what a\n// `project.sandboxes.create(computer({...}))` call carries as the environment,\n// validated by the provider. Only what the provider itself controls lives\n// here (image, build, machine, region, idle policy); what should be on the\n// machine is the provider-neutral sandbox setup, which the platform applies.\n// Pure (no I/O) so callers can import it anywhere.\n\nexport const COMPUTER_PROVIDER = 'computer';\nexport const DEVICE_PROVIDER = 'device';\n\n// The Device API's header naming the user a request acts for.\nexport const DEVICE_API_ACTING_USER_HEADER = 'Final-Acting-User-Id';\n\n// The platform's image lineage computers start from when none is named.\nexport const DEFAULT_COMPUTER_IMAGE = 'lineage:sandbox';\n\nconst buildStepSchema = z.strictObject({\n run: z\n .string()\n .min(1)\n .max(10 * 1024),\n timeoutMinutes: z.number().int().min(1).max(120).default(20),\n});\n\n// Steps baked into a base once (the provider's preparation), never run per sandbox.\nexport const computerBuildSchema = z.strictObject({\n steps: z.array(buildStepSchema).max(30).default([]),\n // Checks that the built base works; a failing one fails the build.\n verify: z.array(buildStepSchema).max(30).default([]),\n});\n\nexport const computerMachineSchema = z.strictObject({\n vcpu: z.number().int().min(1).max(64).optional(),\n memoryMb: z.number().int().min(512).max(262_144).optional(),\n diskGb: z.number().int().min(1).max(2048).optional(),\n});\n\nexport const computerEnvironmentSchema = z.strictObject({\n // An OCI image reference, or `lineage:<name>` for a platform image lineage.\n image: z.string().min(1).max(512).optional(),\n build: computerBuildSchema.optional(),\n machine: computerMachineSchema.optional(),\n region: z.string().min(1).max(64).optional(),\n // Idle time before the computer pauses (its disk and processes kept).\n idleTimeoutSeconds: z\n .number()\n .int()\n .min(60)\n .max(7 * 24 * 60 * 60)\n .optional(),\n});\n\nexport const deviceEnvironmentSchema = z.union([\n z.strictObject({ deviceId: z.string().uuid() }),\n // A pairing code the owner approved; resolved to a device at prepare.\n z.strictObject({ pairing: z.string().min(1) }),\n]);\n\nexport type ComputerBuildIface = z.output<typeof computerBuildSchema>;\nexport type ComputerEnvironmentIface = z.output<typeof computerEnvironmentSchema>;\nexport type ComputerEnvironmentInputIface = z.input<typeof computerEnvironmentSchema>;\nexport type DeviceEnvironmentIface = z.output<typeof deviceEnvironmentSchema>;\nexport type DeviceEnvironmentInputIface = z.input<typeof deviceEnvironmentSchema>;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,OAAO;AASZ,MAAM,oBAAoB;AAC1B,MAAM,kBAAkB;AAGxB,MAAM,gCAAgC;AAGtC,MAAM,yBAAyB;AAEtC,MAAM,kBAAkB,EAAE,aAAa;AAAA,EACrC,KAAK,EACF,OAAO,EACP,IAAI,CAAC,EACL,IAAI,KAAK,IAAI;AAAA,EAChB,gBAAgB,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG,EAAE,QAAQ,EAAE;AAC7D,CAAC;AAGM,MAAM,sBAAsB,EAAE,aAAa;AAAA,EAChD,OAAO,EAAE,MAAM,eAAe,EAAE,IAAI,EAAE,EAAE,QAAQ,CAAC,CAAC;AAAA;AAAA,EAElD,QAAQ,EAAE,MAAM,eAAe,EAAE,IAAI,EAAE,EAAE,QAAQ,CAAC,CAAC;AACrD,CAAC;AAEM,MAAM,wBAAwB,EAAE,aAAa;AAAA,EAClD,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA,EAC/C,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,GAAG,EAAE,IAAI,MAAO,EAAE,SAAS;AAAA,EAC1D,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,IAAI,IAAI,EAAE,SAAS;AACrD,CAAC;AAEM,MAAM,4BAA4B,EAAE,aAAa;AAAA;AAAA,EAEtD,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG,EAAE,SAAS;AAAA,EAC3C,OAAO,oBAAoB,SAAS;AAAA,EACpC,SAAS,sBAAsB,SAAS;AAAA,EACxC,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA;AAAA,EAE3C,oBAAoB,EACjB,OAAO,EACP,IAAI,EACJ,IAAI,EAAE,EACN,IAAI,IAAI,KAAK,KAAK,EAAE,EACpB,SAAS;AACd,CAAC;AAEM,MAAM,0BAA0B,EAAE,MAAM;AAAA,EAC7C,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;AAAA;AAAA,EAE9C,EAAE,aAAa,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC;AAC/C,CAAC;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,69 +1,9 @@
|
|
|
1
|
-
import { type JsonObject, type
|
|
2
|
-
import { type
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
type
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export interface InstalledSandboxOpenRequestIface extends SandboxOpenRequestIface<JsonObject, JsonObject> {
|
|
11
|
-
readonly provider: PackageProviderRefIface;
|
|
12
|
-
readonly providerRef: PackageProviderRefIface;
|
|
13
|
-
}
|
|
14
|
-
export interface InstalledSandboxEnvironmentIface extends SandboxEnvironmentIface<JsonObject, SandboxOpenInputIface> {
|
|
15
|
-
readonly provider: PackageProviderRefIface;
|
|
16
|
-
readonly providerRef: PackageProviderRefIface;
|
|
17
|
-
open(options?: SandboxOpenInputIface): InstalledSandboxOpenRequestIface & PromiseLike<NetworkSandboxSessionIface>;
|
|
18
|
-
}
|
|
19
|
-
export interface ComputerRepositoryInputIface {
|
|
20
|
-
alias: string;
|
|
21
|
-
repository: string;
|
|
22
|
-
ref?: string | null;
|
|
23
|
-
}
|
|
24
|
-
export interface ComputerParametersInputIface {
|
|
25
|
-
repositories?: ComputerRepositoryInputIface[];
|
|
26
|
-
variables?: string[];
|
|
27
|
-
workspace?: EnumInput<ComputerWorkspacePolicy>;
|
|
28
|
-
networkPolicy?: EnumInput<NetworkPolicy> | {
|
|
29
|
-
mode: EnumInput<NetworkPolicy>;
|
|
30
|
-
allow?: string[];
|
|
31
|
-
};
|
|
32
|
-
env?: Record<string, string>;
|
|
33
|
-
}
|
|
34
|
-
export interface ComputerSetupGuideInputIface extends ComputerParametersInputIface {
|
|
35
|
-
ref: string;
|
|
36
|
-
version?: number | 'latest';
|
|
37
|
-
}
|
|
38
|
-
export interface ComputerInlineGuideInputIface {
|
|
39
|
-
image: string;
|
|
40
|
-
template: ComputerTemplateInputIface;
|
|
41
|
-
repositories?: ComputerRepositoryInputIface[];
|
|
42
|
-
variables?: string[];
|
|
43
|
-
}
|
|
44
|
-
export interface ComputerInputIface extends ComputerParametersInputIface {
|
|
45
|
-
image?: string;
|
|
46
|
-
}
|
|
47
|
-
export interface DeviceInputIface {
|
|
48
|
-
deviceId?: string;
|
|
49
|
-
pairing?: string;
|
|
50
|
-
}
|
|
51
|
-
export declare const computerSetupGuide: ((input: ComputerSetupGuideInputIface) => InstalledSandboxEnvironmentIface) & {
|
|
52
|
-
define: (input: ComputerInlineGuideInputIface) => InstalledSandboxEnvironmentIface;
|
|
53
|
-
providerRef: {
|
|
54
|
-
kind: import("@finalai/agent-provider").ProviderRefKind.Package;
|
|
55
|
-
specifier: string;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
export declare const computer: ((input?: ComputerInputIface) => InstalledSandboxEnvironmentIface) & {
|
|
59
|
-
providerRef: {
|
|
60
|
-
kind: import("@finalai/agent-provider").ProviderRefKind.Package;
|
|
61
|
-
specifier: string;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
export declare const device: ((input?: DeviceInputIface) => InstalledSandboxEnvironmentIface) & {
|
|
65
|
-
providerRef: {
|
|
66
|
-
kind: import("@finalai/agent-provider").ProviderRefKind.Package;
|
|
67
|
-
specifier: string;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
1
|
+
import { type JsonObject, type SandboxEnvironmentValueIface } from '@finalai/agent-provider';
|
|
2
|
+
import { type ComputerEnvironmentInputIface, type DeviceEnvironmentInputIface } from "./environment.mjs";
|
|
3
|
+
export declare const WORKERS_PROVIDER = "workers";
|
|
4
|
+
export { COMPUTER_PROVIDER, computerEnvironmentSchema, DEFAULT_COMPUTER_IMAGE, DEVICE_API_ACTING_USER_HEADER, DEVICE_PROVIDER, deviceEnvironmentSchema, type ComputerBuildIface, type ComputerEnvironmentIface, type ComputerEnvironmentInputIface, type DeviceEnvironmentIface, type DeviceEnvironmentInputIface, } from "./environment.mjs";
|
|
5
|
+
export { defineSandboxSetup, describeSandbox, LATEST_SANDBOX_SETUP_VERSION, type SandboxDescriptionIface, type SandboxSetupIface, type SandboxSetupInputIface, } from '@finalai/agent-provider/sandbox/setup';
|
|
6
|
+
export type { SandboxEnvironmentValueIface } from '@finalai/agent-provider';
|
|
7
|
+
export declare const computer: (options?: ComputerEnvironmentInputIface) => SandboxEnvironmentValueIface<JsonObject>;
|
|
8
|
+
export declare const device: (options: DeviceEnvironmentInputIface) => SandboxEnvironmentValueIface<JsonObject>;
|
|
9
|
+
export declare const workers: () => SandboxEnvironmentValueIface<null>;
|