@hddz/plugin-harness 0.1.10 → 0.1.11
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.
Potentially problematic release.
This version of @hddz/plugin-harness might be problematic. Click here for more details.
- package/README.md +42 -214
- package/openclaw.plugin.json +39 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -22,58 +22,26 @@
|
|
|
22
22
|
|
|
23
23
|
## 🚀 快速开始
|
|
24
24
|
|
|
25
|
-
###
|
|
26
|
-
|
|
27
|
-
**systemd 服务(root 用户)**:
|
|
25
|
+
### 方式一:使用 OpenClaw CLI(推荐)
|
|
28
26
|
|
|
29
27
|
```bash
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
**本地运行**:
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
curl -fsSL https://raw.githubusercontent.com/hddz/plugin-harness/main/install.sh | bash
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
脚本会自动:
|
|
40
|
-
- 安装 npm 包
|
|
41
|
-
- 重命名目录(`plugin-harness` → `harness`)
|
|
42
|
-
- 清理旧版本
|
|
28
|
+
# 安装插件
|
|
29
|
+
openclaw plugins install @hddz/plugin-harness@0.1.11
|
|
43
30
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
**普通用户(本地运行 OpenClaw)**:
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
npm install @hddz/plugin-harness@0.1.10
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
**systemd 服务(root 用户运行 OpenClaw)**:
|
|
31
|
+
# 重启 Gateway
|
|
32
|
+
openclaw gateway restart
|
|
53
33
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
npm install @hddz/plugin-harness@0.1.10
|
|
57
|
-
exit
|
|
34
|
+
# 验证安装
|
|
35
|
+
openclaw plugins list
|
|
58
36
|
```
|
|
59
37
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
### 2. 配置
|
|
63
|
-
|
|
64
|
-
编辑 `~/.openclaw/openclaw.json`(systemd 服务编辑 `/root/.openclaw/openclaw.json`),添加以下配置:
|
|
38
|
+
**配置**:编辑 `~/.openclaw/openclaw.json`,添加:
|
|
65
39
|
|
|
66
40
|
```json
|
|
67
41
|
{
|
|
68
42
|
"plugins": {
|
|
69
|
-
"installs": {
|
|
70
|
-
"plugin-harness": {
|
|
71
|
-
"source": "npm",
|
|
72
|
-
"spec": "@hddz/plugin-harness@0.1.9"
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
43
|
"entries": {
|
|
76
|
-
"
|
|
44
|
+
"harness": {
|
|
77
45
|
"enabled": true,
|
|
78
46
|
"config": {
|
|
79
47
|
"autoValidateConfig": true,
|
|
@@ -95,28 +63,14 @@ exit
|
|
|
95
63
|
}
|
|
96
64
|
```
|
|
97
65
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
### 3. 重启
|
|
66
|
+
### 方式二:从本地目录安装(开发用)
|
|
101
67
|
|
|
102
68
|
```bash
|
|
103
|
-
|
|
104
|
-
|
|
69
|
+
# 链接本地插件目录
|
|
70
|
+
openclaw plugins install -l /Users/hzl/.openclaw/workspace/harness-plugin
|
|
105
71
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
openclaw gateway status
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
看到以下输出表示成功:
|
|
113
|
-
|
|
114
|
-
```
|
|
115
|
-
🛡️ [Harness] OpenClaw 插件已启动
|
|
116
|
-
- 配置验证:✅ 启用
|
|
117
|
-
- Skill 审核:✅ 启用
|
|
118
|
-
- 循环检测:✅ 启用
|
|
119
|
-
- 保护文件:6 个
|
|
72
|
+
# 重启 Gateway
|
|
73
|
+
openclaw gateway restart
|
|
120
74
|
```
|
|
121
75
|
|
|
122
76
|
---
|
|
@@ -125,78 +79,19 @@ openclaw gateway status
|
|
|
125
79
|
|
|
126
80
|
| 选项 | 类型 | 默认值 | 说明 |
|
|
127
81
|
|------|------|--------|------|
|
|
128
|
-
| `autoValidateConfig` | boolean | `true` |
|
|
129
|
-
| `autoAuditSkill` | boolean | `true` | Skill
|
|
82
|
+
| `autoValidateConfig` | boolean | `true` | 自动验证配置变更 |
|
|
83
|
+
| `autoAuditSkill` | boolean | `true` | 自动审核 Skill 安装 |
|
|
130
84
|
| `loopDetectionEnabled` | boolean | `true` | 启用循环检测 |
|
|
131
|
-
| `protectedFiles` | string[] |
|
|
132
|
-
| `logsDir` | string | `
|
|
133
|
-
|
|
134
|
-
**日志文件位置**:
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
# 配置变更日志
|
|
138
|
-
cat ~/.openclaw/workspace/logs/harness/config-changes.md
|
|
139
|
-
|
|
140
|
-
# 操作审计日志
|
|
141
|
-
cat ~/.openclaw/workspace/logs/harness/operations.md
|
|
142
|
-
|
|
143
|
-
# Trace 日志
|
|
144
|
-
cat ~/.openclaw/workspace/logs/harness/traces.jsonl
|
|
145
|
-
```
|
|
85
|
+
| `protectedFiles` | string[] | `[SOUL.md, ...]` | 保护文件列表 |
|
|
86
|
+
| `logsDir` | string | `workspace/logs/harness` | 日志目录 |
|
|
146
87
|
|
|
147
88
|
---
|
|
148
89
|
|
|
149
|
-
##
|
|
150
|
-
|
|
151
|
-
### 配置验证(自动触发)
|
|
90
|
+
## 🔧 命令行工具
|
|
152
91
|
|
|
153
|
-
|
|
92
|
+
安装后,可使用以下命令:
|
|
154
93
|
|
|
155
94
|
```bash
|
|
156
|
-
# 故意改错配置
|
|
157
|
-
# 编辑 openclaw.json,把 gateway.port 改成 "wrong-type"
|
|
158
|
-
|
|
159
|
-
# 重启 Gateway
|
|
160
|
-
openclaw gateway restart
|
|
161
|
-
|
|
162
|
-
# 输出:
|
|
163
|
-
# ❌ Config invalid
|
|
164
|
-
# - gateway.port: Invalid input: expected number, received string
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
### 文件保护
|
|
168
|
-
|
|
169
|
-
尝试删除受保护文件:
|
|
170
|
-
|
|
171
|
-
```bash
|
|
172
|
-
rm ~/.openclaw/workspace/SOUL.md
|
|
173
|
-
|
|
174
|
-
# 输出:
|
|
175
|
-
# 🛡️ [Harness] 拦截删除操作:SOUL.md 是受保护文件
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
### 查看日志
|
|
179
|
-
|
|
180
|
-
```bash
|
|
181
|
-
# 配置变更日志
|
|
182
|
-
cat ~/.openclaw/workspace/logs/harness/config-changes.md
|
|
183
|
-
|
|
184
|
-
# 操作审计日志
|
|
185
|
-
cat ~/.openclaw/workspace/logs/harness/operations.md
|
|
186
|
-
|
|
187
|
-
# Trace 日志
|
|
188
|
-
cat ~/.openclaw/workspace/logs/harness/traces.jsonl
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
### CLI 工具
|
|
192
|
-
|
|
193
|
-
```bash
|
|
194
|
-
# 查看版本
|
|
195
|
-
harness --version
|
|
196
|
-
|
|
197
|
-
# 查看循环检测统计
|
|
198
|
-
harness loop-stats
|
|
199
|
-
|
|
200
95
|
# 查看最近的配置变更
|
|
201
96
|
harness get-config-changes -l 10
|
|
202
97
|
|
|
@@ -226,12 +121,9 @@ harness-plugin/
|
|
|
226
121
|
│ └── index.ts # 插件核心逻辑
|
|
227
122
|
├── dist/ # 编译输出
|
|
228
123
|
├── docs/ # 文档
|
|
229
|
-
|
|
230
|
-
│ ├── 发布与安装指南.md
|
|
231
|
-
│ └── 集成完成报告.md
|
|
124
|
+
├── openclaw.plugin.json # OpenClaw 插件元数据
|
|
232
125
|
├── package.json # NPM 配置
|
|
233
126
|
├── tsconfig.json # TypeScript 配置
|
|
234
|
-
├── openclaw.plugin.json # OpenClaw 插件元数据
|
|
235
127
|
└── README.md # 本文件
|
|
236
128
|
```
|
|
237
129
|
|
|
@@ -242,11 +134,10 @@ harness-plugin/
|
|
|
242
134
|
### Q: 插件加载失败?
|
|
243
135
|
|
|
244
136
|
**A**: 检查:
|
|
245
|
-
1. 确认安装成功:`
|
|
137
|
+
1. 确认安装成功:`openclaw plugins list`
|
|
246
138
|
2. 查看日志:`openclaw gateway status`
|
|
247
|
-
3.
|
|
248
|
-
4.
|
|
249
|
-
5. 检查依赖是否安装:`npm list @hddz/harness`
|
|
139
|
+
3. 确认 `openclaw.json` 配置了 `plugins.entries.harness`
|
|
140
|
+
4. 检查 manifest:`cat ~/.openclaw/extensions/harness/openclaw.plugin.json`
|
|
250
141
|
|
|
251
142
|
### Q: 配置验证不工作?
|
|
252
143
|
|
|
@@ -258,7 +149,7 @@ harness-plugin/
|
|
|
258
149
|
"harness": {
|
|
259
150
|
"enabled": true,
|
|
260
151
|
"config": {
|
|
261
|
-
"autoValidateConfig": true
|
|
152
|
+
"autoValidateConfig": true
|
|
262
153
|
}
|
|
263
154
|
}
|
|
264
155
|
}
|
|
@@ -275,8 +166,8 @@ harness-plugin/
|
|
|
275
166
|
"entries": {
|
|
276
167
|
"harness": {
|
|
277
168
|
"config": {
|
|
278
|
-
"autoValidateConfig": false,
|
|
279
|
-
"loopDetectionEnabled": false
|
|
169
|
+
"autoValidateConfig": false,
|
|
170
|
+
"loopDetectionEnabled": false
|
|
280
171
|
}
|
|
281
172
|
}
|
|
282
173
|
}
|
|
@@ -287,94 +178,31 @@ harness-plugin/
|
|
|
287
178
|
### Q: 如何卸载?
|
|
288
179
|
|
|
289
180
|
**A**:
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
181
|
+
```bash
|
|
182
|
+
openclaw plugins uninstall harness
|
|
183
|
+
openclaw gateway restart
|
|
184
|
+
```
|
|
293
185
|
|
|
294
186
|
---
|
|
295
187
|
|
|
296
188
|
## 📚 更多文档
|
|
297
189
|
|
|
298
|
-
- [Harness 插件开发完整教程](./docs/Harness 插件开发完整教程.md)
|
|
299
|
-
- [发布与安装指南](./docs/发布与安装指南.md)
|
|
300
|
-
- [集成完成报告](./docs/集成完成报告.md) - 功能测试报告
|
|
301
|
-
|
|
302
|
-
---
|
|
303
|
-
|
|
304
|
-
## 🚧 未来计划
|
|
305
|
-
|
|
306
|
-
### P0 - 关键安全(计划中)
|
|
307
|
-
- [ ] 资源限制(token/磁盘/CPU)
|
|
308
|
-
- [ ] 速率限制(API 调用频率)
|
|
309
|
-
- [ ] 敏感信息保护(API Key 防泄露)
|
|
310
|
-
- [ ] 自动备份/快照
|
|
311
|
-
- [ ] 高风险操作确认
|
|
312
|
-
|
|
313
|
-
### P1 - 重要防护(考虑中)
|
|
314
|
-
- [ ] 网络访问控制(白名单)
|
|
315
|
-
- [ ] 环境变量保护
|
|
316
|
-
- [ ] 依赖锁定
|
|
317
|
-
- [ ] 会话超时管理
|
|
318
|
-
- [ ] 异常行为检测
|
|
319
|
-
|
|
320
|
-
---
|
|
321
|
-
|
|
322
|
-
## 📄 许可证
|
|
323
|
-
|
|
324
|
-
MIT License - 详见 [LICENSE](./LICENSE)
|
|
190
|
+
- [Harness 插件开发完整教程](./docs/Harness 插件开发完整教程.md)
|
|
191
|
+
- [发布与安装指南](./docs/发布与安装指南.md)
|
|
325
192
|
|
|
326
193
|
---
|
|
327
194
|
|
|
328
|
-
##
|
|
195
|
+
## 📦 发布历史
|
|
329
196
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
**维护者**: 蓝山
|
|
337
|
-
**npm**: https://www.npmjs.com/package/@hddz/plugin-harness
|
|
338
|
-
- [ ] 异常行为检测
|
|
339
|
-
|
|
340
|
-
---
|
|
341
|
-
|
|
342
|
-
## 📄 许可证
|
|
343
|
-
|
|
344
|
-
MIT License - 详见 [LICENSE](./LICENSE)
|
|
345
|
-
|
|
346
|
-
---
|
|
347
|
-
|
|
348
|
-
## 🙏 致谢
|
|
349
|
-
|
|
350
|
-
- OpenClaw 团队 - 提供插件系统
|
|
351
|
-
- Harness Engineering 理念 - OpenAI, Anthropic, LangChain
|
|
352
|
-
|
|
353
|
-
---
|
|
354
|
-
|
|
355
|
-
**最后更新**: 2026-03-24
|
|
356
|
-
**维护者**: 蓝山
|
|
357
|
-
**npm**: https://www.npmjs.com/package/@hddz/plugin-harness
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
### v0.1.6 (2026-03-24)
|
|
361
|
-
- 修正 README 安装说明(恢复手动配置 `openclaw.json` 的步骤)
|
|
362
|
-
- 统一日志路径为 `workspace/logs/harness`
|
|
363
|
-
|
|
364
|
-
### v0.1.5 (2026-03-24)
|
|
365
|
-
- 简化安装步骤(错误的"自动"说明)
|
|
366
|
-
|
|
367
|
-
### v0.1.4 (2026-03-24)
|
|
368
|
-
- 添加 `openclaw.extensions` 字段到 package.json
|
|
369
|
-
|
|
370
|
-
---
|
|
197
|
+
| 版本 | 日期 | 变更 |
|
|
198
|
+
|------|------|------|
|
|
199
|
+
| 0.1.10 | 2026-03-24 | 添加 `openclaw.plugin.json` manifest,支持 `openclaw plugins install` |
|
|
200
|
+
| 0.1.9 | 2026-03-24 | 提供 `install.sh` 一键安装脚本 |
|
|
201
|
+
| 0.1.8 | 2026-03-24 | 修复 Skill 审核路径问题 |
|
|
202
|
+
| 0.1.7 | 2026-03-23 | 初始发布到 npm |
|
|
371
203
|
|
|
372
|
-
**最后更新**: 2026-03-24
|
|
373
|
-
**维护者**: 蓝山
|
|
374
|
-
**npm**: https://www.npmjs.com/package/@hddz/plugin-harness
|
|
375
204
|
---
|
|
376
205
|
|
|
377
|
-
|
|
378
|
-
|
|
206
|
+
**许可证**: MIT
|
|
207
|
+
**仓库**: https://github.com/hddz/plugin-harness
|
|
379
208
|
**npm**: https://www.npmjs.com/package/@hddz/plugin-harness
|
|
380
|
-
: https://www.npmjs.com/package/@hddz/plugin-harness
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "harness",
|
|
3
|
+
"name": "Harness Engineering",
|
|
4
|
+
"description": "Constraints, feedback loops, and control systems for AI agents",
|
|
5
|
+
"version": "0.1.11",
|
|
6
|
+
"kind": "engineering",
|
|
7
|
+
"configSchema": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"additionalProperties": false,
|
|
10
|
+
"properties": {
|
|
11
|
+
"autoValidateConfig": {
|
|
12
|
+
"type": "boolean",
|
|
13
|
+
"default": true,
|
|
14
|
+
"description": "Automatically validate openclaw.json before writes"
|
|
15
|
+
},
|
|
16
|
+
"autoAuditSkill": {
|
|
17
|
+
"type": "boolean",
|
|
18
|
+
"default": true,
|
|
19
|
+
"description": "Automatically audit skills before installation"
|
|
20
|
+
},
|
|
21
|
+
"loopDetectionEnabled": {
|
|
22
|
+
"type": "boolean",
|
|
23
|
+
"default": true,
|
|
24
|
+
"description": "Detect and prevent infinite edit loops"
|
|
25
|
+
},
|
|
26
|
+
"protectedFiles": {
|
|
27
|
+
"type": "array",
|
|
28
|
+
"items": { "type": "string" },
|
|
29
|
+
"default": ["SOUL.md", "USER.md", "AGENTS.md", "TOOLS.md", "MEMORY.md", "openclaw.json"],
|
|
30
|
+
"description": "Files protected from deletion/modification"
|
|
31
|
+
},
|
|
32
|
+
"logsDir": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"default": "workspace/logs/harness",
|
|
35
|
+
"description": "Directory for harness operation logs"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hddz/plugin-harness",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "Harness Engineering plugin for OpenClaw - constraints, feedback loops, and control systems for AI agents",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
},
|
|
35
35
|
"files": [
|
|
36
36
|
"dist",
|
|
37
|
-
"README.md"
|
|
37
|
+
"README.md",
|
|
38
|
+
"openclaw.plugin.json"
|
|
38
39
|
],
|
|
39
40
|
"peerDependencies": {
|
|
40
41
|
"openclaw": ">=2026.3.0"
|