diff options
| author | blasty <blasty@local> | 2026-07-24 01:56:47 +0200 |
|---|---|---|
| committer | blasty <blasty@local> | 2026-07-24 01:56:47 +0200 |
| commit | 03564655fda1682e61bbf7055c3ef310c448cf28 (patch) | |
| tree | 7debfd5ff2cc18055cd1b712a0b1ee8f1369c78c /idatui/launch.py | |
| parent | worker: wrap non-dict tool returns as {"result": ...} to match MCP shapes (diff) | |
| download | ida-tui-03564655fda1682e61bbf7055c3ef310c448cf28.tar.gz ida-tui-03564655fda1682e61bbf7055c3ef310c448cf28.tar.xz ida-tui-03564655fda1682e61bbf7055c3ef310c448cf28.zip | |
deprecate: make the idalib worker the default backend; mark mcp path for removal
Opening a binary now defaults to our own idalib worker; the ida-pro-mcp HTTP
supervisor path is deprecated (kept only for --db/attach and --backend mcp).
* launch.py: --backend default resolves to worker for a fresh binary open, mcp
for the attach modes (--db / bare `ida-tui`, which have no worker equivalent);
explicit --backend or IDATUI_BACKEND still wins. Logs a deprecation notice when
the mcp path is used.
* Deprecation markers on client.py and server/patch_server.py; the ida-tui shell
header and README now describe the worker as primary and note
$IDATUI_WORKER_PYTHON. TODO tracks the removal checklist.
No code deleted yet — the mcp fallback stays until the worker is proven on a box
where idalib can spawn (pilot against --backend worker is the gate). Backend
resolution matrix verified: `ida-tui bash`->worker, bare/`--db`->mcp, explicit
flag/env honored.
Diffstat (limited to 'idatui/launch.py')
| -rw-r--r-- | idatui/launch.py | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/idatui/launch.py b/idatui/launch.py index 15352d5..b2f0eec 100644 --- a/idatui/launch.py +++ b/idatui/launch.py @@ -189,12 +189,22 @@ def main(argv: list[str] | None = None) -> int: help="listen for RPC on this unix socket (puppeteer the TUI)") p.add_argument("--no-server", action="store_true", help="do not auto-start the supervisor if it's down") - p.add_argument("--backend", choices=("mcp", "worker"), - default=os.environ.get("IDATUI_BACKEND", "mcp"), - help="'mcp' (ida-pro-mcp supervisor, default) or 'worker' " - "(our own in-process idalib worker over a unix socket)") + p.add_argument("--backend", choices=("mcp", "worker"), default=None, + help="'worker' (our own idalib worker over a unix socket, the " + "default when opening a binary) or 'mcp' (deprecated " + "ida-pro-mcp supervisor; used for --db/attach)") args = p.parse_args(argv) + # Backend selection: explicit flag > IDATUI_BACKEND > worker for a fresh + # binary open, mcp for the attach modes (--db / bare `ida-tui`) which have no + # worker equivalent. The mcp path is deprecated and on its way out. + if args.backend is None: + args.backend = os.environ.get("IDATUI_BACKEND") or ( + "worker" if (args.binary and not args.db) else "mcp") + if args.backend == "mcp": + _log("using the deprecated ida-pro-mcp backend " + "(the idalib worker is default for opening a binary)") + binary = None if args.binary and not args.db: binary = os.path.abspath(os.path.expanduser(args.binary)) |
