@qqbrowser/openclaw-qbot 0.0.107 → 0.0.108
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/package.json +13 -13
- package/skills/srt-sandbox/SKILL.md +21 -108
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qqbrowser/openclaw-qbot",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.108",
|
|
4
4
|
"description": "Multi-channel AI gateway with extensible messaging integrations",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"homepage": "https://github.com/openclaw/openclaw#readme",
|
|
@@ -434,6 +434,18 @@
|
|
|
434
434
|
"typescript": "^5.9.3",
|
|
435
435
|
"vitest": "^4.0.18"
|
|
436
436
|
},
|
|
437
|
+
"peerDependencies": {
|
|
438
|
+
"node-llama-cpp": "3.16.2",
|
|
439
|
+
"playwright-core": "1.58.2"
|
|
440
|
+
},
|
|
441
|
+
"peerDependenciesMeta": {
|
|
442
|
+
"node-llama-cpp": {
|
|
443
|
+
"optional": true
|
|
444
|
+
},
|
|
445
|
+
"playwright-core": {
|
|
446
|
+
"optional": true
|
|
447
|
+
}
|
|
448
|
+
},
|
|
437
449
|
"bundledDependencies": [
|
|
438
450
|
"@agentclientprotocol/sdk",
|
|
439
451
|
"@anthropic-ai/sandbox-runtime",
|
|
@@ -496,18 +508,6 @@
|
|
|
496
508
|
"yaml",
|
|
497
509
|
"zod"
|
|
498
510
|
],
|
|
499
|
-
"peerDependencies": {
|
|
500
|
-
"node-llama-cpp": "3.16.2",
|
|
501
|
-
"playwright-core": "1.58.2"
|
|
502
|
-
},
|
|
503
|
-
"peerDependenciesMeta": {
|
|
504
|
-
"node-llama-cpp": {
|
|
505
|
-
"optional": true
|
|
506
|
-
},
|
|
507
|
-
"playwright-core": {
|
|
508
|
-
"optional": true
|
|
509
|
-
}
|
|
510
|
-
},
|
|
511
511
|
"engines": {
|
|
512
512
|
"node": ">= 22.12.0"
|
|
513
513
|
},
|
|
@@ -1,126 +1,39 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: srt-sandbox
|
|
3
|
-
description: "SRT
|
|
3
|
+
description: "SRT 沙箱运行环境认知。了解当前沙箱的文件系统、网络、安全边界,避免错误拒绝合法操作。"
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
metadata: { "openclaw": { "always": true, "emoji": "🔒" } }
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
# SRT
|
|
8
|
+
# SRT 沙箱环境速查
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
你运行在 SRT 沙箱中(macOS Seatbelt / Linux bwrap)。**先查本表再判断能不能做,不要凭猜测拒绝操作。**
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## 文件权限
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
**可写路径(allowWrite):**
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
- `.`(当前工作目录)
|
|
17
|
+
- `~/.qbotclaw`
|
|
18
|
+
- `/tmp`、`/private/tmp`、`/var/tmp`
|
|
19
|
+
- **`~/Desktop`、`~/Downloads`、`~/Pictures`** ← 用户常用目录,可写!
|
|
17
20
|
|
|
18
|
-
|
|
21
|
+
**禁读路径(denyRead):** `~/.ssh`、`~/.gnupg`、`~/.aws/credentials`
|
|
19
22
|
|
|
20
|
-
|
|
23
|
+
**禁写文件(denyWrite):** `.env`、`.env.local`、`.env.production`
|
|
21
24
|
|
|
22
|
-
|
|
25
|
+
## 网络权限
|
|
23
26
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
| `.`(当前工作目录) | 你的主要工作区,通常是 `~/.qbotclaw/workspace` |
|
|
27
|
-
| `~/.QBotclaw` | QBotClaw 应用数据目录 |
|
|
28
|
-
| `/private/tmp` | macOS 临时目录 |
|
|
29
|
-
| `/var/tmp` | 系统临时目录 |
|
|
30
|
-
| `/tmp` | 通用临时目录 |
|
|
31
|
-
| `~/Desktop` | 用户桌面 |
|
|
32
|
-
| `~/Downloads` | 用户下载目录 |
|
|
33
|
-
| `~/Pictures` | 用户图片目录 |
|
|
27
|
+
允许访问:`*.com *.org *.net *.io *.dev *.cn *.ai *.cc *.co *.me *.in *.app *.sh *.xyz *.info *.edu *.gov *.uk *.jp *.de`
|
|
28
|
+
→ 几乎所有常见网站和 API 均可访问。
|
|
34
29
|
|
|
35
|
-
|
|
30
|
+
本地端口绑定:✅ 允许(可启动 dev server)
|
|
36
31
|
|
|
37
|
-
|
|
38
|
-
- 当用户要求在 `/tmp` 创建临时文件时,这也是**完全允许的**
|
|
39
|
-
- 如果目标路径不在上述列表中(例如 `/Users/xxx/Documents/`、`/usr/local/`、`/etc/`),写入操作会被沙箱阻止
|
|
32
|
+
## 决策规则
|
|
40
33
|
|
|
41
|
-
|
|
34
|
+
1. 目标路径在 allowWrite 内 + 文件名不在 denyWrite 中 → **直接执行**
|
|
35
|
+
2. 路径不在 allowWrite 中 → 告知用户并建议用桌面/下载目录/tmp 替代
|
|
36
|
+
3. 操作失败但路径在 allowWrite 内 → 这是普通权限问题,**不是沙箱限制**
|
|
37
|
+
4. 不确定时 → **先尝试执行**,不要预判拒绝
|
|
42
38
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
| 路径 | 说明 |
|
|
46
|
-
| -------------------- | ---------------------------------- |
|
|
47
|
-
| `~/.ssh` | SSH 密钥目录(包含私钥等敏感信息) |
|
|
48
|
-
| `~/.gnupg` | GPG 密钥目录 |
|
|
49
|
-
| `~/.aws/credentials` | AWS 凭证文件 |
|
|
50
|
-
|
|
51
|
-
### 🚫 禁止写入的文件(denyWrite)
|
|
52
|
-
|
|
53
|
-
以下文件名的写入操作会被**强制拦截**,无论在哪个目录下:
|
|
54
|
-
|
|
55
|
-
| 文件名 | 说明 |
|
|
56
|
-
| ----------------- | ---------------- |
|
|
57
|
-
| `.env` | 环境变量配置文件 |
|
|
58
|
-
| `.env.local` | 本地环境变量配置 |
|
|
59
|
-
| `.env.production` | 生产环境配置 |
|
|
60
|
-
|
|
61
|
-
## 三、网络访问权限
|
|
62
|
-
|
|
63
|
-
### ✅ 允许访问的域名(allowedDomains)
|
|
64
|
-
|
|
65
|
-
当前配置使用**广泛通配符**,以下顶级域名下的所有子域名都可以访问:
|
|
66
|
-
|
|
67
|
-
```
|
|
68
|
-
*.com *.org *.net *.io *.dev *.cn *.ai
|
|
69
|
-
*.cc *.co *.me *.in *.app *.sh *.xyz
|
|
70
|
-
*.info *.edu *.gov *.uk *.jp *.de
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
这意味着**绝大多数常见网站都可以访问**,包括但不限于:
|
|
74
|
-
|
|
75
|
-
- GitHub、NPM、PyPI 等开发平台
|
|
76
|
-
- Google、Bing 等搜索引擎
|
|
77
|
-
- 各类 API 服务(OpenAI、Anthropic 等)
|
|
78
|
-
- 腾讯云、阿里云等国内服务
|
|
79
|
-
|
|
80
|
-
### 🔒 本地网络绑定
|
|
81
|
-
|
|
82
|
-
`allowLocalBinding: true` — 允许绑定本地端口(localhost),可以启动本地开发服务器。
|
|
83
|
-
|
|
84
|
-
## 四、操作决策指南
|
|
85
|
-
|
|
86
|
-
### 当用户要求写文件时
|
|
87
|
-
|
|
88
|
-
```
|
|
89
|
-
1. 确认目标路径是否在 allowWrite 列表中
|
|
90
|
-
2. 确认文件名不在 denyWrite 列表中
|
|
91
|
-
3. 如果都满足 → 直接执行,不要犹豫
|
|
92
|
-
4. 如果不满足 → 向用户说明限制,并建议替代路径
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
**常见正确决策示例:**
|
|
96
|
-
|
|
97
|
-
| 用户请求 | 正确做法 | 原因 |
|
|
98
|
-
| ----------------------- | ----------------------------------------------------- | -------------------------------- |
|
|
99
|
-
| "在桌面创建一个文件" | ✅ 直接执行 `touch ~/Desktop/文件名` | `~/Desktop` 在 allowWrite 中 |
|
|
100
|
-
| "在下载目录保存文件" | ✅ 直接执行 | `~/Downloads` 在 allowWrite 中 |
|
|
101
|
-
| "在 /tmp 创建临时文件" | ✅ 直接执行 | `/tmp` 在 allowWrite 中 |
|
|
102
|
-
| "在工作目录创建项目" | ✅ 直接执行 | `.`(工作目录)在 allowWrite 中 |
|
|
103
|
-
| "在 Documents 创建文件" | ⚠️ 告知用户该路径不在允许范围,建议使用桌面或下载目录 | `~/Documents` 不在 allowWrite 中 |
|
|
104
|
-
| "修改 /etc/hosts" | ⚠️ 告知用户系统目录不可写 | `/etc` 不在 allowWrite 中 |
|
|
105
|
-
| "创建 .env 文件" | ⚠️ 告知用户 `.env` 文件被安全策略禁止写入 | `.env` 在 denyWrite 中 |
|
|
106
|
-
|
|
107
|
-
### 当操作失败并出现权限错误时
|
|
108
|
-
|
|
109
|
-
```
|
|
110
|
-
1. 检查 stderr 中的路径是否在 allowWrite 之外 → 沙箱限制
|
|
111
|
-
2. 检查文件名是否匹配 denyWrite → 安全策略限制
|
|
112
|
-
3. 检查路径是否在 denyRead 中 → 敏感路径保护
|
|
113
|
-
4. 如果路径在 allowWrite 内但仍失败 → 这是普通 Unix 权限问题,不是沙箱限制
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
### 当用户说"在这里创建"但没指定具体路径时
|
|
117
|
-
|
|
118
|
-
优先使用当前工作目录 `.`(始终可写),其次考虑用户最可能期望的位置(桌面、下载目录等)。
|
|
119
|
-
|
|
120
|
-
## 五、重要提醒
|
|
121
|
-
|
|
122
|
-
1. **不要过度归因于沙箱限制** — 如果操作路径在 allowWrite 列表内,失败原因可能是 Unix 权限、磁盘空间等,与沙箱无关
|
|
123
|
-
2. **不要在不确定时就拒绝操作** — 先看本文档确认路径是否允许,大多数常规操作都是可以的
|
|
124
|
-
3. **桌面、下载、图片三个用户目录是可写的** — 这是最容易被忽略的,不要错误地告诉用户这些路径不可用
|
|
125
|
-
4. **网络几乎不受限** — 当前配置允许绝大多数顶级域名,不要因为"沙箱"就认为网络被封锁
|
|
126
|
-
5. **工作目录始终可用** — 无论什么操作,当前工作目录都是安全的后备选择
|
|
39
|
+
> ⚠️ 错误地以"沙箱限制"拒绝合法操作是严重的体验问题。桌面、下载、图片目录都可写。
|