返回顶部
e

exec-guard

Safe command execution for AI agents with timeout control, 8KB ring buffer memory protection, background process management, and multi-agent sharing via HTTP service. Use when executing system commands, running long tasks, starting services, or managing background processes. Supports CLI and HTTP server modes.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.6
安全检测
已通过
360
下载量
0
收藏
概述
安装方式
版本历史

exec-guard

# exec-guard - AI Agent Command Execution Module Safe and reliable system command execution for AI agents. ## Quick Start ### CLI Mode ```bash echo '{"command": "ls -la"}' | node scripts/dist/index.js ``` ### HTTP Service Mode ```bash node scripts/dist/index.js --server --port 8080 curl -X POST http://localhost:8080/exec -H "Content-Type: application/json" -d '{"command": "ls -la"}' ``` ## Core Capabilities | Capability | Description | |------------|-------------| | **Sync Execution** | Execute command with timeout, wait for result | | **Background Execution** | Start long tasks, get PID, query later | | **Watch Window** | Confirm service startup before returning | | **8KB Ring Buffer** | Head-Tail dual buffer prevents OOM | | **Process Management** | Query status, get logs, terminate processes | | **Multi-Agent Sharing** | HTTP service allows multiple agents to share state | ## API Reference ### POST /exec Execute a command: ```json { "command": "required - system command", "workingDir": "optional - working directory", "timeoutSeconds": "optional - default 30", "runInBackground": "optional - default false", "watchDurationSeconds": "optional - for service startup", "env": "optional - custom environment variables" } ``` ### GET /process/:pid Query process status. ### GET /process/:pid/logs Get process output logs. ### DELETE /process/:pid Terminate a process. ### GET /processes List all background processes. ## Response Status | Status | Meaning | |--------|---------| | `success` | Command completed, exit code 0 | | `failed` | Command failed, non-zero exit | | `timeout` | Command killed after timeout | | `killed` | Process manually terminated | | `running` | Background process active | ## Best Practices 1. **Set reasonable timeout** - Prevent stuck commands 2. **Use watch window for services** - Confirm startup success 3. **Use background mode for long tasks** - Training, data processing 4. **Clean up processes** - Terminate when done ## Full Documentation See `references/AGENT_GUIDE.md` for detailed usage guide and examples. ## License MIT

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 exec-guard-1775976140 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 exec-guard-1775976140 技能

通过命令行安装

skillhub install exec-guard-1775976140

下载 Zip 包

⬇ 下载 exec-guard v1.0.6

文件大小: 40.15 KB | 发布时间: 2026-4-13 10:13

v1.0.6 最新 2026-4-13 10:13
Reorganized directory structure: scripts/ for code, references/ for docs

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部