@@ -53,9 +53,9 @@ span 属性/指标输出。
5353
5454``` bash
5555python scripts/tool_safety_check.py \
56- --policy examples/tool_safety /tool_safety_policy.yaml \
56+ --policy tool/safety/examples /tool_safety_policy.yaml \
5757 --language python \
58- --script-file examples/tool_safety /samples/03_dangerous_delete.py \
58+ --script-file tool/safety/examples /samples/03_dangerous_delete.py \
5959 --output tool_safety_report.json \
6060 --audit-file tool_safety_audit.jsonl
6161echo $? # 0=allow, 2=deny, 3=review, 4=输入/策略/必需审计错误
@@ -65,10 +65,10 @@ echo $? # 0=allow, 2=deny, 3=review, 4=输入/策略/必需审计错误
6565
6666``` bash
6767python scripts/tool_safety_check.py \
68- --policy examples/tool_safety /tool_safety_policy.yaml \
69- --manifest examples/tool_safety /samples/manifest.yaml \
70- --manifest-output examples/tool_safety /manifest_run.json \
71- --audit-file examples/tool_safety /tool_safety_audit.jsonl
68+ --policy tool/safety/examples /tool_safety_policy.yaml \
69+ --manifest tool/safety/examples /samples/manifest.yaml \
70+ --manifest-output tool/safety/examples /manifest_run.json \
71+ --audit-file tool/safety/examples /tool_safety_audit.jsonl
7272```
7373
7474## 作为库使用
@@ -81,7 +81,7 @@ from tool.safety import (
8181 ScriptLanguage,
8282)
8383
84- policy = load_safety_policy(" examples/tool_safety /tool_safety_policy.yaml" )
84+ policy = load_safety_policy(" tool/safety/examples /tool_safety_policy.yaml" )
8585guard = ToolSafetyGuard(policy)
8686
8787request = SafetyScanRequest(
@@ -351,7 +351,7 @@ tool/
351351scripts/
352352 tool_safety_check.py # CLI
353353tests/tool_safety/ # 安全检查器测试
354- examples/tool_safety / # 策略、14 个样例、报告和审计样例
354+ tool/safety/examples / # 策略、14 个样例、报告和审计样例
355355docs/
356356 tool_safety_guard.md # English version
357357 tool_safety_guard.zh_CN.md # 本文
0 commit comments