MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / _execute

Method _execute

tests/test_tool_pipeline_round3.py:70–88  ·  view source on GitHub ↗
(self, ctx: ToolContext, tool_use: _ToolUse, can_use_tool=None)

Source from the content-addressed store, hash-verified

68 return ctx
69
70 def _execute(self, ctx: ToolContext, tool_use: _ToolUse, can_use_tool=None) -> list:
71 # The services lane fails CLOSED without a permission handler, so
72 # tests that want execution must say so explicitly.
73 if can_use_tool is None:
74 def can_use_tool(*_a, **_k):
75 return {"behavior": "allow"}
76
77 async def drive():
78 updates = []
79 async for update in run_tool_use(
80 tool_use,
81 AssistantMessage(content="using a tool"),
82 can_use_tool,
83 ctx,
84 ):
85 updates.append(update)
86 return updates
87
88 return _run(drive())
89
90 @staticmethod
91 def _result_blocks(updates: list) -> list[dict]:

Calls 2

driveFunction · 0.85
_runFunction · 0.70

Tested by

no test coverage detected