freestyle-sandboxes 0.0.17 → 0.0.18
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/index.cjs +1 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.mjs +1 -0
- package/dist/langgraph/index.cjs +27 -0
- package/dist/langgraph/index.d.cts +8 -0
- package/dist/langgraph/index.d.mts +8 -0
- package/dist/langgraph/index.mjs +25 -0
- package/package.json +13 -1
- package/src/index.ts +1 -0
- package/src/langgraph/index.ts +27 -0
package/dist/index.cjs
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -64,6 +64,7 @@ declare class FreestyleSandboxes {
|
|
|
64
64
|
listWebDeployments(): Promise<HandleListWebDeploysResponse>;
|
|
65
65
|
listExecuteRuns(): Promise<HandleListExecuteRunsResponse>;
|
|
66
66
|
getExecuteRun(id: string): Promise<HandleGetExecuteRunResponse>;
|
|
67
|
+
/** Provision a wildcard certificate for domain. */
|
|
67
68
|
provisionWildcard(domain: string): Promise<HandleVerifyWildcardResponse>;
|
|
68
69
|
}
|
|
69
70
|
|
package/dist/index.d.mts
CHANGED
|
@@ -64,6 +64,7 @@ declare class FreestyleSandboxes {
|
|
|
64
64
|
listWebDeployments(): Promise<HandleListWebDeploysResponse>;
|
|
65
65
|
listExecuteRuns(): Promise<HandleListExecuteRunsResponse>;
|
|
66
66
|
getExecuteRun(id: string): Promise<HandleGetExecuteRunResponse>;
|
|
67
|
+
/** Provision a wildcard certificate for domain. */
|
|
67
68
|
provisionWildcard(domain: string): Promise<HandleVerifyWildcardResponse>;
|
|
68
69
|
}
|
|
69
70
|
|
package/dist/index.mjs
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('../index.cjs');
|
|
4
|
+
var tools = require('@langchain/core/tools');
|
|
5
|
+
var index$1 = require('../ai/index.cjs');
|
|
6
|
+
require('@hey-api/client-fetch');
|
|
7
|
+
require('ai');
|
|
8
|
+
require('zod');
|
|
9
|
+
|
|
10
|
+
const executeTool = (config) => {
|
|
11
|
+
const client = new index.FreestyleSandboxes({
|
|
12
|
+
apiKey: config.apiKey
|
|
13
|
+
});
|
|
14
|
+
return new tools.DynamicStructuredTool({
|
|
15
|
+
name: "executeTool",
|
|
16
|
+
description: index$1.executeCodeDescription(
|
|
17
|
+
Object.keys(config.envVars ?? {}).join(", "),
|
|
18
|
+
Object.keys(config.nodeModules ?? {}).join(", ")
|
|
19
|
+
),
|
|
20
|
+
schema: index$1.executeCodeSchema,
|
|
21
|
+
func: async ({ script }) => {
|
|
22
|
+
return await client.executeScript(script, config);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.executeTool = executeTool;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration } from '../types.gen-C03gaIPq.js';
|
|
2
|
+
import { DynamicStructuredTool } from '@langchain/core/tools';
|
|
3
|
+
|
|
4
|
+
declare const executeTool: (config: FreestyleExecuteScriptParamsConfiguration & {
|
|
5
|
+
apiKey: string;
|
|
6
|
+
}) => DynamicStructuredTool;
|
|
7
|
+
|
|
8
|
+
export { executeTool };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration } from '../types.gen-C03gaIPq.js';
|
|
2
|
+
import { DynamicStructuredTool } from '@langchain/core/tools';
|
|
3
|
+
|
|
4
|
+
declare const executeTool: (config: FreestyleExecuteScriptParamsConfiguration & {
|
|
5
|
+
apiKey: string;
|
|
6
|
+
}) => DynamicStructuredTool;
|
|
7
|
+
|
|
8
|
+
export { executeTool };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FreestyleSandboxes } from '../index.mjs';
|
|
2
|
+
import { DynamicStructuredTool } from '@langchain/core/tools';
|
|
3
|
+
import { executeCodeDescription, executeCodeSchema } from '../ai/index.mjs';
|
|
4
|
+
import '@hey-api/client-fetch';
|
|
5
|
+
import 'ai';
|
|
6
|
+
import 'zod';
|
|
7
|
+
|
|
8
|
+
const executeTool = (config) => {
|
|
9
|
+
const client = new FreestyleSandboxes({
|
|
10
|
+
apiKey: config.apiKey
|
|
11
|
+
});
|
|
12
|
+
return new DynamicStructuredTool({
|
|
13
|
+
name: "executeTool",
|
|
14
|
+
description: executeCodeDescription(
|
|
15
|
+
Object.keys(config.envVars ?? {}).join(", "),
|
|
16
|
+
Object.keys(config.nodeModules ?? {}).join(", ")
|
|
17
|
+
),
|
|
18
|
+
schema: executeCodeSchema,
|
|
19
|
+
func: async ({ script }) => {
|
|
20
|
+
return await client.executeScript(script, config);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { executeTool };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "freestyle-sandboxes",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -35,6 +35,16 @@
|
|
|
35
35
|
"types": "./dist/mastra/index.d.mts",
|
|
36
36
|
"default": "./dist/mastra/index.mjs"
|
|
37
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
|
+
}
|
|
38
48
|
}
|
|
39
49
|
},
|
|
40
50
|
"scripts": {
|
|
@@ -51,6 +61,8 @@
|
|
|
51
61
|
},
|
|
52
62
|
"dependencies": {
|
|
53
63
|
"@hey-api/client-fetch": "^0.5.7",
|
|
64
|
+
"@langchain/core": "^0.3.38",
|
|
65
|
+
"@langchain/langgraph": "^0.2.44",
|
|
54
66
|
"@mastra/core": "^0.1.27-alpha.66",
|
|
55
67
|
"ai": "^4.0.25",
|
|
56
68
|
"humanlayer": "^0.7.0",
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { FreestyleExecuteScriptParamsConfiguration } from "../../openapi";
|
|
2
|
+
import { FreestyleSandboxes } from "..";
|
|
3
|
+
import { DynamicStructuredTool, tool } from "@langchain/core/tools";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { executeCodeDescription, executeCodeSchema } from "../ai";
|
|
6
|
+
|
|
7
|
+
export const executeTool = (
|
|
8
|
+
config: FreestyleExecuteScriptParamsConfiguration & {
|
|
9
|
+
apiKey: string;
|
|
10
|
+
}
|
|
11
|
+
): DynamicStructuredTool => {
|
|
12
|
+
const client = new FreestyleSandboxes({
|
|
13
|
+
apiKey: config.apiKey,
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
return new DynamicStructuredTool({
|
|
17
|
+
name: "executeTool",
|
|
18
|
+
description: executeCodeDescription(
|
|
19
|
+
Object.keys(config.envVars ?? {}).join(", "),
|
|
20
|
+
Object.keys(config.nodeModules ?? {}).join(", ")
|
|
21
|
+
),
|
|
22
|
+
schema: executeCodeSchema,
|
|
23
|
+
func: async ({ script }) => {
|
|
24
|
+
return await client.executeScript(script, config);
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
};
|