@robota-sdk/agent-tools 3.0.0-beta.61 → 3.0.0-beta.62
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/browser/browser.d.ts +268 -0
- package/dist/browser/browser.js +1 -0
- package/dist/node/index.cjs +123 -220
- package/dist/node/index.js +60 -126
- package/package.json +9 -6
package/dist/node/index.js
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
import { readFile, readdir, stat, mkdir, writeFile, chmod, rename, rm } from 'fs/promises';
|
|
2
|
+
import { join, posix, isAbsolute, resolve, dirname, basename } from 'path';
|
|
3
|
+
import { ValidationError, ToolExecutionError, logger } from '@robota-sdk/agent-core';
|
|
4
|
+
import { spawn } from 'child_process';
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
import { randomBytes } from 'crypto';
|
|
7
|
+
import fg from 'fast-glob';
|
|
8
|
+
|
|
1
9
|
// src/sandbox/e2b-sandbox-client.ts
|
|
2
10
|
var E2BSandboxClient = class {
|
|
3
11
|
sandbox;
|
|
@@ -112,10 +120,6 @@ var InMemorySandboxClient = class {
|
|
|
112
120
|
return this.files.get(path);
|
|
113
121
|
}
|
|
114
122
|
};
|
|
115
|
-
|
|
116
|
-
// src/sandbox/workspace-manifest.ts
|
|
117
|
-
import { readdir, readFile } from "fs/promises";
|
|
118
|
-
import { isAbsolute, join, posix, resolve } from "path";
|
|
119
123
|
var DEFAULT_TARGET_ROOT = "/workspace";
|
|
120
124
|
var WINDOWS_ABSOLUTE_PATH_PATTERN = /^[A-Za-z]:[\\/]/;
|
|
121
125
|
var SHELL_QUOTE_PATTERN = /'/g;
|
|
@@ -266,10 +270,6 @@ function quoteShellArg(value) {
|
|
|
266
270
|
function assertUnreachable(value) {
|
|
267
271
|
throw new Error(`unsupported workspace manifest entry: ${JSON.stringify(value)}`);
|
|
268
272
|
}
|
|
269
|
-
|
|
270
|
-
// src/registry/tool-registry.ts
|
|
271
|
-
import { ValidationError } from "@robota-sdk/agent-core";
|
|
272
|
-
import { logger } from "@robota-sdk/agent-core";
|
|
273
273
|
var ToolRegistry = class {
|
|
274
274
|
tools = /* @__PURE__ */ new Map();
|
|
275
275
|
/**
|
|
@@ -409,9 +409,6 @@ var ToolRegistry = class {
|
|
|
409
409
|
}
|
|
410
410
|
};
|
|
411
411
|
|
|
412
|
-
// src/implementations/function-tool.ts
|
|
413
|
-
import { ToolExecutionError, ValidationError as ValidationError2 } from "@robota-sdk/agent-core";
|
|
414
|
-
|
|
415
412
|
// src/implementations/function-tool/schema-converter.ts
|
|
416
413
|
function zodToJsonSchema(schema, options = {}) {
|
|
417
414
|
const properties = {};
|
|
@@ -645,14 +642,14 @@ var FunctionTool = class {
|
|
|
645
642
|
this.schema.parameters.properties || {},
|
|
646
643
|
this.schema.parameters.additionalProperties
|
|
647
644
|
);
|
|
648
|
-
throw new
|
|
645
|
+
throw new ValidationError(`Invalid parameters for tool "${toolName}": ${errors.join(", ")}`);
|
|
649
646
|
}
|
|
650
647
|
const startTime = Date.now();
|
|
651
648
|
let result;
|
|
652
649
|
try {
|
|
653
650
|
result = await this.fn(parameters, context);
|
|
654
651
|
} catch (error) {
|
|
655
|
-
if (error instanceof ToolExecutionError || error instanceof
|
|
652
|
+
if (error instanceof ToolExecutionError || error instanceof ValidationError) {
|
|
656
653
|
throw error;
|
|
657
654
|
}
|
|
658
655
|
throw new ToolExecutionError(
|
|
@@ -709,13 +706,13 @@ var FunctionTool = class {
|
|
|
709
706
|
*/
|
|
710
707
|
validateConstructorInputs() {
|
|
711
708
|
if (!this.schema) {
|
|
712
|
-
throw new
|
|
709
|
+
throw new ValidationError("Tool schema is required");
|
|
713
710
|
}
|
|
714
711
|
if (!this.fn || typeof this.fn !== "function") {
|
|
715
|
-
throw new
|
|
712
|
+
throw new ValidationError("Tool function is required and must be a function");
|
|
716
713
|
}
|
|
717
714
|
if (!this.schema.name) {
|
|
718
|
-
throw new
|
|
715
|
+
throw new ValidationError("Tool schema must have a name");
|
|
719
716
|
}
|
|
720
717
|
}
|
|
721
718
|
};
|
|
@@ -737,7 +734,7 @@ function createZodFunctionTool(name, description, zodSchema, fn) {
|
|
|
737
734
|
const wrappedFn = async (parameters2, context) => {
|
|
738
735
|
const parseResult = zodSchema.safeParse(parameters2);
|
|
739
736
|
if (!parseResult.success) {
|
|
740
|
-
throw new
|
|
737
|
+
throw new ValidationError(`Zod validation failed: ${parseResult.error}`);
|
|
741
738
|
}
|
|
742
739
|
const result = await fn(parseResult.data || parameters2, context);
|
|
743
740
|
return typeof result === "string" ? result : JSON.stringify(result);
|
|
@@ -745,9 +742,6 @@ function createZodFunctionTool(name, description, zodSchema, fn) {
|
|
|
745
742
|
return new FunctionTool(schema, wrappedFn);
|
|
746
743
|
}
|
|
747
744
|
|
|
748
|
-
// src/implementations/openapi-tool.ts
|
|
749
|
-
import { ToolExecutionError as ToolExecutionError2, ValidationError as ValidationError3 } from "@robota-sdk/agent-core";
|
|
750
|
-
|
|
751
745
|
// src/implementations/openapi-schema-converter.ts
|
|
752
746
|
var HTTP_METHODS = [
|
|
753
747
|
"get",
|
|
@@ -899,7 +893,7 @@ var OpenAPITool = class {
|
|
|
899
893
|
const toolName = this.schema.name;
|
|
900
894
|
const validation = this.validateParameters(parameters);
|
|
901
895
|
if (!validation.isValid) {
|
|
902
|
-
throw new
|
|
896
|
+
throw new ValidationError(
|
|
903
897
|
`Invalid parameters for OpenAPI tool "${toolName}": ${validation.errors.join(", ")}`
|
|
904
898
|
);
|
|
905
899
|
}
|
|
@@ -918,11 +912,11 @@ var OpenAPITool = class {
|
|
|
918
912
|
}
|
|
919
913
|
};
|
|
920
914
|
} catch (error) {
|
|
921
|
-
if (error instanceof
|
|
915
|
+
if (error instanceof ToolExecutionError || error instanceof ValidationError) {
|
|
922
916
|
throw error;
|
|
923
917
|
}
|
|
924
918
|
const safeError = error instanceof Error ? error : new Error(String(error));
|
|
925
|
-
throw new
|
|
919
|
+
throw new ToolExecutionError(
|
|
926
920
|
`OpenAPI tool execution failed: ${safeError.message}`,
|
|
927
921
|
toolName,
|
|
928
922
|
safeError,
|
|
@@ -1069,10 +1063,6 @@ var OpenAPITool = class {
|
|
|
1069
1063
|
function createOpenAPITool(config) {
|
|
1070
1064
|
return new OpenAPITool(config);
|
|
1071
1065
|
}
|
|
1072
|
-
|
|
1073
|
-
// src/builtins/bash-tool.ts
|
|
1074
|
-
import { spawn } from "child_process";
|
|
1075
|
-
import { z } from "zod";
|
|
1076
1066
|
var DEFAULT_TIMEOUT_MS = 12e4;
|
|
1077
1067
|
var BashSchema = z.object({
|
|
1078
1068
|
command: z.string().describe("The bash command to execute"),
|
|
@@ -1178,17 +1168,13 @@ function createBashTool(options = {}) {
|
|
|
1178
1168
|
);
|
|
1179
1169
|
}
|
|
1180
1170
|
var bashTool = createBashTool();
|
|
1181
|
-
|
|
1182
|
-
// src/builtins/read-tool.ts
|
|
1183
|
-
import { readFile as readFile2, stat } from "fs/promises";
|
|
1184
|
-
import { z as z2 } from "zod";
|
|
1185
1171
|
var DEFAULT_LIMIT = 2e3;
|
|
1186
|
-
var ReadSchema =
|
|
1187
|
-
filePath:
|
|
1188
|
-
offset:
|
|
1172
|
+
var ReadSchema = z.object({
|
|
1173
|
+
filePath: z.string().describe("The absolute path to the file to read"),
|
|
1174
|
+
offset: z.number().optional().describe(
|
|
1189
1175
|
"The line number to start reading from (1-based). Only provide if the file is too large to read at once"
|
|
1190
1176
|
),
|
|
1191
|
-
limit:
|
|
1177
|
+
limit: z.number().optional().describe(
|
|
1192
1178
|
`The number of lines to read (default: ${DEFAULT_LIMIT}). Only provide if the file is too large to read at once`
|
|
1193
1179
|
)
|
|
1194
1180
|
});
|
|
@@ -1263,7 +1249,7 @@ async function readFileTool(args, options = {}) {
|
|
|
1263
1249
|
}
|
|
1264
1250
|
let buffer;
|
|
1265
1251
|
try {
|
|
1266
|
-
buffer = await
|
|
1252
|
+
buffer = await readFile(filePath);
|
|
1267
1253
|
} catch (err) {
|
|
1268
1254
|
const result = {
|
|
1269
1255
|
success: false,
|
|
@@ -1294,14 +1280,6 @@ function createReadTool(options = {}) {
|
|
|
1294
1280
|
);
|
|
1295
1281
|
}
|
|
1296
1282
|
var readTool = createReadTool();
|
|
1297
|
-
|
|
1298
|
-
// src/builtins/write-tool.ts
|
|
1299
|
-
import { z as z3 } from "zod";
|
|
1300
|
-
|
|
1301
|
-
// src/builtins/atomic-file-write.ts
|
|
1302
|
-
import { randomBytes } from "crypto";
|
|
1303
|
-
import { chmod, mkdir, rename, rm, stat as stat2, writeFile } from "fs/promises";
|
|
1304
|
-
import { basename, dirname, join as join2 } from "path";
|
|
1305
1283
|
var TEMP_RANDOM_BYTES = 6;
|
|
1306
1284
|
var PRESERVED_MODE_BITS = 4095;
|
|
1307
1285
|
var MISSING_FILE_ERROR_CODE = "ENOENT";
|
|
@@ -1309,11 +1287,11 @@ function createTempFilePath(filePath) {
|
|
|
1309
1287
|
const dir = dirname(filePath);
|
|
1310
1288
|
const name = basename(filePath);
|
|
1311
1289
|
const suffix = randomBytes(TEMP_RANDOM_BYTES).toString("hex");
|
|
1312
|
-
return
|
|
1290
|
+
return join(dir, `.${name}.robota-tmp-${process.pid}-${Date.now()}-${suffix}`);
|
|
1313
1291
|
}
|
|
1314
1292
|
async function readExistingMode(filePath) {
|
|
1315
1293
|
try {
|
|
1316
|
-
const fileStats = await
|
|
1294
|
+
const fileStats = await stat(filePath);
|
|
1317
1295
|
return fileStats.mode & PRESERVED_MODE_BITS;
|
|
1318
1296
|
} catch (error) {
|
|
1319
1297
|
if (error instanceof Error && hasErrorCode(error, MISSING_FILE_ERROR_CODE)) return void 0;
|
|
@@ -1341,9 +1319,9 @@ async function atomicWriteUtf8File(filePath, content) {
|
|
|
1341
1319
|
}
|
|
1342
1320
|
|
|
1343
1321
|
// src/builtins/write-tool.ts
|
|
1344
|
-
var WriteSchema =
|
|
1345
|
-
filePath:
|
|
1346
|
-
content:
|
|
1322
|
+
var WriteSchema = z.object({
|
|
1323
|
+
filePath: z.string().describe("The absolute path to the file to write"),
|
|
1324
|
+
content: z.string().describe("The content to write to the file")
|
|
1347
1325
|
});
|
|
1348
1326
|
async function writeFileTool(args, options = {}) {
|
|
1349
1327
|
const { filePath, content } = args;
|
|
@@ -1378,15 +1356,11 @@ function createWriteTool(options = {}) {
|
|
|
1378
1356
|
);
|
|
1379
1357
|
}
|
|
1380
1358
|
var writeTool = createWriteTool();
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
filePath: z4.string().describe("The absolute path to the file to modify"),
|
|
1387
|
-
oldString: z4.string().describe("The text to replace (must be an exact match of existing content)"),
|
|
1388
|
-
newString: z4.string().describe("The text to replace it with (must be different from old_string)"),
|
|
1389
|
-
replaceAll: z4.boolean().optional().describe(
|
|
1359
|
+
var EditSchema = z.object({
|
|
1360
|
+
filePath: z.string().describe("The absolute path to the file to modify"),
|
|
1361
|
+
oldString: z.string().describe("The text to replace (must be an exact match of existing content)"),
|
|
1362
|
+
newString: z.string().describe("The text to replace it with (must be different from old_string)"),
|
|
1363
|
+
replaceAll: z.boolean().optional().describe(
|
|
1390
1364
|
"Replace all occurrences of old_string (default: false). Useful for renaming variables"
|
|
1391
1365
|
)
|
|
1392
1366
|
});
|
|
@@ -1394,7 +1368,7 @@ async function editFileTool(args, options = {}) {
|
|
|
1394
1368
|
const { filePath, oldString, newString, replaceAll = false } = args;
|
|
1395
1369
|
let content;
|
|
1396
1370
|
try {
|
|
1397
|
-
content = options.sandboxClient ? await options.sandboxClient.readFile(filePath) : await
|
|
1371
|
+
content = options.sandboxClient ? await options.sandboxClient.readFile(filePath) : await readFile(filePath, "utf8");
|
|
1398
1372
|
} catch (err) {
|
|
1399
1373
|
const result2 = {
|
|
1400
1374
|
success: false,
|
|
@@ -1460,25 +1434,19 @@ function createEditTool(options = {}) {
|
|
|
1460
1434
|
);
|
|
1461
1435
|
}
|
|
1462
1436
|
var editTool = createEditTool();
|
|
1463
|
-
|
|
1464
|
-
// src/builtins/glob-tool.ts
|
|
1465
|
-
import { stat as stat3 } from "fs/promises";
|
|
1466
|
-
import { resolve as resolve2 } from "path";
|
|
1467
|
-
import fg from "fast-glob";
|
|
1468
|
-
import { z as z5 } from "zod";
|
|
1469
1437
|
var DEFAULT_MAX_RESULTS = 1e3;
|
|
1470
|
-
var GlobSchema =
|
|
1471
|
-
pattern:
|
|
1472
|
-
path:
|
|
1438
|
+
var GlobSchema = z.object({
|
|
1439
|
+
pattern: z.string().describe('The glob pattern to match files against (e.g. "**/*.ts", "src/**/*.tsx")'),
|
|
1440
|
+
path: z.string().optional().describe(
|
|
1473
1441
|
"The directory to search in. Defaults to the current working directory. Must be a valid directory path if provided"
|
|
1474
1442
|
),
|
|
1475
|
-
limit:
|
|
1443
|
+
limit: z.number().optional().describe(
|
|
1476
1444
|
"Maximum number of results to return (default: 1000). Use a smaller limit to save context space"
|
|
1477
1445
|
)
|
|
1478
1446
|
});
|
|
1479
1447
|
async function globFileTool(args) {
|
|
1480
1448
|
const { pattern, path: basePath } = args;
|
|
1481
|
-
const cwd = basePath ?
|
|
1449
|
+
const cwd = basePath ? resolve(basePath) : process.cwd();
|
|
1482
1450
|
let matches;
|
|
1483
1451
|
try {
|
|
1484
1452
|
matches = await fg(pattern, {
|
|
@@ -1497,9 +1465,9 @@ async function globFileTool(args) {
|
|
|
1497
1465
|
}
|
|
1498
1466
|
const withMtime = await Promise.all(
|
|
1499
1467
|
matches.map(async (p) => {
|
|
1500
|
-
const absPath =
|
|
1468
|
+
const absPath = resolve(cwd, p);
|
|
1501
1469
|
try {
|
|
1502
|
-
const s = await
|
|
1470
|
+
const s = await stat(absPath);
|
|
1503
1471
|
return { path: p, mtime: s.mtimeMs };
|
|
1504
1472
|
} catch {
|
|
1505
1473
|
return { path: p, mtime: 0 };
|
|
@@ -1532,21 +1500,16 @@ var globTool = createZodFunctionTool(
|
|
|
1532
1500
|
return globFileTool(params);
|
|
1533
1501
|
}
|
|
1534
1502
|
);
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
import { z as z6 } from "zod";
|
|
1540
|
-
var GrepSchema = z6.object({
|
|
1541
|
-
pattern: z6.string().describe("The regular expression pattern to search for in file contents"),
|
|
1542
|
-
path: z6.string().optional().describe("File or directory to search in. Defaults to the current working directory"),
|
|
1543
|
-
glob: z6.string().optional().describe(
|
|
1503
|
+
var GrepSchema = z.object({
|
|
1504
|
+
pattern: z.string().describe("The regular expression pattern to search for in file contents"),
|
|
1505
|
+
path: z.string().optional().describe("File or directory to search in. Defaults to the current working directory"),
|
|
1506
|
+
glob: z.string().optional().describe(
|
|
1544
1507
|
'Glob pattern to filter files (e.g. "*.ts", "*.{ts,tsx}"). Only files matching this pattern will be searched'
|
|
1545
1508
|
),
|
|
1546
|
-
contextLines:
|
|
1509
|
+
contextLines: z.number().optional().describe(
|
|
1547
1510
|
'Number of context lines to show before and after each match. Only applies when outputMode is "content". Default: 0'
|
|
1548
1511
|
),
|
|
1549
|
-
outputMode:
|
|
1512
|
+
outputMode: z.enum(["files_with_matches", "content"]).optional().describe(
|
|
1550
1513
|
'Output mode: "files_with_matches" shows only file paths (default), "content" shows matching lines with context'
|
|
1551
1514
|
)
|
|
1552
1515
|
});
|
|
@@ -1563,16 +1526,16 @@ async function collectFiles(dirPath, glob) {
|
|
|
1563
1526
|
async function walk(current) {
|
|
1564
1527
|
let entryNames;
|
|
1565
1528
|
try {
|
|
1566
|
-
entryNames = await
|
|
1529
|
+
entryNames = await readdir(current);
|
|
1567
1530
|
} catch {
|
|
1568
1531
|
return;
|
|
1569
1532
|
}
|
|
1570
1533
|
for (const name of entryNames) {
|
|
1571
1534
|
if (name === "node_modules" || name === ".git") continue;
|
|
1572
|
-
const fullPath =
|
|
1535
|
+
const fullPath = join(current, name);
|
|
1573
1536
|
let fileStat;
|
|
1574
1537
|
try {
|
|
1575
|
-
fileStat = await
|
|
1538
|
+
fileStat = await stat(fullPath);
|
|
1576
1539
|
} catch {
|
|
1577
1540
|
continue;
|
|
1578
1541
|
}
|
|
@@ -1628,7 +1591,7 @@ async function grepFileTool(args) {
|
|
|
1628
1591
|
contextLines = 0,
|
|
1629
1592
|
outputMode = "files_with_matches"
|
|
1630
1593
|
} = args;
|
|
1631
|
-
const targetPath = searchPath ?
|
|
1594
|
+
const targetPath = searchPath ? resolve(searchPath) : process.cwd();
|
|
1632
1595
|
let regex;
|
|
1633
1596
|
try {
|
|
1634
1597
|
regex = new RegExp(pattern);
|
|
@@ -1642,7 +1605,7 @@ async function grepFileTool(args) {
|
|
|
1642
1605
|
}
|
|
1643
1606
|
let targetStat;
|
|
1644
1607
|
try {
|
|
1645
|
-
targetStat = await
|
|
1608
|
+
targetStat = await stat(targetPath);
|
|
1646
1609
|
} catch {
|
|
1647
1610
|
const result2 = {
|
|
1648
1611
|
success: false,
|
|
@@ -1661,7 +1624,7 @@ async function grepFileTool(args) {
|
|
|
1661
1624
|
for (const filePath of files) {
|
|
1662
1625
|
let content;
|
|
1663
1626
|
try {
|
|
1664
|
-
const buffer = await
|
|
1627
|
+
const buffer = await readFile(filePath);
|
|
1665
1628
|
const checkLen = Math.min(buffer.length, 8192);
|
|
1666
1629
|
let hasBinary = false;
|
|
1667
1630
|
for (let i = 0; i < checkLen; i++) {
|
|
@@ -1692,14 +1655,11 @@ var grepTool = createZodFunctionTool(
|
|
|
1692
1655
|
return grepFileTool(params);
|
|
1693
1656
|
}
|
|
1694
1657
|
);
|
|
1695
|
-
|
|
1696
|
-
// src/builtins/web-fetch-tool.ts
|
|
1697
|
-
import { z as z7 } from "zod";
|
|
1698
1658
|
var DEFAULT_TIMEOUT_MS2 = 3e4;
|
|
1699
1659
|
var MAX_RESPONSE_BYTES = 5e6;
|
|
1700
|
-
var WebFetchSchema =
|
|
1701
|
-
url:
|
|
1702
|
-
headers:
|
|
1660
|
+
var WebFetchSchema = z.object({
|
|
1661
|
+
url: z.string().describe("The URL to fetch"),
|
|
1662
|
+
headers: z.record(z.string()).optional().describe("Optional HTTP headers as key-value pairs")
|
|
1703
1663
|
});
|
|
1704
1664
|
function htmlToText(html) {
|
|
1705
1665
|
return html.replace(/<script[\s\S]*?<\/script>/gi, "").replace(/<style[\s\S]*?<\/style>/gi, "").replace(/<[^>]+>/g, " ").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'").replace(/ /g, " ").replace(/\s+/g, " ").trim();
|
|
@@ -1760,14 +1720,11 @@ var webFetchTool = createZodFunctionTool(
|
|
|
1760
1720
|
WebFetchSchema,
|
|
1761
1721
|
async (params) => runWebFetch(params)
|
|
1762
1722
|
);
|
|
1763
|
-
|
|
1764
|
-
// src/builtins/web-search-tool.ts
|
|
1765
|
-
import { z as z8 } from "zod";
|
|
1766
1723
|
var DEFAULT_LIMIT2 = 10;
|
|
1767
1724
|
var DEFAULT_TIMEOUT_MS3 = 15e3;
|
|
1768
|
-
var WebSearchSchema =
|
|
1769
|
-
query:
|
|
1770
|
-
limit:
|
|
1725
|
+
var WebSearchSchema = z.object({
|
|
1726
|
+
query: z.string().describe("The search query"),
|
|
1727
|
+
limit: z.number().optional().describe(`Maximum number of results to return (default: ${DEFAULT_LIMIT2})`)
|
|
1771
1728
|
});
|
|
1772
1729
|
async function runWebSearch(args) {
|
|
1773
1730
|
const { query, limit = DEFAULT_LIMIT2 } = args;
|
|
@@ -1824,28 +1781,5 @@ var webSearchTool = createZodFunctionTool(
|
|
|
1824
1781
|
WebSearchSchema,
|
|
1825
1782
|
async (params) => runWebSearch(params)
|
|
1826
1783
|
);
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
FunctionTool,
|
|
1830
|
-
InMemorySandboxClient,
|
|
1831
|
-
OpenAPITool,
|
|
1832
|
-
ToolRegistry,
|
|
1833
|
-
applyWorkspaceManifest,
|
|
1834
|
-
bashTool,
|
|
1835
|
-
createBashTool,
|
|
1836
|
-
createEditTool,
|
|
1837
|
-
createFunctionTool,
|
|
1838
|
-
createOpenAPITool,
|
|
1839
|
-
createReadTool,
|
|
1840
|
-
createWriteTool,
|
|
1841
|
-
createZodFunctionTool,
|
|
1842
|
-
editTool,
|
|
1843
|
-
globTool,
|
|
1844
|
-
grepTool,
|
|
1845
|
-
readTool,
|
|
1846
|
-
validateWorkspaceManifestPath,
|
|
1847
|
-
webFetchTool,
|
|
1848
|
-
webSearchTool,
|
|
1849
|
-
writeTool,
|
|
1850
|
-
zodToJsonSchema
|
|
1851
|
-
};
|
|
1784
|
+
|
|
1785
|
+
export { E2BSandboxClient, FunctionTool, InMemorySandboxClient, OpenAPITool, ToolRegistry, applyWorkspaceManifest, bashTool, createBashTool, createEditTool, createFunctionTool, createOpenAPITool, createReadTool, createWriteTool, createZodFunctionTool, editTool, globTool, grepTool, readTool, validateWorkspaceManifestPath, webFetchTool, webSearchTool, writeTool, zodToJsonSchema };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robota-sdk/agent-tools",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.62",
|
|
4
4
|
"description": "Tool registry and implementations for Robota SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/node/index.js",
|
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
".": {
|
|
10
10
|
"types": "./dist/node/index.d.ts",
|
|
11
11
|
"source": "./src/index.ts",
|
|
12
|
+
"browser": {
|
|
13
|
+
"import": "./dist/browser/browser.js"
|
|
14
|
+
},
|
|
12
15
|
"node": {
|
|
13
16
|
"import": "./dist/node/index.js",
|
|
14
17
|
"require": "./dist/node/index.cjs"
|
|
@@ -35,7 +38,7 @@
|
|
|
35
38
|
"zod": "^3.24.0"
|
|
36
39
|
},
|
|
37
40
|
"peerDependencies": {
|
|
38
|
-
"@robota-sdk/agent-core": "3.0.0-beta.
|
|
41
|
+
"@robota-sdk/agent-core": "3.0.0-beta.62"
|
|
39
42
|
},
|
|
40
43
|
"devDependencies": {
|
|
41
44
|
"openapi-types": "^12.1.3",
|
|
@@ -43,16 +46,16 @@
|
|
|
43
46
|
"tsup": "^8.0.1",
|
|
44
47
|
"typescript": "^5.3.3",
|
|
45
48
|
"vitest": "^1.6.1",
|
|
46
|
-
"@robota-sdk/agent-core": "3.0.0-beta.
|
|
49
|
+
"@robota-sdk/agent-core": "3.0.0-beta.62"
|
|
47
50
|
},
|
|
48
51
|
"license": "MIT",
|
|
49
52
|
"publishConfig": {
|
|
50
53
|
"access": "public"
|
|
51
54
|
},
|
|
52
55
|
"scripts": {
|
|
53
|
-
"build": "tsup
|
|
54
|
-
"build:js": "tsup
|
|
55
|
-
"build:types": "tsup
|
|
56
|
+
"build": "tsup",
|
|
57
|
+
"build:js": "tsup --no-dts",
|
|
58
|
+
"build:types": "tsup --dts-only",
|
|
56
59
|
"test": "vitest run --passWithNoTests",
|
|
57
60
|
"test:coverage": "vitest run --coverage --passWithNoTests",
|
|
58
61
|
"typecheck": "tsc --noEmit",
|