Prefer batch CLI in playbooks, cap tool persistence, and steer getManagedNe failures.

Default scheduled CLI steps to ne_ids/ume_ne_ids batch, compact oversized tool chat_message/tool_log after turns, and on getManagedNe miss guide agents to listManagedNe/UME paths instead of blind retries.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-08-11 00:46:46 +08:00
parent ae70d4b89a
commit e2fc72607e
16 changed files with 373 additions and 61 deletions

View file

@ -10,7 +10,7 @@ from runtime.application.gateway.ops_short_intent import (
should_send_group_mention_nudge,
)
from runtime.tools.base import ToolSpec
from runtime.tools.tool_error_hints import enrich_exec_managed_ne_error
from runtime.tools.tool_error_hints import enrich_exec_managed_ne_error, enrich_get_managed_ne_error
def test_detect_ops_short_intent_english_field() -> None:
@ -105,3 +105,22 @@ def test_enrich_exec_unreachable_nested_json() -> None:
)
assert out["error_class"] == "unreachable"
assert "unreachable" in out["hint"].lower()
def test_enrich_get_managed_ne_not_found() -> None:
out = enrich_get_managed_ne_error(
{"ok": False, "error": "netx_http_404", "error_code": "netx_http_404", "detail": "Not Found"}
)
assert out["error_class"] == "not_found"
assert "listManagedNe" in out["hint"]
assert "ume_ne_id" in out["hint"]
assert "listManagedNe" in " ".join(out.get("next_tools") or [])
def test_enrich_get_managed_ne_id_required() -> None:
out = enrich_get_managed_ne_error(
{"ok": False, "error": "ne_id_required", "error_code": "ne_id_required"}
)
assert out["error_class"] == "ne_id_required"
assert "listManagedNe" in out["hint"]
assert out.get("example")