mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-11 07:00:48 +08:00
Slim ops system tools and invalidate wire when MCP binding changes.
Keep field essentials (xlsx/deliverable, wiki, FS read, schedule) plus full MCP; drop unused public noise and ensure binding edits clear frozen tool wire. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
605751b6a6
commit
366bc2a320
6 changed files with 287 additions and 5 deletions
|
|
@ -219,8 +219,18 @@ def materialize_tool_specs(
|
|||
logger.warning("mcp tool load skipped: %s", exc)
|
||||
|
||||
# collect: plugin (Admin AIA_ENABLE_PLUGIN_TOOLS / env alias AIA_PLUGIN_TOOLS_ENABLED)
|
||||
def _finalize(rows: list[tuple[str, ToolSpec]]) -> list[ToolSpec]:
|
||||
# Field ops: slim public/plugin wire; MCP + expert stay intact.
|
||||
try:
|
||||
from runtime.tools.ops_system_tool_allowlist import filter_collected_tool_sources
|
||||
|
||||
rows = filter_collected_tool_sources(rows, specialist=specialist)
|
||||
except Exception as exc:
|
||||
logger.warning("ops system tool slim skipped: %s", exc)
|
||||
return _resolve_tool_conflicts(rows)
|
||||
|
||||
if not _plugin_tools_enabled(store):
|
||||
return _resolve_tool_conflicts(collected)
|
||||
return _finalize(collected)
|
||||
|
||||
try:
|
||||
only_ids_raw = str(os.getenv("AIA_PLUGIN_TOOL_IDS") or "").strip()
|
||||
|
|
@ -265,8 +275,7 @@ def materialize_tool_specs(
|
|||
))
|
||||
except Exception as exc:
|
||||
logger.warning("plugin tool load skipped: %s", exc)
|
||||
# normalize/policy/resolve_conflict/finalize
|
||||
return _resolve_tool_conflicts(collected)
|
||||
return _finalize(collected)
|
||||
|
||||
|
||||
def default_registry(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue