mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-10 17:23:25 +08:00
Cut ops turn idle loops and WhatsApp progress spam.
Align tool validation with playbook recipes, add turn checklist/idle guard, and cap interim WA status ticks so multi-hop CLI turns stop flooding the group. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
c3f3992a51
commit
76f62d8fac
12 changed files with 944 additions and 43 deletions
|
|
@ -829,10 +829,18 @@ class ToolExecutor:
|
|||
|
||||
ok, v_err = validate_tool_arguments(tool.parameters, tool_args)
|
||||
if not ok:
|
||||
intent = None
|
||||
try:
|
||||
md = ctx.inbound_metadata if isinstance(ctx.inbound_metadata, dict) else {}
|
||||
intent = str(md.get("ops_short_intent") or "").strip() or None
|
||||
except Exception:
|
||||
intent = None
|
||||
return format_invalid_arguments_error(
|
||||
tool.parameters or {},
|
||||
str(v_err or "invalid"),
|
||||
lang=str(ctx.lang or "zh"),
|
||||
tool_name=str(tc.name or tool.name or ""),
|
||||
intent=intent,
|
||||
), int((time.perf_counter() - t0) * 1000)
|
||||
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue