aboutsummaryrefslogtreecommitdiffstats
path: root/idatui/tui.py
diff options
context:
space:
mode:
authorblasty <peter@haxx.in>2026-07-24 14:53:56 +0200
committerblasty <peter@haxx.in>2026-07-24 14:53:56 +0200
commit3a28b97cb355822b2d380f9507b203b79cb0e4e9 (patch)
tree35565378585b06abf03aa772994d9f9e8b3b2f6b /idatui/tui.py
parentmcp: collapse app + launcher to worker-only (diff)
downloadida-tui-3a28b97cb355822b2d380f9507b203b79cb0e4e9.tar.gz
ida-tui-3a28b97cb355822b2d380f9507b203b79cb0e4e9.tar.xz
ida-tui-3a28b97cb355822b2d380f9507b203b79cb0e4e9.zip
mcp: delete the ida-pro-mcp transport, supervisor, and mcp-only tests
The idalib worker is the only backend now, so remove the dead HTTP/supervisor surface entirely (~2200 lines): * deleted idatui/client.py (the IDAClient HTTP/JSON-RPC transport + session manager), idatui/tui.py (the old mcp TUI entry, superseded by launch.py), spawn.sh, and systemd/ (the supervisor unit). * deleted the mcp-only tests (stress_client, smoke_client, test_keepalive, stress_paging, rpc_smoke, serverctl.sh, pane_smoke, test_domain) -- the worker pilot (tests/test_scenarios.py) supersedes them. * migrated the tmux RPC harness (idatui/pane.py) to the worker: it spawns `idatui.launch <binary> --rpc <sock>` instead of the mcp `idatui.tui`, drops the supervisor auto-start/ensure machinery, and reaps our own worker (idatui/worker.py) instead of ida_pro_mcp.idalib_server. --db/--url/--no- ensure-server are gone; --open is required. * __init__ / __main__ / domain no longer import client (exceptions come from errors.py, the domain client hint is WorkerClient); pyproject points both console scripts at idatui.launch; README + ida-tui header describe the worker-only flow. What stays (by design): the ida_pro_mcp *package* (the worker reuses its @tool functions in-process) and server/patch_server.py (the worker injects its custom tools on startup). Verified: whole package imports + IdaTui constructs + pilot lists 31 scenarios. The worker pilot (134 pass / 2 known flakes) is the E2E gate.
Diffstat (limited to 'idatui/tui.py')
-rw-r--r--idatui/tui.py45
1 files changed, 0 insertions, 45 deletions
diff --git a/idatui/tui.py b/idatui/tui.py
deleted file mode 100644
index b399ffe..0000000
--- a/idatui/tui.py
+++ /dev/null
@@ -1,45 +0,0 @@
-"""Launcher for the idatui TUI.
-
- # attach to the single open session on a running server
- python -m idatui.tui
-
- # attach to a specific session
- python -m idatui.tui --db 80d83396
-
- # open (or reopen) an arbitrary binary, then drive it
- python -m idatui.tui --open /path/to/binary
-
-The server (supervisor) must already be running (see spawn.sh). --open creates a
-session via idb_open; the binary's directory must be writable (idalib writes a
-.i64 next to it).
-"""
-from __future__ import annotations
-
-import argparse
-import os
-
-from .app import IdaTui
-from .client import DEFAULT_URL
-
-
-def main(argv: list[str] | None = None) -> int:
- p = argparse.ArgumentParser(prog="idatui", description="Minimal TUI for IDA over MCP")
- p.add_argument("--url", default=os.environ.get("IDA_MCP_URL", DEFAULT_URL),
- help=f"MCP server URL (default {DEFAULT_URL})")
- p.add_argument("--db", default=os.environ.get("IDA_MCP_DB"),
- help="attach to an existing session id")
- p.add_argument("--open", metavar="PATH",
- help="open (or reopen) a binary and drive it (dir must be writable)")
- p.add_argument("--no-keepalive", action="store_true",
- help="Do not bump idle-TTL / run the keepalive heartbeat")
- p.add_argument("--rpc", metavar="PATH",
- help="listen for RPC on this unix socket path (puppeteer the TUI)")
- args = p.parse_args(argv)
- rpc_path = os.path.abspath(os.path.expanduser(args.rpc)) if args.rpc else None
- IdaTui(url=args.url, db=args.db, open_path=args.open,
- keepalive=not args.no_keepalive, rpc_path=rpc_path).run()
- return 0
-
-
-if __name__ == "__main__":
- raise SystemExit(main())