mirror of
https://github.com/andrewyng/openworker.git
synced 2026-09-11 06:30:25 +00:00
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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user