@blade-ai/agent-sdk 0.1.0
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/CHANGELOG.md +14 -0
- package/README.md +110 -0
- package/dist/index.js +1858 -0
- package/package.json +93 -0
- package/vendor/ripgrep/.gitignore +12 -0
- package/vendor/ripgrep/README.md +59 -0
package/package.json
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@blade-ai/agent-sdk",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Blade AI Agent SDK",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"vendor/ripgrep/**",
|
|
18
|
+
"README.md",
|
|
19
|
+
"CHANGELOG.md"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "bun run scripts/build.ts",
|
|
23
|
+
"test": "bun test",
|
|
24
|
+
"lint": "biome lint src",
|
|
25
|
+
"lint:fix": "biome lint --write src",
|
|
26
|
+
"type-check": "bun x tsc --noEmit",
|
|
27
|
+
"release": "bun run scripts/release.js",
|
|
28
|
+
"release:dry": "bun run scripts/release.js --dry-run",
|
|
29
|
+
"release:major": "bun run scripts/release.js --major",
|
|
30
|
+
"release:minor": "bun run scripts/release.js --minor",
|
|
31
|
+
"release:patch": "bun run scripts/release.js --patch"
|
|
32
|
+
},
|
|
33
|
+
"keywords": [
|
|
34
|
+
"sdk",
|
|
35
|
+
"blade",
|
|
36
|
+
"ai",
|
|
37
|
+
"assistant",
|
|
38
|
+
"agent",
|
|
39
|
+
"llm",
|
|
40
|
+
"bun"
|
|
41
|
+
],
|
|
42
|
+
"author": "echoVic",
|
|
43
|
+
"license": "MIT",
|
|
44
|
+
"optionalDependencies": {
|
|
45
|
+
"@vscode/ripgrep": "^1.17.0",
|
|
46
|
+
"bun-pty": "^0.4.8",
|
|
47
|
+
"node-pty": "1.0.0"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@agentclientprotocol/sdk": "^0.12.0",
|
|
51
|
+
"@ai-sdk/anthropic": "^3.0.7",
|
|
52
|
+
"@ai-sdk/azure": "^3.0.5",
|
|
53
|
+
"@ai-sdk/deepseek": "^2.0.4",
|
|
54
|
+
"@ai-sdk/google": "^3.0.4",
|
|
55
|
+
"@ai-sdk/openai-compatible": "^2.0.4",
|
|
56
|
+
"@modelcontextprotocol/sdk": "^1.17.4",
|
|
57
|
+
"ai": "^6.0.39",
|
|
58
|
+
"async-mutex": "^0.5.0",
|
|
59
|
+
"axios": "^1.12.2",
|
|
60
|
+
"chalk": "^5.4.1",
|
|
61
|
+
"diff": "^8.0.2",
|
|
62
|
+
"fast-glob": "^3.3.3",
|
|
63
|
+
"fuse.js": "^7.1.0",
|
|
64
|
+
"gray-matter": "^4.0.3",
|
|
65
|
+
"hono": "^4.7.10",
|
|
66
|
+
"js-tiktoken": "^1.0.21",
|
|
67
|
+
"lodash-es": "^4.17.21",
|
|
68
|
+
"lru-cache": "^11.2.4",
|
|
69
|
+
"nanoid": "^5.1.6",
|
|
70
|
+
"open": "^10.1.2",
|
|
71
|
+
"openai": "^6.2.0",
|
|
72
|
+
"picomatch": "^4.0.3",
|
|
73
|
+
"semver": "^7.7.3",
|
|
74
|
+
"undici": "^7.16.0",
|
|
75
|
+
"write-file-atomic": "^7.0.0",
|
|
76
|
+
"ws": "^8.18.0",
|
|
77
|
+
"yaml": "^2.8.1",
|
|
78
|
+
"zod": "^3.24.2",
|
|
79
|
+
"zod-to-json-schema": "^3.24.6",
|
|
80
|
+
"zustand": "^5.0.9"
|
|
81
|
+
},
|
|
82
|
+
"devDependencies": {
|
|
83
|
+
"@biomejs/biome": "^2.2.4",
|
|
84
|
+
"@types/json-schema": "^7.0.15",
|
|
85
|
+
"@types/lodash-es": "^4.17.12",
|
|
86
|
+
"@types/picomatch": "^4.0.2",
|
|
87
|
+
"@types/semver": "^7.7.1",
|
|
88
|
+
"@types/write-file-atomic": "^4.0.3",
|
|
89
|
+
"@types/ws": "^8.5.12",
|
|
90
|
+
"bun-types": "latest",
|
|
91
|
+
"typescript": "^5.9.2"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Ripgrep Vendor Directory
|
|
2
|
+
|
|
3
|
+
此目录用于存放各平台的 ripgrep 二进制文件。
|
|
4
|
+
|
|
5
|
+
## 许可证
|
|
6
|
+
|
|
7
|
+
ripgrep 由 [BurntSushi](https://github.com/BurntSushi) 开发,采用 **Unlicense/MIT 双许可证**。
|
|
8
|
+
|
|
9
|
+
- 项目地址: https://github.com/BurntSushi/ripgrep
|
|
10
|
+
- 许可证: [Unlicense](https://github.com/BurntSushi/ripgrep/blob/master/UNLICENSE) 或 [MIT](https://github.com/BurntSushi/ripgrep/blob/master/LICENSE-MIT)
|
|
11
|
+
|
|
12
|
+
本目录中的二进制文件直接从 ripgrep 官方 GitHub Releases 下载,未做任何修改。
|
|
13
|
+
|
|
14
|
+
## 目录结构
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
vendor/ripgrep/
|
|
18
|
+
├── darwin-arm64/rg # macOS Apple Silicon
|
|
19
|
+
├── darwin-x64/rg # macOS Intel
|
|
20
|
+
├── linux-arm64/rg # Linux ARM64
|
|
21
|
+
├── linux-x64/rg # Linux x64
|
|
22
|
+
└── win32-x64/rg.exe # Windows x64
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## 快速开始
|
|
26
|
+
|
|
27
|
+
### 自动下载(推荐)
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm run vendor:ripgrep
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 手动下载
|
|
34
|
+
|
|
35
|
+
1. 访问 [ripgrep releases](https://github.com/BurntSushi/ripgrep/releases)
|
|
36
|
+
2. 下载对应平台的二进制文件(推荐 v14.1.0+)
|
|
37
|
+
3. 解压并放入对应目录
|
|
38
|
+
4. 设置执行权限(Unix 系统):
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
chmod +x vendor/ripgrep/*/rg
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 清理
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm run vendor:ripgrep:clean
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## 注意事项
|
|
51
|
+
|
|
52
|
+
- 这些文件是**可选的**
|
|
53
|
+
- Grep 工具会自动降级到其他搜索方案
|
|
54
|
+
- 包含这些文件会增加 npm 包体积 ~40-50 MB
|
|
55
|
+
- 这些文件已添加到 `.gitignore`
|
|
56
|
+
|
|
57
|
+
## 更多信息
|
|
58
|
+
|
|
59
|
+
详细文档请参考: [docs/development/implementation/grep-tool.md](../../docs/development/implementation/grep-tool.md)
|