@easynet/agent-tool-buildin 0.0.31 → 0.0.33

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 (2) hide show
  1. package/README.md +33 -0
  2. package/package.json +4 -2
package/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # @easynet/agent-tool-buildin
2
+
3
+ 内置工具扩展包,配合 `@easynet/agent-tool` 使用。
4
+
5
+ ## 最小使用方式
6
+
7
+ 在 `tool.yaml` 中添加该包:
8
+
9
+ ```yaml
10
+ tools:
11
+ sandboxedPath: .
12
+ allowedHosts: []
13
+ blockedHosts: []
14
+ list:
15
+ - npm:@easynet/agent-tool-buildin
16
+ ```
17
+
18
+ ## 常用最小工具集(可选)
19
+
20
+ ```yaml
21
+ tools:
22
+ sandboxedPath: .
23
+ allowedHosts: [api.github.com]
24
+ blockedHosts: []
25
+ list:
26
+ - npm:@easynet/agent-tool-buildin#fs.readText
27
+ - npm:@easynet/agent-tool-buildin#fs.writeText
28
+ - npm:@easynet/agent-tool-buildin#http.fetchJson
29
+ ```
30
+
31
+ 说明:
32
+ - `fs.*` 受 `sandboxedPath` 限制
33
+ - `http.*` 受 `allowedHosts` / `blockedHosts` 限制
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easynet/agent-tool-buildin",
3
- "version": "0.0.31",
3
+ "version": "0.0.33",
4
4
  "description": "Tools extension for @easynet/agent-tool: FS, HTTP, util, security (sandbox, SSRF). Same contract as any other extension.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -17,10 +17,12 @@
17
17
  "dist"
18
18
  ],
19
19
  "scripts": {
20
+ "prebuild": "npm run build --prefix ../agent-tool 2>/dev/null || true",
20
21
  "build": "tsx generate-manifest.ts && tsc -p tsconfig.build.json",
21
22
  "clean": "rm -rf dist",
22
23
  "pretest": "npm run build",
23
- "test": "vitest run"
24
+ "test": "vitest run",
25
+ "typecheck": "tsc --noEmit"
24
26
  },
25
27
  "dependencies": {
26
28
  "node-html-parser": "^6.1.13"