dsh-eval-guard 0.0.0-stage → 0.1.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 huhu233
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,53 @@
1
- # Temporary Holding Version
1
+ # dsh-eval-guard · 评测守护
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ 在 DSH 中启用后,约束**所有用户主对话**:
4
+
5
+ - 只能读写会话工作区;工作区外(包括 /tmp)不可访问。
6
+ - 禁止联网、子代理、Agent Team/跨 agent 通信、读取其它工作区。
7
+ - 工具黑名单可配置;未知工具默认放行,但 DSH 内置与 dsh-ops 的工具会做参数路径审计。
8
+ - 每个用户消息后的单轮有可配置的最长时长(默认 90 分钟);到点只终止当前轮次,并递归清理子代理与后台任务。
9
+ - 设置页可安装“第 6 集 · 坦克大战”任务:空工作区 → 复制素材 → 新会话填入提示词(由用户发送)。
10
+
11
+ 插件默认关闭;关闭时不做任何行为。所有 run 记录、usage、violations 写入
12
+ $DSH_HOME/eval-guard/runs/<run-id>/,供独立的 ../tank-eval 评测程序读取。
13
+
14
+ ## 任务来源
15
+
16
+ 安装的评测任务来自开源项目 **meow-ai-arena** 的第 6 集 · 坦克大战:
17
+
18
+ - 仓库:<https://github.com/chen-006/meow-ai-arena>
19
+ - 任务目录:<https://github.com/chen-006/meow-ai-arena/tree/main/tank>
20
+ - 使用版本:commit `6bd738b`(2026-10-16)
21
+ - 素材来源:该仓库的 `tank/workspace/`(MIT License)
22
+
23
+ 本插件打包的 Linux 版 `workspace.zip` 在原素材基础上做了两处适配:把 `baseline.cpp` 编译为 Linux 可执行文件并移出源码;把 `clock.py` 改为单次 90 分钟版本。规则、引擎、本地裁判、模板等其余文件保持原样。
24
+
25
+ ## 构建
26
+
27
+ ~~~bash
28
+ node_modules/.bin/tsdown
29
+ node scripts/build-native.mjs
30
+ ~~~
31
+
32
+ ## 安装到当前 DSH profile
33
+
34
+ ~~~bash
35
+ scripts/install.sh web
36
+ # 如果脚本找不到 dsh 命令:
37
+ DSH_CHECKOUT=/home/huhu233/otherProject/deepseek-harness scripts/install.sh web
38
+ # 然后重启 dsh web
39
+ ~~~
40
+
41
+ ## 依赖
42
+
43
+ - Linux + unprivileged user namespaces
44
+ - bubblewrap (bwrap)
45
+ - gcc(构建 native supervisor 时)
46
+ - unzip(安装任务素材时)
47
+
48
+ ## 已知边界
49
+
50
+ - 只支持 Linux。
51
+ - seccomp 用户通知的路径检查与 open 之间存在极小的 TOCTOU 窗口;bwrap 只读/无网络挂载是第二层内核边界。
52
+ - 进程审计只覆盖被拦截的文件/网络 syscall;正常 syscall 不记录。
53
+ - 当前设置页使用内联样式,不依赖额外 CSS 构建链。
Binary file
@@ -0,0 +1,6 @@
1
+ # Inserts this plugin's own Loader row.
2
+ # The id below is also the settings namespace: the Settings page reads and
3
+ # writes this entry's config block through ctx.remote.settings.mutate.
4
+ - insert:
5
+ - id: eval-guard
6
+ name: dsh-eval-guard