任务打断机制

v1.0.1

管理和中断长时间运行任务,支持用户命令终止、资源清理和任务状态保存,防止任务卡死或无限执行。

0· 151·0 current·0 all-time
MIT-0
Download zip
LicenseMIT-0 · Free to use, modify, and redistribute. No attribution required.
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the provided artifacts: scripts create/check/clear a /tmp stop-flag, SKILL.md and instructions.md describe polling, checkpointing and optional SIGINT/process.kill behavior. The declared filesystem permission in claw.json fits the functionality.
Instruction Scope
Runtime instructions stay within the task-interrupt domain (write/read/remove flag files, poll, save checkpoints, send SIGINT). Note: docs/examples call process.kill (SIGINT) and exec the create script — expected for this purpose but these actions require correct mapping of sessionId→PID to avoid accidental kills.
Install Mechanism
No install spec; this is instruction-only plus three small shell scripts. Nothing is downloaded or written by an installer, reducing installation risk.
Credentials
The skill requests no environment variables or external credentials. Files and paths referenced are confined to /tmp/agent-stop-{sessionId}.flag, which is consistent with the stated design.
Persistence & Privilege
always is false and the skill does not request persistent or system-wide configuration changes. It needs filesystem access (declared) but does not try to modify other skills or agent configs.
Assessment
This skill appears coherent and implements a simple flag-file + polling interrupt pattern. Before installing, verify: (1) how sessionId is mapped to processId in your environment — ensure only the intended child process can be signalled; (2) file permissions and /tmp isolation — flag files created in /tmp are world-visible by default, consider using a per-agent temp directory or restrictive permissions; (3) that checkpoint/save logic is implemented in your long-running tasks so interruptions are safe; (4) scripts are placed where the agent expects and marked executable; (5) test in a staging environment to confirm no accidental PID collisions or privilege escalations. If you need stronger guarantees, consider authenticated/IPC-based signaling instead of plain /tmp files and process.kill.

Like a lobster shell, security has layers — review code before you run it.

agent-controlvk97b3xrh2ww2xhe5414qrxf9jd83609xinterruptvk97b3xrh2ww2xhe5414qrxf9jd83609xlatestvk97b3xrh2ww2xhe5414qrxf9jd83609xtask-managementvk97b3xrh2ww2xhe5414qrxf9jd83609x

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

Comments