Vitest Testing
提供 Vitest 单元测试与集成测试的模式与最佳实践,涵盖断言、异步测试与模拟方法。
下载 36
AI代理在不接触密钥值的情况下自主管理凭证生命周期,保障安全。
openclaw skills install @steppacodes/agentsecrets命令、参数、文件名以原文为准
您可以通过 agentsecrets CLI 自主管理完整的凭证生命周期。
您是操作者,永远无法查看实际的凭证值。
agentsecrets call 发起经过认证的 API 调用,但会受到工作区域名白名单的密码学约束。STRIPE_KEY,而非 STRIPE_sk_live...)。密钥名称、端点和时间戳均会被记录在持久化的审计日志中。development、staging 或 production。在同步或推送前,请始终确认当前激活的环境(运行 agentsecrets status)。始终先验证上下文:
agentsecrets status # 显示工作区、项目、环境
agentsecrets secrets list # 列出可用密钥若未初始化或已登出,请告知用户运行 agentsecrets login。对于新项目,运行 agentsecrets init --storage-mode 1。
# 用户在终端中运行(不要要求他们将命令粘贴到聊天中)
agentsecrets secrets set KEY_NAME=value
# 您可以运行以下命令
agentsecrets secrets get KEY_NAME # 向用户展示密钥值
agentsecrets secrets list
agentsecrets secrets diff
agentsecrets secrets push
agentsecrets secrets pull请勿使用 curl,始终使用 call 代理。该代理会安全地注入密钥:
agentsecrets call --url https://api.stripe.com/v1/balance --bearer STRIPE_KEY
agentsecrets call --url https://api.example.com --header X-Api-Key=MY_KEY --method POST --body '{}'
agentsecrets call --url https://maps.example.com --query key=MAPS_KEY
agentsecrets call --url https://jira.example.com --basic JIRA_CREDS用于包装标准工具,使其接收以环境变量形式传入的密钥:
agentsecrets env -- npm run dev
agentsecrets env -- stripe mcp如需启用 OpenClaw SecretRef 注入,请运行:
agentsecrets execagentsecrets environment switch production # (请先请求确认)
agentsecrets project create OPENCLAW_MANAGER
agentsecrets project use OPENCLAW_MANAGER使用 agentsecrets proxy logs --last 10 查看本地审计日志中失败请求的记录。
若 API 调用返回 403 错误,因域名白名单限制,请引导用户授权:agentsecrets workspace allowlist add <domain>。
如需了解某个命令的用法,运行 agentsecrets --help。
要搜索官方 AgentSecrets 文档,可使用以下 API 接口。它将返回匹配的主题列表及链接,随后可通过 curl 访问具体页面:
curl -G "https://agentsecrets.theseventeen.co/api/search" --data-urlencode "q=your query here"已收录 1 个 Skill