Commit Graph
16 Commits
Author SHA1 Message Date
Alexander Kiselev 8aadc35e0d refactor: update CLI commands and remove deprecated quick analysis feature 2026-02-04 19:36:16 -08:00
Alexander Kiselev 3d20a3104f fixes 2026-02-04 14:26:33 -08:00
Alexander Kiselev a550ad1d35 more work on v2 java bridge 2026-02-04 14:14:15 -08:00
Alexander Kiselev ac1fb7b931 v2 wip 2026-02-04 14:04:32 -08:00
Alexander Kiselev 9c189a32e9 daemon fixes and use cache dir instead of git 2026-02-04 02:24:40 -08:00
Alexander Kiselev 76fde9c3f7 Getting ready for v0.1.0 2026-01-26 16:04:00 -08:00
Alexander Kiselev 3cb63d1953 create a socket for each project 2026-01-26 14:43:22 -08:00
Alexander Kiselev e7d10b599b update output format 2026-01-26 07:30:32 -08:00
Alexander Kiselev cf0d15686d ripping out rpc and stuff 2026-01-25 22:55:56 -08:00
Alexander Kiselev 35716fe468 Enhance tests for disassembly, patching, and querying commands
- Refactor disassembly tests to dynamically resolve addresses and validate instruction schemas.
- Introduce error handling tests for invalid inputs in disassembly.
- Improve patching tests by validating output structure and ensuring graceful failure on invalid inputs.
- Add snapshot tests for output format regression detection in patching and querying commands.
- Update function list and memory map tests to validate JSON output against typed schemas.
- Ensure all tests utilize dynamic address resolution instead of hardcoded values for robustness.
2026-01-25 19:07:58 -08:00
Alexander Kiselev 912cd0137b feat: Add PyGhidra installation support and enhance daemon command handling
- Implemented `install_pyghidra` function to set up PyGhidra in a Python virtual environment for Ghidra installations.
- Enhanced `install_ghidra` to call `install_pyghidra` after Ghidra installation.
- Updated daemon command handling to include program name in start, restart, and stop commands.
- Refactored project path resolution to streamline project management.
- Improved socket path handling to respect `GHIDRA_CLI_SOCKET` environment variable for testing.
- Modified tests to remove ignore flags, allowing for automated testing without Ghidra installation.
- Added analysis step in test project setup to ensure comments and other features work correctly.
2026-01-25 16:39:23 -08:00
Alexander KiselevandClaude Opus 4.5 a1cf872189 feat: Implement all analysis commands with daemon routing
Add complete implementation for all stub commands:
- Symbol operations (list, get, create, rename, delete)
- Type operations (list, get, create, apply)
- Comment operations (list, get, set, delete)
- Graph operations (calls, callers, callees, export)
- Find operations (string, bytes, function, calls, crypto, interesting)
- Diff operations (programs, functions)
- Patch operations (bytes, nop, export)
- Script operations (list, run, python inline)
- Disasm command (disassembly at address)
- Batch operations (execute commands from file)
- Stats command (program statistics)

Fix critical routing bug where new commands fell through to
"Command not yet implemented" instead of being routed to daemon.

Add ExecuteCli IPC command for forwarding CLI commands through daemon.
Add comprehensive integration tests for all new commands.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 07:08:59 -08:00
Alexander KiselevandClaude Opus 4.5 3db0af7a3c feat: Add comprehensive E2E test suite and fix CLI argument conflicts
Add E2E test infrastructure:
- DaemonTestHarness for managing daemon lifecycle in tests
- Test fixtures and helpers in tests/common/
- Sample binary fixture for integration tests

Add test coverage:
- command_tests.rs: version, doctor, config commands
- project_tests.rs: project create/list/info/delete, import, analyze
- daemon_tests.rs: daemon start/status/ping/stop/clear-cache
- query_tests.rs: function list, strings, memory, decompile, xref
- unimplemented_tests.rs: 39 tests for graceful error messages

Fix CLI bugs:
- DisasmArgs: rename count to num_instructions (--instructions/-n)
  to avoid conflict with QueryOptions.count
- GraphExportArgs: add unique arg id for format positional to avoid
  conflict with QueryOptions.format

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 04:47:22 -08:00
Alexander KiselevandClaude Opus 4.5 33dc10dcca feat: Implement daemon-only architecture for query operations
This commit implements the daemon-only architecture where all query
operations (functions, strings, decompile, memory, summary, xrefs)
must go through the persistent daemon instead of spawning new Ghidra
processes per command.

Key changes:
- Wire IPC client in main.rs to route queries through daemon
- Add requires_daemon() to determine which commands need daemon
- Add execute_via_daemon() to translate CLI commands to IPC calls
- Deprecate HeadlessExecutor with migration notice
- Fix filter.pest hex number parsing order (hex before number)
- Add #[allow(dead_code)] to infrastructure modules for future use
- Mark E2E tests requiring daemon as #[ignore]

Architecture benefits:
- Faster queries: Ghidra stays loaded, no 5-30s startup per command
- Simpler code: One execution path instead of two
- Better UX: Clear daemon requirement with helpful error messages

When daemon is not running, users see:
  Error: This command requires the daemon to be running.
  Start the daemon with: ghidra daemon start --project <name>

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 03:06:08 -08:00
Alexander KiselevandClaude Opus 4.5 592958f8fe chore: Add open source release plan and update e2e tests
- Add docs/plan-prod.md with comprehensive release plan
- Include sample_binary test fixture
- Update e2e tests

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 01:54:02 -08:00
Alexander Kiselev 370e578cae jython script works? 2026-01-25 01:54:02 -08:00