mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-09 07:20:44 +08:00
Soften short-intent gates and add tool-result refs plus MCP wire invalidate.
Prefer report tools without hard-hiding CLI, keep soft CLI budgets, store compact+result_ref for the model, and clear frozen wire after MCP sync. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
3785e78a72
commit
605751b6a6
13 changed files with 636 additions and 65 deletions
|
|
@ -3860,6 +3860,12 @@ def build_admin_router() -> APIRouter:
|
|||
status="ok",
|
||||
detail={"synced_tools": len(norm), "compat_mode": "bailian_webparser"},
|
||||
)
|
||||
try:
|
||||
from runtime.direct_loop import invalidate_tool_wire_cache
|
||||
|
||||
invalidate_tool_wire_cache(reason=f"mcp_admin_sync:{server_id}")
|
||||
except Exception:
|
||||
pass
|
||||
return {"ok": True, "server_id": server_id, "tools": norm, "compat_mode": "bailian_webparser"}
|
||||
rt = mcp_runtime_for_row(row, store=store)
|
||||
try:
|
||||
|
|
@ -3883,6 +3889,12 @@ def build_admin_router() -> APIRouter:
|
|||
)
|
||||
store.replace_mcp_server_tools(server_id=server_id, tools=norm)
|
||||
store.set_mcp_server_health(server_id=server_id, status="ok", detail={"synced_tools": len(norm)})
|
||||
try:
|
||||
from runtime.direct_loop import invalidate_tool_wire_cache
|
||||
|
||||
invalidate_tool_wire_cache(reason=f"mcp_admin_sync:{server_id}")
|
||||
except Exception:
|
||||
pass
|
||||
return {"ok": True, "server_id": server_id, "tools": norm}
|
||||
finally:
|
||||
rt.stop()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue