freestyle-sandboxes 0.0.97 → 0.1.1
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/README.md +39 -48
- package/index.cjs +4381 -0
- package/index.d.cts +9404 -0
- package/index.d.mts +9404 -0
- package/index.mjs +4367 -0
- package/package.json +16 -109
- package/dist/ai/inde.d.cts +0 -75
- package/dist/ai/inde.d.mts +0 -75
- package/dist/ai/index.cjs +0 -13
- package/dist/ai/index.d.cts +0 -75
- package/dist/ai/index.d.mts +0 -75
- package/dist/ai/index.mjs +0 -4
- package/dist/expo/inde.d.cts +0 -6
- package/dist/expo/inde.d.mts +0 -6
- package/dist/expo/index.cjs +0 -319
- package/dist/expo/index.d.cts +0 -6
- package/dist/expo/index.d.mts +0 -6
- package/dist/expo/index.mjs +0 -297
- package/dist/inde.d.cts +0 -373
- package/dist/inde.d.mts +0 -373
- package/dist/index-BKAG8L-o.mjs +0 -3061
- package/dist/index-DuOpIaWc.cjs +0 -3068
- package/dist/index.cjs +0 -1329
- package/dist/index.d-9H_wnIbz.d.ts +0 -4223
- package/dist/index.d.cts +0 -373
- package/dist/index.d.mts +0 -373
- package/dist/index.mjs +0 -1327
- package/dist/langgraph/inde.d.cts +0 -4180
- package/dist/langgraph/inde.d.mts +0 -4180
- package/dist/langgraph/index.cjs +0 -17155
- package/dist/langgraph/index.d.cts +0 -4180
- package/dist/langgraph/index.d.mts +0 -4180
- package/dist/langgraph/index.mjs +0 -17153
- package/dist/mastra/inde.d.cts +0 -2623
- package/dist/mastra/inde.d.mts +0 -2623
- package/dist/mastra/index.cjs +0 -55
- package/dist/mastra/index.d.cts +0 -2623
- package/dist/mastra/index.d.mts +0 -2623
- package/dist/mastra/index.mjs +0 -53
- package/dist/react/dev-server/index..d.cts +0 -33
- package/dist/react/dev-server/index..d.mts +0 -33
- package/dist/react/dev-server/index.cjs +0 -148
- package/dist/react/dev-server/index.d.cts +0 -33
- package/dist/react/dev-server/index.d.mts +0 -33
- package/dist/react/dev-server/index.mjs +0 -145
- package/dist/types.gen-CJa21P0C.d.ts +0 -1902
- package/dist/types.gen-DKjMRuu5.d.ts +0 -1898
- package/dist/utils/inde.d.cts +0 -10
- package/dist/utils/inde.d.mts +0 -10
- package/dist/utils/index.cjs +0 -100
- package/dist/utils/index.d.cts +0 -10
- package/dist/utils/index.d.mts +0 -10
- package/dist/utils/index.mjs +0 -75
- package/openapi/index.ts +0 -3
- package/openapi/sdk.gen.ts +0 -929
- package/openapi/types.gen.ts +0 -2234
- package/openapi-ts.config.ts +0 -7
- package/openapi.json +0 -1
- package/src/ai/index.ts +0 -164
- package/src/dev-server.ts +0 -95
- package/src/expo/_expo_internals.ts +0 -389
- package/src/expo/index.ts +0 -26
- package/src/index.ts +0 -1459
- package/src/langgraph/index.ts +0 -33
- package/src/mastra/index.ts +0 -38
- package/src/react/dev-server/index.tsx +0 -195
- package/src/react/dev-server/types.ts +0 -5
- package/src/utils/index.ts +0 -97
- package/tsconfig.json +0 -8
package/package.json
CHANGED
|
@@ -1,111 +1,18 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"import": {
|
|
15
|
-
"types": "./dist/index.d.mts",
|
|
16
|
-
"default": "./dist/index.mjs"
|
|
17
|
-
}
|
|
2
|
+
"name": "freestyle-sandboxes",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
"require": {
|
|
7
|
+
"types": "./index.d.cts",
|
|
8
|
+
"default": "./index.cjs"
|
|
9
|
+
},
|
|
10
|
+
"import": {
|
|
11
|
+
"types": "./index.d.mts",
|
|
12
|
+
"default": "./index.mjs"
|
|
13
|
+
}
|
|
18
14
|
},
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
"import": {
|
|
25
|
-
"types": "./dist/ai/index.d.mts",
|
|
26
|
-
"default": "./dist/ai/index.mjs"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"./mastra": {
|
|
30
|
-
"require": {
|
|
31
|
-
"types": "./dist/mastra/index.d.cts",
|
|
32
|
-
"default": "./dist/mastra/index.cjs"
|
|
33
|
-
},
|
|
34
|
-
"import": {
|
|
35
|
-
"types": "./dist/mastra/index.d.mts",
|
|
36
|
-
"default": "./dist/mastra/index.mjs"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"./langgraph": {
|
|
40
|
-
"require": {
|
|
41
|
-
"types": "./dist/langgraph/index.d.cts",
|
|
42
|
-
"default": "./dist/langgraph/index.cjs"
|
|
43
|
-
},
|
|
44
|
-
"import": {
|
|
45
|
-
"types": "./dist/langgraph/index.d.mts",
|
|
46
|
-
"default": "./dist/langgraph/index.mjs"
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"./expo": {
|
|
50
|
-
"require": {
|
|
51
|
-
"types": "./dist/expo/index.d.cts",
|
|
52
|
-
"default": "./dist/expo/index.cjs"
|
|
53
|
-
},
|
|
54
|
-
"import": {
|
|
55
|
-
"types": "./dist/expo/index.d.mts",
|
|
56
|
-
"default": "./dist/expo/index.mjs"
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
"./utils": {
|
|
60
|
-
"require": {
|
|
61
|
-
"types": "./dist/utils/index.d.cts",
|
|
62
|
-
"default": "./dist/utils/index.cjs"
|
|
63
|
-
},
|
|
64
|
-
"import": {
|
|
65
|
-
"types": "./dist/utils/index.d.mts",
|
|
66
|
-
"default": "./dist/utils/index.mjs"
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
"./react/dev-server": {
|
|
70
|
-
"require": {
|
|
71
|
-
"types": "./dist/react/dev-server/index.d.cts",
|
|
72
|
-
"default": "./dist/react/dev-server/index.cjs"
|
|
73
|
-
},
|
|
74
|
-
"import": {
|
|
75
|
-
"types": "./dist/react/dev-server/index.d.mts",
|
|
76
|
-
"default": "./dist/react/dev-server/index.mjs"
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
"scripts": {
|
|
81
|
-
"openapi": "openapi-ts",
|
|
82
|
-
"build": "pkgroll"
|
|
83
|
-
},
|
|
84
|
-
"keywords": [],
|
|
85
|
-
"author": "",
|
|
86
|
-
"license": "ISC",
|
|
87
|
-
"description": "",
|
|
88
|
-
"devDependencies": {
|
|
89
|
-
"@hey-api/openapi-ts": "^0.60.1",
|
|
90
|
-
"@langchain/core": "^0.3.66",
|
|
91
|
-
"@langchain/langgraph": "^0.4.2",
|
|
92
|
-
"@mastra/core": "^0.6.0",
|
|
93
|
-
"ai": "^4.3.4",
|
|
94
|
-
"humanlayer": "^0.7.0",
|
|
95
|
-
"pkgroll": "^2.6.0"
|
|
96
|
-
},
|
|
97
|
-
"dependencies": {
|
|
98
|
-
"@hey-api/client-fetch": "^0.5.7",
|
|
99
|
-
"@tanstack/react-query": "^5.74.4",
|
|
100
|
-
"@types/react": "*",
|
|
101
|
-
"expo-router": "^4.0.20",
|
|
102
|
-
"freestyle-sandboxes": "^0.0.66",
|
|
103
|
-
"glob": "^11.0.1",
|
|
104
|
-
"hono": "^4.7.5",
|
|
105
|
-
"openai": "^4.77.3",
|
|
106
|
-
"openapi": "^1.0.1",
|
|
107
|
-
"react": "*",
|
|
108
|
-
"zod": "^3.24.1"
|
|
109
|
-
},
|
|
110
|
-
"packageManager": "pnpm@9.11.0+sha512.0a203ffaed5a3f63242cd064c8fb5892366c103e328079318f78062f24ea8c9d50bc6a47aa3567cabefd824d170e78fa2745ed1f16b132e16436146b7688f19b"
|
|
111
|
-
}
|
|
15
|
+
"main": "./index.cjs",
|
|
16
|
+
"module": "./index.mjs",
|
|
17
|
+
"types": "./index.d.cts"
|
|
18
|
+
}
|
package/dist/ai/inde.d.cts
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { T as Tool, a as ToolExecutionOptions } from '../index.d-9H_wnIbz.js';
|
|
2
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, cn as HandleExecuteScriptError, b as FreestyleDeployWebConfiguration } from '../types.gen-CJa21P0C.js';
|
|
3
|
-
import { z } from 'zod';
|
|
4
|
-
import 'node:http';
|
|
5
|
-
import 'http';
|
|
6
|
-
|
|
7
|
-
declare const executeCodeSchema: z.ZodObject<{
|
|
8
|
-
script: z.ZodString;
|
|
9
|
-
}, "strip", z.ZodTypeAny, {
|
|
10
|
-
script?: string;
|
|
11
|
-
}, {
|
|
12
|
-
script?: string;
|
|
13
|
-
}>;
|
|
14
|
-
declare const executeCodeDescription: (envVars: string, nodeModules: string) => string;
|
|
15
|
-
/**
|
|
16
|
-
* Execute a JavaScript or TypeScript script
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* @param config - Configuration for the tool
|
|
20
|
-
* @param config.apiKey - The API key to use
|
|
21
|
-
* @param {Function} [config.onResult] - Optional callback function to handle the result.
|
|
22
|
-
* @param {boolean} [config.truncateOutput=false] - Whether to truncate the result to 1000 characters and truncate individual logs to the first 250 characters; useful to prevent long outputs from filling the context window.
|
|
23
|
-
*/
|
|
24
|
-
declare const executeTool: (config: FreestyleExecuteScriptParamsConfiguration & {
|
|
25
|
-
apiKey: string;
|
|
26
|
-
onResult?: (_v: {
|
|
27
|
-
toolCallId: string;
|
|
28
|
-
input: {
|
|
29
|
-
script: string;
|
|
30
|
-
[key: string]: unknown;
|
|
31
|
-
};
|
|
32
|
-
result: FreestyleExecuteScriptResultSuccess | HandleExecuteScriptError;
|
|
33
|
-
}) => void | Promise<void>;
|
|
34
|
-
truncateOutput?: boolean;
|
|
35
|
-
}) => Tool<z.ZodObject<{
|
|
36
|
-
script: z.ZodString;
|
|
37
|
-
}, "strip", z.ZodTypeAny, {
|
|
38
|
-
script?: string;
|
|
39
|
-
}, {
|
|
40
|
-
script?: string;
|
|
41
|
-
}>, FreestyleExecuteScriptResultSuccess | {
|
|
42
|
-
message: any;
|
|
43
|
-
error: any;
|
|
44
|
-
}> & {
|
|
45
|
-
execute: (args: {
|
|
46
|
-
script?: string;
|
|
47
|
-
}, options: ToolExecutionOptions) => PromiseLike<FreestyleExecuteScriptResultSuccess | {
|
|
48
|
-
message: any;
|
|
49
|
-
error: any;
|
|
50
|
-
}>;
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* Deploy a Web project
|
|
54
|
-
* @param config - Configuration for the tool
|
|
55
|
-
* @param config.apiKey - The API key to use
|
|
56
|
-
*/
|
|
57
|
-
declare const deployWebTool: (config: FreestyleDeployWebConfiguration & {
|
|
58
|
-
apiKey: string;
|
|
59
|
-
}) => Tool<z.ZodObject<{
|
|
60
|
-
files: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
61
|
-
}, "strip", z.ZodTypeAny, {
|
|
62
|
-
files?: Record<string, string>;
|
|
63
|
-
}, {
|
|
64
|
-
files?: Record<string, string>;
|
|
65
|
-
}>, string | {
|
|
66
|
-
deploymentId: string;
|
|
67
|
-
}> & {
|
|
68
|
-
execute: (args: {
|
|
69
|
-
files?: Record<string, string>;
|
|
70
|
-
}, options: ToolExecutionOptions) => PromiseLike<string | {
|
|
71
|
-
deploymentId: string;
|
|
72
|
-
}>;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
export { deployWebTool, executeCodeDescription, executeCodeSchema, executeTool };
|
package/dist/ai/inde.d.mts
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { T as Tool, a as ToolExecutionOptions } from '../index.d-9H_wnIbz.js';
|
|
2
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, cn as HandleExecuteScriptError, b as FreestyleDeployWebConfiguration } from '../types.gen-CJa21P0C.js';
|
|
3
|
-
import { z } from 'zod';
|
|
4
|
-
import 'node:http';
|
|
5
|
-
import 'http';
|
|
6
|
-
|
|
7
|
-
declare const executeCodeSchema: z.ZodObject<{
|
|
8
|
-
script: z.ZodString;
|
|
9
|
-
}, "strip", z.ZodTypeAny, {
|
|
10
|
-
script?: string;
|
|
11
|
-
}, {
|
|
12
|
-
script?: string;
|
|
13
|
-
}>;
|
|
14
|
-
declare const executeCodeDescription: (envVars: string, nodeModules: string) => string;
|
|
15
|
-
/**
|
|
16
|
-
* Execute a JavaScript or TypeScript script
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* @param config - Configuration for the tool
|
|
20
|
-
* @param config.apiKey - The API key to use
|
|
21
|
-
* @param {Function} [config.onResult] - Optional callback function to handle the result.
|
|
22
|
-
* @param {boolean} [config.truncateOutput=false] - Whether to truncate the result to 1000 characters and truncate individual logs to the first 250 characters; useful to prevent long outputs from filling the context window.
|
|
23
|
-
*/
|
|
24
|
-
declare const executeTool: (config: FreestyleExecuteScriptParamsConfiguration & {
|
|
25
|
-
apiKey: string;
|
|
26
|
-
onResult?: (_v: {
|
|
27
|
-
toolCallId: string;
|
|
28
|
-
input: {
|
|
29
|
-
script: string;
|
|
30
|
-
[key: string]: unknown;
|
|
31
|
-
};
|
|
32
|
-
result: FreestyleExecuteScriptResultSuccess | HandleExecuteScriptError;
|
|
33
|
-
}) => void | Promise<void>;
|
|
34
|
-
truncateOutput?: boolean;
|
|
35
|
-
}) => Tool<z.ZodObject<{
|
|
36
|
-
script: z.ZodString;
|
|
37
|
-
}, "strip", z.ZodTypeAny, {
|
|
38
|
-
script?: string;
|
|
39
|
-
}, {
|
|
40
|
-
script?: string;
|
|
41
|
-
}>, FreestyleExecuteScriptResultSuccess | {
|
|
42
|
-
message: any;
|
|
43
|
-
error: any;
|
|
44
|
-
}> & {
|
|
45
|
-
execute: (args: {
|
|
46
|
-
script?: string;
|
|
47
|
-
}, options: ToolExecutionOptions) => PromiseLike<FreestyleExecuteScriptResultSuccess | {
|
|
48
|
-
message: any;
|
|
49
|
-
error: any;
|
|
50
|
-
}>;
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* Deploy a Web project
|
|
54
|
-
* @param config - Configuration for the tool
|
|
55
|
-
* @param config.apiKey - The API key to use
|
|
56
|
-
*/
|
|
57
|
-
declare const deployWebTool: (config: FreestyleDeployWebConfiguration & {
|
|
58
|
-
apiKey: string;
|
|
59
|
-
}) => Tool<z.ZodObject<{
|
|
60
|
-
files: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
61
|
-
}, "strip", z.ZodTypeAny, {
|
|
62
|
-
files?: Record<string, string>;
|
|
63
|
-
}, {
|
|
64
|
-
files?: Record<string, string>;
|
|
65
|
-
}>, string | {
|
|
66
|
-
deploymentId: string;
|
|
67
|
-
}> & {
|
|
68
|
-
execute: (args: {
|
|
69
|
-
files?: Record<string, string>;
|
|
70
|
-
}, options: ToolExecutionOptions) => PromiseLike<string | {
|
|
71
|
-
deploymentId: string;
|
|
72
|
-
}>;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
export { deployWebTool, executeCodeDescription, executeCodeSchema, executeTool };
|
package/dist/ai/index.cjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
require('../index.cjs');
|
|
4
|
-
var index = require('../index-DuOpIaWc.cjs');
|
|
5
|
-
require('zod');
|
|
6
|
-
require('@hey-api/client-fetch');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
exports.deployWebTool = index.deployWebTool;
|
|
11
|
-
exports.executeCodeDescription = index.executeCodeDescription;
|
|
12
|
-
exports.executeCodeSchema = index.executeCodeSchema;
|
|
13
|
-
exports.executeTool = index.executeTool;
|
package/dist/ai/index.d.cts
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { T as Tool, a as ToolExecutionOptions } from '../index.d-9H_wnIbz.js';
|
|
2
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, cn as HandleExecuteScriptError, b as FreestyleDeployWebConfiguration } from '../types.gen-CJa21P0C.js';
|
|
3
|
-
import { z } from 'zod';
|
|
4
|
-
import 'node:http';
|
|
5
|
-
import 'http';
|
|
6
|
-
|
|
7
|
-
declare const executeCodeSchema: z.ZodObject<{
|
|
8
|
-
script: z.ZodString;
|
|
9
|
-
}, "strip", z.ZodTypeAny, {
|
|
10
|
-
script?: string;
|
|
11
|
-
}, {
|
|
12
|
-
script?: string;
|
|
13
|
-
}>;
|
|
14
|
-
declare const executeCodeDescription: (envVars: string, nodeModules: string) => string;
|
|
15
|
-
/**
|
|
16
|
-
* Execute a JavaScript or TypeScript script
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* @param config - Configuration for the tool
|
|
20
|
-
* @param config.apiKey - The API key to use
|
|
21
|
-
* @param {Function} [config.onResult] - Optional callback function to handle the result.
|
|
22
|
-
* @param {boolean} [config.truncateOutput=false] - Whether to truncate the result to 1000 characters and truncate individual logs to the first 250 characters; useful to prevent long outputs from filling the context window.
|
|
23
|
-
*/
|
|
24
|
-
declare const executeTool: (config: FreestyleExecuteScriptParamsConfiguration & {
|
|
25
|
-
apiKey: string;
|
|
26
|
-
onResult?: (_v: {
|
|
27
|
-
toolCallId: string;
|
|
28
|
-
input: {
|
|
29
|
-
script: string;
|
|
30
|
-
[key: string]: unknown;
|
|
31
|
-
};
|
|
32
|
-
result: FreestyleExecuteScriptResultSuccess | HandleExecuteScriptError;
|
|
33
|
-
}) => void | Promise<void>;
|
|
34
|
-
truncateOutput?: boolean;
|
|
35
|
-
}) => Tool<z.ZodObject<{
|
|
36
|
-
script: z.ZodString;
|
|
37
|
-
}, "strip", z.ZodTypeAny, {
|
|
38
|
-
script?: string;
|
|
39
|
-
}, {
|
|
40
|
-
script?: string;
|
|
41
|
-
}>, FreestyleExecuteScriptResultSuccess | {
|
|
42
|
-
message: any;
|
|
43
|
-
error: any;
|
|
44
|
-
}> & {
|
|
45
|
-
execute: (args: {
|
|
46
|
-
script?: string;
|
|
47
|
-
}, options: ToolExecutionOptions) => PromiseLike<FreestyleExecuteScriptResultSuccess | {
|
|
48
|
-
message: any;
|
|
49
|
-
error: any;
|
|
50
|
-
}>;
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* Deploy a Web project
|
|
54
|
-
* @param config - Configuration for the tool
|
|
55
|
-
* @param config.apiKey - The API key to use
|
|
56
|
-
*/
|
|
57
|
-
declare const deployWebTool: (config: FreestyleDeployWebConfiguration & {
|
|
58
|
-
apiKey: string;
|
|
59
|
-
}) => Tool<z.ZodObject<{
|
|
60
|
-
files: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
61
|
-
}, "strip", z.ZodTypeAny, {
|
|
62
|
-
files?: Record<string, string>;
|
|
63
|
-
}, {
|
|
64
|
-
files?: Record<string, string>;
|
|
65
|
-
}>, string | {
|
|
66
|
-
deploymentId: string;
|
|
67
|
-
}> & {
|
|
68
|
-
execute: (args: {
|
|
69
|
-
files?: Record<string, string>;
|
|
70
|
-
}, options: ToolExecutionOptions) => PromiseLike<string | {
|
|
71
|
-
deploymentId: string;
|
|
72
|
-
}>;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
export { deployWebTool, executeCodeDescription, executeCodeSchema, executeTool };
|
package/dist/ai/index.d.mts
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { T as Tool, a as ToolExecutionOptions } from '../index.d-9H_wnIbz.js';
|
|
2
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, cn as HandleExecuteScriptError, b as FreestyleDeployWebConfiguration } from '../types.gen-CJa21P0C.js';
|
|
3
|
-
import { z } from 'zod';
|
|
4
|
-
import 'node:http';
|
|
5
|
-
import 'http';
|
|
6
|
-
|
|
7
|
-
declare const executeCodeSchema: z.ZodObject<{
|
|
8
|
-
script: z.ZodString;
|
|
9
|
-
}, "strip", z.ZodTypeAny, {
|
|
10
|
-
script?: string;
|
|
11
|
-
}, {
|
|
12
|
-
script?: string;
|
|
13
|
-
}>;
|
|
14
|
-
declare const executeCodeDescription: (envVars: string, nodeModules: string) => string;
|
|
15
|
-
/**
|
|
16
|
-
* Execute a JavaScript or TypeScript script
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* @param config - Configuration for the tool
|
|
20
|
-
* @param config.apiKey - The API key to use
|
|
21
|
-
* @param {Function} [config.onResult] - Optional callback function to handle the result.
|
|
22
|
-
* @param {boolean} [config.truncateOutput=false] - Whether to truncate the result to 1000 characters and truncate individual logs to the first 250 characters; useful to prevent long outputs from filling the context window.
|
|
23
|
-
*/
|
|
24
|
-
declare const executeTool: (config: FreestyleExecuteScriptParamsConfiguration & {
|
|
25
|
-
apiKey: string;
|
|
26
|
-
onResult?: (_v: {
|
|
27
|
-
toolCallId: string;
|
|
28
|
-
input: {
|
|
29
|
-
script: string;
|
|
30
|
-
[key: string]: unknown;
|
|
31
|
-
};
|
|
32
|
-
result: FreestyleExecuteScriptResultSuccess | HandleExecuteScriptError;
|
|
33
|
-
}) => void | Promise<void>;
|
|
34
|
-
truncateOutput?: boolean;
|
|
35
|
-
}) => Tool<z.ZodObject<{
|
|
36
|
-
script: z.ZodString;
|
|
37
|
-
}, "strip", z.ZodTypeAny, {
|
|
38
|
-
script?: string;
|
|
39
|
-
}, {
|
|
40
|
-
script?: string;
|
|
41
|
-
}>, FreestyleExecuteScriptResultSuccess | {
|
|
42
|
-
message: any;
|
|
43
|
-
error: any;
|
|
44
|
-
}> & {
|
|
45
|
-
execute: (args: {
|
|
46
|
-
script?: string;
|
|
47
|
-
}, options: ToolExecutionOptions) => PromiseLike<FreestyleExecuteScriptResultSuccess | {
|
|
48
|
-
message: any;
|
|
49
|
-
error: any;
|
|
50
|
-
}>;
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* Deploy a Web project
|
|
54
|
-
* @param config - Configuration for the tool
|
|
55
|
-
* @param config.apiKey - The API key to use
|
|
56
|
-
*/
|
|
57
|
-
declare const deployWebTool: (config: FreestyleDeployWebConfiguration & {
|
|
58
|
-
apiKey: string;
|
|
59
|
-
}) => Tool<z.ZodObject<{
|
|
60
|
-
files: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
61
|
-
}, "strip", z.ZodTypeAny, {
|
|
62
|
-
files?: Record<string, string>;
|
|
63
|
-
}, {
|
|
64
|
-
files?: Record<string, string>;
|
|
65
|
-
}>, string | {
|
|
66
|
-
deploymentId: string;
|
|
67
|
-
}> & {
|
|
68
|
-
execute: (args: {
|
|
69
|
-
files?: Record<string, string>;
|
|
70
|
-
}, options: ToolExecutionOptions) => PromiseLike<string | {
|
|
71
|
-
deploymentId: string;
|
|
72
|
-
}>;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
export { deployWebTool, executeCodeDescription, executeCodeSchema, executeTool };
|
package/dist/ai/index.mjs
DELETED
package/dist/expo/inde.d.cts
DELETED