Tool-request card speaks plainly; declining re-checks for a user-installed copy

Fact strip: 'OpenWorker installs its own verified copy from <publisher>' replaces
supply-chain jargon. On decline the engine re-resolves — a copy the user installed
themselves is handed to the agent as theirs, not treated as a refusal.
This commit is contained in:
Rohit C Prasad
2026-08-15 00:14:15 -07:00
committed by Rohit P
parent b022e58d07
commit 560fc3cb8a
5 changed files with 68 additions and 17 deletions
+14
View File
@@ -984,6 +984,20 @@ class TurnEngine:
self.tool_requester(dict(args), tool_call.id),
interrupted={"installed": False, "error": "interrupted by user"},
) or {"installed": False, "error": "no response"}
if not result.get("installed"):
# The card says "or install it yourself and continue" — honor it. A user
# who brewed the tool mid-prompt and clicked Continue has PROVIDED it,
# not declined it; find their copy before treating this as a refusal.
found = _toolchain.resolve(name)
if found:
result = {
"installed": True,
"path": found,
"note": (
"the user provided their own copy instead of the managed "
"install — use it from this path"
),
}
if not result.get("installed"):
result.setdefault(
"guidance",