aboutsummaryrefslogtreecommitdiffstats
path: root/idatui
diff options
context:
space:
mode:
authorblasty <blasty@local>2026-07-24 01:56:47 +0200
committerblasty <blasty@local>2026-07-24 01:56:47 +0200
commit03564655fda1682e61bbf7055c3ef310c448cf28 (patch)
tree7debfd5ff2cc18055cd1b712a0b1ee8f1369c78c /idatui
parentworker: wrap non-dict tool returns as {"result": ...} to match MCP shapes (diff)
downloadida-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')
-rw-r--r--idatui/client.py7
-rw-r--r--idatui/launch.py18
2 files changed, 21 insertions, 4 deletions
diff --git a/idatui/client.py b/idatui/client.py
index 3e5edb4..f39a10d 100644
--- a/idatui/client.py
+++ b/idatui/client.py
@@ -1,5 +1,12 @@
"""Persistent, thread-safe client for the ida-pro-mcp (idalib) MCP server.
+DEPRECATED. The default backend is now our own idalib worker (idatui.worker +
+idatui.worker_client.WorkerClient), which talks a unix socket instead of HTTP and
+is ~50-100x cheaper per call. This module (and the whole ida-pro-mcp
+supervisor/HTTP path: server/patch_server.py, spawn.sh, launch.py's server
+plumbing) is kept only for `--backend mcp` / --db attach and will be removed once
+the worker is battle-tested. Prefer WorkerClient for new code.
+
This is the foundation the whole TUI stands on. Unlike the throwaway CLI in the
ida-mcp skill (which re-does the MCP handshake and spins a fresh socket on every
call), this client:
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))