freestyle-sandboxes 0.0.97 → 0.1.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/README.md +39 -48
- package/index.cjs +4362 -0
- package/index.d.cts +9401 -0
- package/index.d.mts +9401 -0
- package/index.mjs +4348 -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/dist/mastra/index.cjs
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var zod = require('zod');
|
|
4
|
-
var index = require('../index-DuOpIaWc.cjs');
|
|
5
|
-
var index$1 = require('../index.cjs');
|
|
6
|
-
require('@hey-api/client-fetch');
|
|
7
|
-
|
|
8
|
-
var Tool = class {
|
|
9
|
-
id;
|
|
10
|
-
description;
|
|
11
|
-
inputSchema;
|
|
12
|
-
outputSchema;
|
|
13
|
-
execute;
|
|
14
|
-
mastra;
|
|
15
|
-
constructor(opts) {
|
|
16
|
-
this.id = opts.id;
|
|
17
|
-
this.description = opts.description;
|
|
18
|
-
this.inputSchema = opts.inputSchema;
|
|
19
|
-
this.outputSchema = opts.outputSchema;
|
|
20
|
-
this.execute = opts.execute;
|
|
21
|
-
this.mastra = opts.mastra;
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
function createTool(opts) {
|
|
25
|
-
return new Tool(opts);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const executeTool = (config) => {
|
|
29
|
-
const description = index.executeCodeDescription(
|
|
30
|
-
Object.keys(config.envVars ?? {}).join(", "),
|
|
31
|
-
Object.keys(config.nodeModules ?? {}).join(", ")
|
|
32
|
-
);
|
|
33
|
-
const client = new index$1.FreestyleSandboxes({
|
|
34
|
-
apiKey: config.apiKey
|
|
35
|
-
});
|
|
36
|
-
return createTool({
|
|
37
|
-
id: "Execute a TypeScript or JavaScript Script",
|
|
38
|
-
description,
|
|
39
|
-
execute: async ({ context: { script } }) => {
|
|
40
|
-
return await client.executeScript(script, config);
|
|
41
|
-
},
|
|
42
|
-
inputSchema: index.executeCodeSchema,
|
|
43
|
-
outputSchema: zod.z.object({
|
|
44
|
-
logs: zod.z.array(
|
|
45
|
-
zod.z.object({
|
|
46
|
-
message: zod.z.string(),
|
|
47
|
-
type: zod.z.string()
|
|
48
|
-
})
|
|
49
|
-
),
|
|
50
|
-
result: zod.z.unknown()
|
|
51
|
-
})
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
exports.executeTool = executeTool;
|