zeroclaw/src
Argenis eb09ccb52d
fix(tools): validate task_id to prevent path traversal in delegate tool (#4405)
* feat(tools): add background and parallel execution to delegate tool

Add three new execution modes to the delegate tool:

- background: when true, spawns the sub-agent in a background tokio task
  and returns a task_id immediately. Results are persisted to
  workspace/delegate_results/{task_id}.json.

- parallel: accepts an array of agent names, runs them all concurrently
  with the same prompt, and returns all results when complete.

- action parameter with check_result/list_results/cancel_task support
  for managing background task lifecycle.

Cascade control: background sub-agents use child CancellationToken
derived from the parent, enabling cancel_all_background_tasks() to
abort all running background agents when the parent session ends.

Existing synchronous delegation flow is fully preserved (opt-in only).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(tools): validate task_id as UUID to prevent path traversal in delegate tool

The check_result and cancel_task actions accept a user-provided task_id
that is used directly in filesystem path construction. A malicious
task_id like "../../etc/passwd" could read or overwrite arbitrary files.

Since task_ids are always generated as UUIDs internally, this adds UUID
format validation before any filesystem operations, rejecting invalid
task_id values with a clear error message.

Also updates existing tests to use valid UUID-format task_ids and adds
dedicated path traversal rejection tests.

* fix: add missing attachments field to wati ChannelMessage after media pipeline merge

* fix(channels): add missing attachments field to voice_wake and lark

---------

Co-authored-by: Giulio V <vannini.gv@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 15:37:03 +03:00
..
agent fix(channels): ensure newline between narration and draft status lines (#4394) 2026-03-24 15:37:02 +03:00
approval fix(approval): merge default auto_approve entries with user config (#4262) 2026-03-24 15:34:32 +03:00
auth feat(auth): add import functionality for existing OpenAI Codex auth p… (#3762) 2026-03-24 15:30:45 +03:00
channels fix(sop): fix state file leak and add deterministic execution tests (#4404) 2026-03-24 15:37:03 +03:00
commands fix(update): diagnose arch mismatch in validate_binary before execution (#4379) 2026-03-24 15:34:57 +03:00
config fix(sop): fix state file leak and add deterministic execution tests (#4404) 2026-03-24 15:37:03 +03:00
cost fix(channels): add cost tracking and enforcement to all channels (#4143) 2026-03-24 15:30:46 +03:00
cron feat: declarative cron job configuration (#4045) 2026-03-24 15:34:54 +03:00
daemon fix(heartbeat): prevent UTF-8 panic, add memory bounds and path validation in session context 2026-03-24 15:34:07 +03:00
doctor feat(tool): enrich delegate sub-agent system prompt and add skills_directory config key (#3344) 2026-03-24 15:30:46 +03:00
gateway fix(gateway): improve WebSocket chat error handling and diagnostics (#4407) 2026-03-24 15:37:02 +03:00
hands feat(hands): add autonomous knowledge-accumulating agent packages (#3603) 2026-03-24 15:16:05 +03:00
hardware fix(hardware): drain stdin in subprocess test to prevent broken pipe flake (#4161) 2026-03-24 15:31:17 +03:00
health refactor(sync): migrate remaining std mutex usage to parking_lot 2026-02-18 00:45:26 +08:00
heartbeat feat(heartbeat): add health metrics, adaptive intervals, and task history 2026-03-24 15:17:14 +03:00
hooks feat(hooks): add webhook-audit builtin hook (#3212) 2026-03-11 23:34:17 -04:00
integrations feat(matrix): add allowed_rooms config for room-level gating (#4230) (#4260) 2026-03-24 15:34:52 +03:00
memory feat(memory): restore time-decay scoring lost in main→master migration (#4274) 2026-03-24 15:34:54 +03:00
nodes feat(nodes): add secure HMAC-SHA256 node transport layer (#3654) 2026-03-24 15:17:12 +03:00
observability fix(observability): handle missing OtelObserver match arms and add all-features CI check (#3981) 2026-03-24 15:29:56 +03:00
onboard fix(sop): fix state file leak and add deterministic execution tests (#4404) 2026-03-24 15:37:03 +03:00
peripherals feat(hardware): add RPi GPIO, Aardvark I2C/SPI/GPIO, and hardware plugin system (#4125) 2026-03-24 15:30:43 +03:00
plugins fix(plugins): integrate WASM tools into registry, add gateway routes and tests 2026-03-24 15:17:30 +03:00
providers fix(gateway): improve WebSocket chat error handling and diagnostics (#4407) 2026-03-24 15:37:02 +03:00
rag chore(lint): extend low-risk clippy cleanup batch 2026-02-17 16:40:58 +08:00
runtime feat(tools): add Windows support for shell tool_call execution (#3442) 2026-03-13 17:12:16 -04:00
security fix(security): update blocked_commands_basic test after #4338 (#4399) 2026-03-24 15:37:01 +03:00
service fix: use POSIX-compatible sh -c instead of dash-specific -lc (#4209) (#4217) 2026-03-24 15:34:06 +03:00
skillforge chore: Remove blocking read strings 2026-02-19 14:52:29 +08:00
skills fix(skills): surface actionable warning when skills are skipped due to script policy (#4383) 2026-03-24 15:34:56 +03:00
sop fix(sop): fix state file leak and add deterministic execution tests (#4404) 2026-03-24 15:37:03 +03:00
tools fix(tools): validate task_id to prevent path traversal in delegate tool (#4405) 2026-03-24 15:37:03 +03:00
tunnel Feat/add pinggy tunnel (#4060) 2026-03-24 15:30:39 +03:00
verifiable_intent feat(verifiable_intent): add native verifiable intent lifecycle module (#2938) 2026-03-24 15:30:40 +03:00
cli_input.rs fix(onboard): make tmux paste safe for text prompts (#4106) 2026-03-24 15:30:44 +03:00
i18n.rs feat(i18n): externalize tool descriptions for translation (#3912) 2026-03-24 15:17:33 +03:00
identity.rs test: cover deterministic HashMap ordering paths 2026-02-18 21:55:40 +08:00
lib.rs fix(sop): fix state file leak and add deterministic execution tests (#4404) 2026-03-24 15:37:03 +03:00
main.rs fix(sop): fix state file leak and add deterministic execution tests (#4404) 2026-03-24 15:37:03 +03:00
migration.rs readd tests, remove markdown files 2026-02-18 14:42:39 +08:00
multimodal.rs feat(multimodal): route image messages to dedicated vision provider (#4264) 2026-03-24 15:34:52 +03:00
util.rs feat(hardware): add RPi GPIO, Aardvark I2C/SPI/GPIO, and hardware plugin system (#4125) 2026-03-24 15:30:43 +03:00