freestyle-sandboxes 0.0.35 → 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.
@@ -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('../ai/index.cjs');
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 core.createTool({
36
+ return createTool({
19
37
  id: "Execute a TypeScript or JavaScript Script",
20
38
  description,
21
39
  execute: async ({ context: { script } }) => {