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.
Files changed (69) hide show
  1. package/README.md +39 -48
  2. package/index.cjs +4381 -0
  3. package/index.d.cts +9404 -0
  4. package/index.d.mts +9404 -0
  5. package/index.mjs +4367 -0
  6. package/package.json +16 -109
  7. package/dist/ai/inde.d.cts +0 -75
  8. package/dist/ai/inde.d.mts +0 -75
  9. package/dist/ai/index.cjs +0 -13
  10. package/dist/ai/index.d.cts +0 -75
  11. package/dist/ai/index.d.mts +0 -75
  12. package/dist/ai/index.mjs +0 -4
  13. package/dist/expo/inde.d.cts +0 -6
  14. package/dist/expo/inde.d.mts +0 -6
  15. package/dist/expo/index.cjs +0 -319
  16. package/dist/expo/index.d.cts +0 -6
  17. package/dist/expo/index.d.mts +0 -6
  18. package/dist/expo/index.mjs +0 -297
  19. package/dist/inde.d.cts +0 -373
  20. package/dist/inde.d.mts +0 -373
  21. package/dist/index-BKAG8L-o.mjs +0 -3061
  22. package/dist/index-DuOpIaWc.cjs +0 -3068
  23. package/dist/index.cjs +0 -1329
  24. package/dist/index.d-9H_wnIbz.d.ts +0 -4223
  25. package/dist/index.d.cts +0 -373
  26. package/dist/index.d.mts +0 -373
  27. package/dist/index.mjs +0 -1327
  28. package/dist/langgraph/inde.d.cts +0 -4180
  29. package/dist/langgraph/inde.d.mts +0 -4180
  30. package/dist/langgraph/index.cjs +0 -17155
  31. package/dist/langgraph/index.d.cts +0 -4180
  32. package/dist/langgraph/index.d.mts +0 -4180
  33. package/dist/langgraph/index.mjs +0 -17153
  34. package/dist/mastra/inde.d.cts +0 -2623
  35. package/dist/mastra/inde.d.mts +0 -2623
  36. package/dist/mastra/index.cjs +0 -55
  37. package/dist/mastra/index.d.cts +0 -2623
  38. package/dist/mastra/index.d.mts +0 -2623
  39. package/dist/mastra/index.mjs +0 -53
  40. package/dist/react/dev-server/index..d.cts +0 -33
  41. package/dist/react/dev-server/index..d.mts +0 -33
  42. package/dist/react/dev-server/index.cjs +0 -148
  43. package/dist/react/dev-server/index.d.cts +0 -33
  44. package/dist/react/dev-server/index.d.mts +0 -33
  45. package/dist/react/dev-server/index.mjs +0 -145
  46. package/dist/types.gen-CJa21P0C.d.ts +0 -1902
  47. package/dist/types.gen-DKjMRuu5.d.ts +0 -1898
  48. package/dist/utils/inde.d.cts +0 -10
  49. package/dist/utils/inde.d.mts +0 -10
  50. package/dist/utils/index.cjs +0 -100
  51. package/dist/utils/index.d.cts +0 -10
  52. package/dist/utils/index.d.mts +0 -10
  53. package/dist/utils/index.mjs +0 -75
  54. package/openapi/index.ts +0 -3
  55. package/openapi/sdk.gen.ts +0 -929
  56. package/openapi/types.gen.ts +0 -2234
  57. package/openapi-ts.config.ts +0 -7
  58. package/openapi.json +0 -1
  59. package/src/ai/index.ts +0 -164
  60. package/src/dev-server.ts +0 -95
  61. package/src/expo/_expo_internals.ts +0 -389
  62. package/src/expo/index.ts +0 -26
  63. package/src/index.ts +0 -1459
  64. package/src/langgraph/index.ts +0 -33
  65. package/src/mastra/index.ts +0 -38
  66. package/src/react/dev-server/index.tsx +0 -195
  67. package/src/react/dev-server/types.ts +0 -5
  68. package/src/utils/index.ts +0 -97
  69. package/tsconfig.json +0 -8
package/package.json CHANGED
@@ -1,111 +1,18 @@
1
1
  {
2
- "name": "freestyle-sandboxes",
3
- "version": "0.0.97",
4
- "type": "module",
5
- "main": "./dist/index.cjs",
6
- "module": "./dist/index.mjs",
7
- "types": "./dist/index.d.cts",
8
- "exports": {
9
- ".": {
10
- "require": {
11
- "types": "./dist/index.d.cts",
12
- "default": "./dist/index.cjs"
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
- "./ai": {
20
- "require": {
21
- "types": "./dist/ai/index.d.cts",
22
- "default": "./dist/ai/index.cjs"
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
+ }
@@ -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 };
@@ -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;
@@ -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 };
@@ -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
@@ -1,4 +0,0 @@
1
- import '../index.mjs';
2
- export { d as deployWebTool, e as executeCodeDescription, a as executeCodeSchema, b as executeTool } from '../index-BKAG8L-o.mjs';
3
- import 'zod';
4
- import '@hey-api/client-fetch';
@@ -1,6 +0,0 @@
1
- declare const freestyleExpoServer: ({ CLIENT_BUILD_DIR, SERVER_BUILD_DIR, }?: {
2
- CLIENT_BUILD_DIR?: string;
3
- SERVER_BUILD_DIR?: string;
4
- }) => void;
5
-
6
- export { freestyleExpoServer };
@@ -1,6 +0,0 @@
1
- declare const freestyleExpoServer: ({ CLIENT_BUILD_DIR, SERVER_BUILD_DIR, }?: {
2
- CLIENT_BUILD_DIR?: string;
3
- SERVER_BUILD_DIR?: string;
4
- }) => void;
5
-
6
- export { freestyleExpoServer };