@supertools-ai/core 0.1.3 → 0.1.4

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/README.md CHANGED
@@ -88,8 +88,8 @@ const getOrders = defineTool({
88
88
  status ? orders.filter(o => o.status === status) : orders,
89
89
  });
90
90
 
91
- // Main
92
- const sandbox = await Sandbox.create('supertools-bun').catch((e) => {
91
+ // Main - use "supertools-bun-014" E2B template - should match your supertools version
92
+ const sandbox = await Sandbox.create('supertools-bun-014').catch((e) => {
93
93
  console.error('Failed to create sandbox:', e);
94
94
  process.exit(1);
95
95
  });
@@ -131,6 +131,7 @@ const states = ['AL', 'AK', 'AZ', /* ... all 50 */];
131
131
  const results = {};
132
132
 
133
133
  for (const state of states) {
134
+ // be careful with this - using raw sql tool call can lead to injection or dangerous queries
134
135
  const data = await query_database({
135
136
  sql: `SELECT SUM(revenue) FROM sales WHERE state = '${state}'`
136
137
  });
@@ -182,7 +183,7 @@ import { supertools, defineTool, z } from '@supertools-ai/core';
182
183
  import { Sandbox } from 'e2b';
183
184
  import Anthropic from '@anthropic-ai/sdk';
184
185
 
185
- const sandbox = await Sandbox.create('supertools-bun');
186
+ const sandbox = await Sandbox.create('supertools-bun-014');
186
187
  const client = supertools(new Anthropic(), {
187
188
  // Required
188
189
  tools: [defineTool({ name, description, parameters, execute })],
@@ -269,7 +270,7 @@ const myAdapter = {
269
270
  },
270
271
  };
271
272
 
272
- const sandbox = await Sandbox.create('supertools-bun');
273
+ const sandbox = await Sandbox.create('supertools-bun-014');
273
274
  const executor = createExecutor({
274
275
  llm: myAdapter,
275
276
  tools: [/* your tools */],
@@ -343,7 +344,7 @@ console.log(result.result.output); // stdout from execution
343
344
  7. Results flow back to the sandbox, code continues executing
344
345
  8. Final output returns in the expected SDK response format
345
346
 
346
- > **Note:** The Relay Server runs inside the pre-built `supertools-bun` E2B template. The Relay Client is included in the `@supertools-ai/core` package and runs on your host.
347
+ > **Note:** The Relay Server runs inside the pre-built `supertools-bun-014` E2B template. The Relay Client is included in the `@supertools-ai/core` package and runs on your host.
347
348
 
348
349
  **Security:**
349
350
  - LLM-generated code runs in isolated cloud containers
@@ -1 +1 @@
1
- {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../src/executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AASH,OAAO,KAAK,EAAE,cAAc,EAAW,MAAM,QAAQ,CAAC;AAEtD,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,kBAAkB,EAAE,UAAU,EAAkB,MAAM,SAAS,CAAC;AAE/G,MAAM,WAAW,qBAAsB,SAAQ,cAAc;IAC3D,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC;CAC1B;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,oBAAoB,CAEnF;AAED,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAqB;IACnD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAmB;IACnD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA8B;IACvD,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAa;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;IAClC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAS;IACvC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAU;IAChC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAkC;gBAE/C,OAAO,EAAE,qBAAqB;IAW1C,OAAO,CAAC,IAAI;IAIN,GAAG,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IA6CrD,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;YAW3C,oBAAoB;IA8ClC,QAAQ,IAAI,SAAS,cAAc,EAAE;IAIrC,oBAAoB,IAAI,MAAM;YAIhB,YAAY;YA6BZ,YAAY;YA2BZ,OAAO;IAcrB,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@ -20,7 +20,7 @@
20
20
  * });
21
21
  *
22
22
  * // Create sandbox and wrap your SDK client
23
- * const sandbox = await Sandbox.create('supertools-bun');
23
+ * const sandbox = await Sandbox.create('supertools-bun-014');
24
24
  * const client = supertools(new Anthropic(), { tools: [queryDb], sandbox });
25
25
  *
26
26
  * // Use exactly like normal - tools execute automatically