mirror of
https://github.com/andrewyng/openworker.git
synced 2026-09-11 06:30:25 +00:00
request_tool: non-catalog names never raise the install card
Fast-fail with a shell steer before any prompt; docstring names the closed catalog and stops citing semgrep (pip/brew, deliberately unmanaged) as an example.
This commit is contained in:
@@ -2073,6 +2073,20 @@ def create_app(manager: SessionManager) -> FastAPI:
|
||||
"""
|
||||
name = str(args.get("name", "")).strip()
|
||||
info = toolchain.describe(name)
|
||||
if not info:
|
||||
# Not in the pinned catalog: never show an install card that can only
|
||||
# end in "no pinned build" AFTER approval (owner-hit 2026-08-20 — agents
|
||||
# routed ordinary brew/pip installs through the card). Steer to the
|
||||
# shell, which has its own approval flow.
|
||||
return {
|
||||
"installed": False,
|
||||
"error": (
|
||||
f"'{name}' is not in the pinned tool catalog "
|
||||
f"({', '.join(sorted(toolchain.MANAGED))}). Install it yourself "
|
||||
"with the shell (brew/pip/…, subject to the normal command "
|
||||
"approval), or proceed without it and note the gap."
|
||||
),
|
||||
}
|
||||
item = manager.inbox.add_tool_request(
|
||||
session_id,
|
||||
f"Install {name}?" if name else "Install a tool?",
|
||||
|
||||
Reference in New Issue
Block a user