freestyle-sandboxes 0.0.34 → 0.0.36
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/ai/index.cjs +7 -98
- package/dist/ai/index.d.cts +7 -5
- package/dist/ai/index.d.mts +7 -5
- package/dist/ai/index.mjs +3 -98
- package/dist/index-BQHqnjZK.mjs +3231 -0
- package/dist/index-CEEa9WHp.cjs +3238 -0
- package/dist/index.d-CXx1AdyW.d.ts +4210 -0
- package/dist/langgraph/index.cjs +14484 -9
- package/dist/langgraph/index.d.cts +2155 -1
- package/dist/langgraph/index.d.mts +2155 -1
- package/dist/langgraph/index.mjs +14479 -4
- package/dist/mastra/index.cjs +22 -4
- package/dist/mastra/index.d.cts +2582 -5
- package/dist/mastra/index.d.mts +2582 -5
- package/dist/mastra/index.mjs +21 -3
- package/dist/utils/index.cjs +7 -5
- package/dist/utils/index.mjs +6 -4
- package/package.json +6 -6
- package/src/utils/index.ts +2 -0
package/dist/mastra/index.cjs
CHANGED
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var core = require('@mastra/core');
|
|
4
3
|
var zod = require('zod');
|
|
5
|
-
var index = require('../
|
|
4
|
+
var index = require('../index-CEEa9WHp.cjs');
|
|
6
5
|
var index$1 = require('../index.cjs');
|
|
7
|
-
require('ai');
|
|
8
6
|
require('@hey-api/client-fetch');
|
|
9
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
|
+
|
|
10
28
|
const executeTool = (config) => {
|
|
11
29
|
const description = index.executeCodeDescription(
|
|
12
30
|
Object.keys(config.envVars ?? {}).join(", "),
|
|
@@ -15,7 +33,7 @@ const executeTool = (config) => {
|
|
|
15
33
|
const client = new index$1.FreestyleSandboxes({
|
|
16
34
|
apiKey: config.apiKey
|
|
17
35
|
});
|
|
18
|
-
return
|
|
36
|
+
return createTool({
|
|
19
37
|
id: "Execute a TypeScript or JavaScript Script",
|
|
20
38
|
description,
|
|
21
39
|
execute: async ({ context: { script } }) => {
|