360 Secure SkillHub
360 安全技能中心

agent-tests

通过 Node 命令行定义和运行本地模拟断言测试,支持列出、删除、回归对比、状态查看和框架开销基准;运行仅使用占位字符串,不调用任何 agent 或模型,数据保存在本地目录,并可清除历史记录。

分类:开发
jlacroix82
jlacroix82
热度 60.60
最近更新 2026-12-02 07:52:23

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add jlacroix82/agent-tests
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
agent-tests
description
Define and track local simulated assertion tests, compare historical results, and benchmark framework overhead.
version
1.0.3
metadata
{"openclaw":{"requires":{"bins":["node"]},"envVars":[{"name":"AGENT_TESTS_WORKSPACE","required":false,"description":"Operator-selected workspace."},{"name":"TEST_DIR","required":false,"description":"Dedicated data directory within the workspace."}]}}

Agent Tests

Use node {baseDir}/agent-tests.js. Runs use a placeholder string; they do not call any agent or model. Benchmarks measure the local test framework only.

  • --test --add <name> <prompt> <expected> [assertions...]: store a definition. Prompts, expected strings, and assertions are retained on disk, so use synthetic or non-sensitive inputs.
  • --test --list, --test --run [name], --test --remove <name>: inspect, simulate, or remove one definition.
  • --benchmark <name> [iterations], --regression, --status: benchmark simulation, review historical outcomes, or show state. Runs and benchmarks retain timestamps and pass/fail metadata, without storing output snippets.
  • --purge-history --confirm: with approval, clear recorded results and benchmarks and reset per-test stats while preserving definitions.

Defaults to memory/agent-tests. Set --dir <path> before the command or use TEST_DIR to select dedicated storage inside the workspace. On Windows use a private ACL. Existing result snippets are stripped on the next run; purge history to remove them immediately.

Version 1.0.3 confines storage, creates private state files, removes sensitive fields from history, and clarifies simulation behavior.