@finalai/final-agent-provider 0.10.1 → 0.12.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 +125 -46
- 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 +29 -0
- package/dist/modules/sandboxes/local.mjs +555 -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 +73 -137
- package/dist/modules/authoring-final-channel.d.mts +0 -3
- package/dist/modules/authoring-final-channel.mjs +0 -10
- package/dist/modules/authoring-final-channel.mjs.map +0 -7
- package/dist/modules/channel-factories.d.mts +0 -40
- package/dist/modules/channel-factories.mjs +0 -212
- package/dist/modules/channel-factories.mjs.map +0 -7
- package/dist/modules/channels/content.d.mts +0 -6
- package/dist/modules/channels/content.mjs +0 -31
- package/dist/modules/channels/content.mjs.map +0 -7
- package/dist/modules/channels/delivery.d.mts +0 -54
- package/dist/modules/channels/delivery.mjs +0 -243
- package/dist/modules/channels/delivery.mjs.map +0 -7
- package/dist/modules/channels/direct-messaging.d.mts +0 -5
- package/dist/modules/channels/direct-messaging.mjs +0 -8
- package/dist/modules/channels/direct-messaging.mjs.map +0 -7
- package/dist/modules/channels/fake-platform.d.mts +0 -36
- package/dist/modules/channels/fake-platform.mjs +0 -168
- package/dist/modules/channels/fake-platform.mjs.map +0 -7
- package/dist/modules/channels/group-messaging.d.mts +0 -5
- package/dist/modules/channels/group-messaging.mjs +0 -8
- package/dist/modules/channels/group-messaging.mjs.map +0 -7
- package/dist/modules/channels/inbound.d.mts +0 -52
- package/dist/modules/channels/inbound.mjs +0 -42
- package/dist/modules/channels/inbound.mjs.map +0 -7
- package/dist/modules/channels/index.d.mts +0 -9
- package/dist/modules/channels/index.mjs +0 -10
- package/dist/modules/channels/index.mjs.map +0 -7
- package/dist/modules/channels/messaging-channel.d.mts +0 -7
- package/dist/modules/channels/messaging-channel.mjs +0 -99
- package/dist/modules/channels/messaging-channel.mjs.map +0 -7
- package/dist/modules/channels/projection.d.mts +0 -36
- package/dist/modules/channels/projection.mjs +0 -233
- package/dist/modules/channels/projection.mjs.map +0 -7
- package/dist/modules/channels/prompt.d.mts +0 -72
- package/dist/modules/channels/prompt.mjs +0 -208
- package/dist/modules/channels/prompt.mjs.map +0 -7
- package/dist/modules/channels/routing.d.mts +0 -5
- package/dist/modules/channels/routing.mjs +0 -53
- package/dist/modules/channels/routing.mjs.map +0 -7
- 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,118 +1,58 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
jsonObjectSchema,
|
|
4
|
-
packageRef
|
|
2
|
+
jsonObjectSchema
|
|
5
3
|
} from "@finalai/agent-provider";
|
|
6
|
-
import * as z from "zod";
|
|
7
4
|
import {
|
|
8
|
-
|
|
5
|
+
COMPUTER_PROVIDER,
|
|
9
6
|
computerEnvironmentSchema,
|
|
10
|
-
|
|
11
|
-
DEVICE_SANDBOX_SPECIFIER,
|
|
7
|
+
DEVICE_PROVIDER,
|
|
12
8
|
deviceEnvironmentSchema
|
|
13
9
|
} from "./environment.mjs";
|
|
10
|
+
const WORKERS_PROVIDER = "workers";
|
|
14
11
|
import {
|
|
15
|
-
|
|
12
|
+
COMPUTER_PROVIDER as COMPUTER_PROVIDER2,
|
|
16
13
|
computerEnvironmentSchema as computerEnvironmentSchema2,
|
|
17
|
-
|
|
14
|
+
DEFAULT_COMPUTER_IMAGE,
|
|
18
15
|
DEVICE_API_ACTING_USER_HEADER,
|
|
19
|
-
|
|
20
|
-
deviceEnvironmentSchema as deviceEnvironmentSchema2
|
|
21
|
-
TemplateWhenMissing
|
|
16
|
+
DEVICE_PROVIDER as DEVICE_PROVIDER2,
|
|
17
|
+
deviceEnvironmentSchema as deviceEnvironmentSchema2
|
|
22
18
|
} from "./environment.mjs";
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
const parsed = computerOpenOptionsSchema.safeParse(openOptions);
|
|
19
|
+
import {
|
|
20
|
+
defineSandboxSetup,
|
|
21
|
+
describeSandbox,
|
|
22
|
+
LATEST_SANDBOX_SETUP_VERSION
|
|
23
|
+
} from "@finalai/agent-provider/sandbox/setup";
|
|
24
|
+
const environmentValue = (args) => {
|
|
25
|
+
const parsed = args.schema.safeParse(args.input);
|
|
31
26
|
if (!parsed.success)
|
|
32
|
-
throw new Error(`invalid ${
|
|
33
|
-
return parsed.data;
|
|
34
|
-
};
|
|
35
|
-
const environmentFor = (args) => {
|
|
36
|
-
const provider = packageRef(args.specifier);
|
|
27
|
+
throw new Error(`invalid ${args.provider} environment: ${parsed.error.message}`);
|
|
37
28
|
return {
|
|
38
|
-
provider,
|
|
39
|
-
|
|
40
|
-
providerName: args.providerName,
|
|
41
|
-
options: args.options,
|
|
42
|
-
authoringWarnings: args.authoringWarnings,
|
|
43
|
-
open: (openOptions) => awaitableOpenRequest({
|
|
44
|
-
provider,
|
|
45
|
-
providerRef: provider,
|
|
46
|
-
providerName: args.providerName,
|
|
47
|
-
environmentOptions: args.options,
|
|
48
|
-
openOptions: recorded(validatedOpen(openOptions ?? {}, args.providerName)),
|
|
49
|
-
authoringWarnings: args.authoringWarnings
|
|
50
|
-
})
|
|
29
|
+
provider: args.provider,
|
|
30
|
+
environment: jsonObjectSchema.parse(JSON.parse(JSON.stringify(args.input)))
|
|
51
31
|
};
|
|
52
32
|
};
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
specifier: COMPUTER_SANDBOX_SPECIFIER,
|
|
58
|
-
options: validated(computerEnvironmentSchema, options, "computer environment")
|
|
59
|
-
};
|
|
60
|
-
if (options["inline"] != null)
|
|
61
|
-
environment.authoringWarnings = [
|
|
62
|
-
"This inline computer guide builds its base on first use, which may take minutes. Publish a saved setup guide to prepare the base ahead of time."
|
|
63
|
-
];
|
|
64
|
-
return environmentFor(environment);
|
|
65
|
-
};
|
|
66
|
-
const parametersOf = (input) => recorded({
|
|
67
|
-
repositories: input.repositories,
|
|
68
|
-
variables: input.variables,
|
|
69
|
-
workspace: input.workspace,
|
|
70
|
-
networkPolicy: input.networkPolicy,
|
|
71
|
-
env: input.env
|
|
72
|
-
});
|
|
73
|
-
const guideReference = (input) => computerEnvironment({
|
|
74
|
-
guide: { ref: input.ref, version: input.version ?? "latest" },
|
|
75
|
-
parameters: parametersOf(input)
|
|
76
|
-
});
|
|
77
|
-
const inlineGuide = (input) => computerEnvironment({
|
|
78
|
-
inline: recorded({
|
|
79
|
-
image: input.image,
|
|
80
|
-
template: input.template,
|
|
81
|
-
repositories: input.repositories ?? [],
|
|
82
|
-
variables: input.variables ?? []
|
|
83
|
-
})
|
|
33
|
+
const computer = (options = {}) => environmentValue({
|
|
34
|
+
provider: COMPUTER_PROVIDER,
|
|
35
|
+
schema: computerEnvironmentSchema,
|
|
36
|
+
input: options
|
|
84
37
|
});
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
|
|
38
|
+
const device = (options) => environmentValue({ provider: DEVICE_PROVIDER, schema: deviceEnvironmentSchema, input: options });
|
|
39
|
+
const workers = () => ({
|
|
40
|
+
provider: WORKERS_PROVIDER,
|
|
41
|
+
environment: null
|
|
88
42
|
});
|
|
89
|
-
const computer = Object.assign(
|
|
90
|
-
(input = {}) => {
|
|
91
|
-
const parameters = parametersOf({ workspace: "ephemeral", ...input });
|
|
92
|
-
return computerEnvironment(
|
|
93
|
-
input.image == null ? { parameters } : { image: input.image, parameters }
|
|
94
|
-
);
|
|
95
|
-
},
|
|
96
|
-
{ providerRef: computerProviderRef }
|
|
97
|
-
);
|
|
98
|
-
const device = Object.assign(
|
|
99
|
-
(input = {}) => environmentFor({
|
|
100
|
-
providerName: "device",
|
|
101
|
-
specifier: DEVICE_SANDBOX_SPECIFIER,
|
|
102
|
-
options: validated(deviceEnvironmentSchema, recorded(input), "device environment")
|
|
103
|
-
}),
|
|
104
|
-
{ providerRef: packageRef(DEVICE_SANDBOX_SPECIFIER) }
|
|
105
|
-
);
|
|
106
43
|
export {
|
|
107
|
-
|
|
108
|
-
|
|
44
|
+
COMPUTER_PROVIDER2 as COMPUTER_PROVIDER,
|
|
45
|
+
DEFAULT_COMPUTER_IMAGE,
|
|
109
46
|
DEVICE_API_ACTING_USER_HEADER,
|
|
110
|
-
|
|
111
|
-
|
|
47
|
+
DEVICE_PROVIDER2 as DEVICE_PROVIDER,
|
|
48
|
+
LATEST_SANDBOX_SETUP_VERSION,
|
|
49
|
+
WORKERS_PROVIDER,
|
|
112
50
|
computer,
|
|
113
51
|
computerEnvironmentSchema2 as computerEnvironmentSchema,
|
|
114
|
-
|
|
52
|
+
defineSandboxSetup,
|
|
53
|
+
describeSandbox,
|
|
115
54
|
device,
|
|
116
|
-
deviceEnvironmentSchema2 as deviceEnvironmentSchema
|
|
55
|
+
deviceEnvironmentSchema2 as deviceEnvironmentSchema,
|
|
56
|
+
workers
|
|
117
57
|
};
|
|
118
58
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/sandboxes/index.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n
|
|
5
|
-
"mappings": "AAAA;AAAA,EACE;AAAA,
|
|
6
|
-
"names": ["
|
|
4
|
+
"sourcesContent": ["import {\n jsonObjectSchema,\n type JsonObject,\n type SandboxEnvironmentValueIface,\n} from '@finalai/agent-provider';\nimport type * as z from 'zod';\nimport {\n COMPUTER_PROVIDER,\n computerEnvironmentSchema,\n DEVICE_PROVIDER,\n deviceEnvironmentSchema,\n type ComputerEnvironmentInputIface,\n type DeviceEnvironmentInputIface,\n} from \"./environment.mjs\";\n\n// Environments of Final's sandbox providers, as plain data a caller creates\n// sandboxes from: `project.sandboxes.create(computer({ image }), { setup })`.\n// What goes on the machine is the sandbox setup (`defineSandboxSetup`), which\n// works on any provider. The providers themselves live in\n// `./sandboxes/computer` and `./sandboxes/device`.\n\nexport const WORKERS_PROVIDER = 'workers';\n\nexport {\n COMPUTER_PROVIDER,\n computerEnvironmentSchema,\n DEFAULT_COMPUTER_IMAGE,\n DEVICE_API_ACTING_USER_HEADER,\n DEVICE_PROVIDER,\n deviceEnvironmentSchema,\n type ComputerBuildIface,\n type ComputerEnvironmentIface,\n type ComputerEnvironmentInputIface,\n type DeviceEnvironmentIface,\n type DeviceEnvironmentInputIface,\n} from \"./environment.mjs\";\nexport {\n defineSandboxSetup,\n describeSandbox,\n LATEST_SANDBOX_SETUP_VERSION,\n type SandboxDescriptionIface,\n type SandboxSetupIface,\n type SandboxSetupInputIface,\n} from '@finalai/agent-provider/sandbox/setup';\nexport type { SandboxEnvironmentValueIface } from '@finalai/agent-provider';\n\nconst environmentValue = (args: {\n provider: string;\n schema: z.ZodType;\n input: unknown;\n}): SandboxEnvironmentValueIface<JsonObject> => {\n const parsed = args.schema.safeParse(args.input);\n if (!parsed.success)\n throw new Error(`invalid ${args.provider} environment: ${parsed.error.message}`);\n // The input as written (defaults are the provider's), with undefined members dropped.\n return {\n provider: args.provider,\n environment: jsonObjectSchema.parse(JSON.parse(JSON.stringify(args.input))),\n };\n};\n\n// A Final computer: a VM from the Computers API, created from `image` (the\n// platform's sandbox lineage by default), with `build` baked into its base.\nexport const computer = (\n options: ComputerEnvironmentInputIface = {},\n): SandboxEnvironmentValueIface<JsonObject> =>\n environmentValue({\n provider: COMPUTER_PROVIDER,\n schema: computerEnvironmentSchema,\n input: options,\n });\n\n// A person's own computer running Final Device, by id or by an approved pairing code.\nexport const device = (\n options: DeviceEnvironmentInputIface,\n): SandboxEnvironmentValueIface<JsonObject> =>\n environmentValue({ provider: DEVICE_PROVIDER, schema: deviceEnvironmentSchema, input: options });\n\n// Final's Workers runtime: runs the worker programs of Final's harnesses\n// (`final`, `pi`, `nanocode-claude`, `nanocode-codex`) and offers the model no\n// files or shell. Clients create one, owned by the session or conversation,\n// for those harnesses' settings that name no `environment`.\nexport const workers = (): SandboxEnvironmentValueIface<null> => ({\n provider: WORKERS_PROVIDER,\n environment: null,\n});\n"],
|
|
5
|
+
"mappings": "AAAA;AAAA,EACE;AAAA,OAGK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AAQA,MAAM,mBAAmB;AAEhC;AAAA,EACE,qBAAAA;AAAA,EACA,6BAAAC;AAAA,EACA;AAAA,EACA;AAAA,EACA,mBAAAC;AAAA,EACA,2BAAAC;AAAA,OAMK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AAGP,MAAM,mBAAmB,CAAC,SAIsB;AAC9C,QAAM,SAAS,KAAK,OAAO,UAAU,KAAK,KAAK;AAC/C,MAAI,CAAC,OAAO;AACV,UAAM,IAAI,MAAM,WAAW,KAAK,QAAQ,iBAAiB,OAAO,MAAM,OAAO,EAAE;AAEjF,SAAO;AAAA,IACL,UAAU,KAAK;AAAA,IACf,aAAa,iBAAiB,MAAM,KAAK,MAAM,KAAK,UAAU,KAAK,KAAK,CAAC,CAAC;AAAA,EAC5E;AACF;AAIO,MAAM,WAAW,CACtB,UAAyC,CAAC,MAE1C,iBAAiB;AAAA,EACf,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,OAAO;AACT,CAAC;AAGI,MAAM,SAAS,CACpB,YAEA,iBAAiB,EAAE,UAAU,iBAAiB,QAAQ,yBAAyB,OAAO,QAAQ,CAAC;AAM1F,MAAM,UAAU,OAA2C;AAAA,EAChE,UAAU;AAAA,EACV,aAAa;AACf;",
|
|
6
|
+
"names": ["COMPUTER_PROVIDER", "computerEnvironmentSchema", "DEVICE_PROVIDER", "deviceEnvironmentSchema"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type JsonValue } from '@finalai/agent-provider';
|
|
2
|
+
import { type NetworkSandboxSessionIface, type SandboxProviderIface } from '@finalai/agent-provider/sandbox';
|
|
3
|
+
import * as z from 'zod';
|
|
4
|
+
export declare const LOCAL_PROVIDER = "local";
|
|
5
|
+
export declare const LOCAL_INHERITED_ENV: string[];
|
|
6
|
+
export interface LocalSandboxOptionsIface {
|
|
7
|
+
root: string;
|
|
8
|
+
env?: Record<string, string>;
|
|
9
|
+
inheritEnv?: string[];
|
|
10
|
+
id?: string;
|
|
11
|
+
baseEnv?: () => Promise<Record<string, string>>;
|
|
12
|
+
}
|
|
13
|
+
export interface LocalSandboxIface extends NetworkSandboxSessionIface {
|
|
14
|
+
readonly root: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const LOCAL_STOP_GRACE_MS = 2000;
|
|
17
|
+
export declare const createLocalSandbox: (options: LocalSandboxOptionsIface) => Promise<LocalSandboxIface>;
|
|
18
|
+
declare const localStateSchema: z.ZodObject<{
|
|
19
|
+
version: z.ZodLiteral<1>;
|
|
20
|
+
root: z.ZodString;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export declare const LOCAL_PLATFORM_DIRECTORY = ".final";
|
|
23
|
+
type LocalArtifact = {
|
|
24
|
+
version: 1;
|
|
25
|
+
root: string;
|
|
26
|
+
};
|
|
27
|
+
type LocalState = z.infer<typeof localStateSchema>;
|
|
28
|
+
export declare const createLocalSandboxProvider: () => SandboxProviderIface<JsonValue, LocalArtifact, LocalState, LocalSandboxIface>;
|
|
29
|
+
export {};
|