freestyle-sandboxes 0.0.36 → 0.0.38

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  require('../index.cjs');
4
- var index = require('../index-CEEa9WHp.cjs');
4
+ var index = require('../index-H7UNEAjs.cjs');
5
5
  require('zod');
6
6
  require('@hey-api/client-fetch');
7
7
 
@@ -1,5 +1,5 @@
1
+ import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, aR as HandleExecuteScriptError, c as FreestyleDeployWebSuccessResponse } from '../types.gen-BuhQ5LpB.js';
1
2
  import { T as Tool, a as ToolExecutionOptions } from '../index.d-CXx1AdyW.js';
2
- import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, c as FreestyleDeployWebSuccessResponse } from '../types.gen-BuhQ5LpB.js';
3
3
  import { z } from 'zod';
4
4
  import 'node:http';
5
5
  import 'http';
@@ -18,10 +18,20 @@ declare const executeCodeDescription: (envVars: string, nodeModules: string) =>
18
18
  *
19
19
  * @param config - Configuration for the tool
20
20
  * @param config.apiKey - The API key to use
21
- *
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.
22
23
  */
23
24
  declare const executeTool: (config: FreestyleExecuteScriptParamsConfiguration & {
24
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;
25
35
  }) => Tool<z.ZodObject<{
26
36
  script: z.ZodString;
27
37
  }, "strip", z.ZodTypeAny, {
@@ -1,5 +1,5 @@
1
+ import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, aR as HandleExecuteScriptError, c as FreestyleDeployWebSuccessResponse } from '../types.gen-BuhQ5LpB.js';
1
2
  import { T as Tool, a as ToolExecutionOptions } from '../index.d-CXx1AdyW.js';
2
- import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, c as FreestyleDeployWebSuccessResponse } from '../types.gen-BuhQ5LpB.js';
3
3
  import { z } from 'zod';
4
4
  import 'node:http';
5
5
  import 'http';
@@ -18,10 +18,20 @@ declare const executeCodeDescription: (envVars: string, nodeModules: string) =>
18
18
  *
19
19
  * @param config - Configuration for the tool
20
20
  * @param config.apiKey - The API key to use
21
- *
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.
22
23
  */
23
24
  declare const executeTool: (config: FreestyleExecuteScriptParamsConfiguration & {
24
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;
25
35
  }) => Tool<z.ZodObject<{
26
36
  script: z.ZodString;
27
37
  }, "strip", z.ZodTypeAny, {
package/dist/ai/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
1
  import '../index.mjs';
2
- export { d as deployWebTool, e as executeCodeDescription, a as executeCodeSchema, b as executeTool } from '../index-BQHqnjZK.mjs';
2
+ export { d as deployWebTool, e as executeCodeDescription, a as executeCodeSchema, b as executeTool } from '../index-D1ulQeJR.mjs';
3
3
  import 'zod';
4
4
  import '@hey-api/client-fetch';