feat: Add Java source code search and decompilation tools.#1344
Merged
Conversation
|
omg i like it! |
|
I can finally get rid of that awful recaf-mcp |
Owner
|
Thanks @limerence-zou — a genuinely well-shaped first PR. A few things I want to call out for future contributors reading this:
I'll do a small follow-up to bring the comment style in line with CLAUDE.md (section-banner separators like Looking forward to more like this. |
2 tasks
esengine
added a commit
that referenced
this pull request
May 20, 2026
) * chore(java): strip section-banner comments and module-header essays #1344 followed conventions from a different codebase — `// ── types ──` banner separators, multi-line module-header essays, and JSDoc-style `@param`/`@returns` text restating type signatures. CLAUDE.md bans all three. Trim to plain code with comments only on hidden constraints or non-obvious invariants. No behavior change; all 41 java-source tests still pass. * test(java-source): isolate project-search tests from real ~/.m2 cache Three searchProject tests ("returns not-found", "skips common non-source directories", "handles empty project root gracefully") were walking the real ~/.m2 / ~/.gradle defaults — fine on a fresh CI runner, flaky on a dev machine with a populated cache under full-suite I/O contention. - Pass repoPaths: [] so the not-found path skips the jar scan entirely. - Bump per-test timeout to 30s as a defensive cap; the searches now run in ms, but Windows AV scanning of fresh tmp dirs can still spike. --------- Co-authored-by: reasonix <reasonix@deepseek.com>
ChasLui
pushed a commit
to ChasLui/DeepSeek-Reasonix
that referenced
this pull request
May 23, 2026
ChasLui
pushed a commit
to ChasLui/DeepSeek-Reasonix
that referenced
this pull request
May 23, 2026
…engine#1363) * chore(java): strip section-banner comments and module-header essays esengine#1344 followed conventions from a different codebase — `// ── types ──` banner separators, multi-line module-header essays, and JSDoc-style `@param`/`@returns` text restating type signatures. CLAUDE.md bans all three. Trim to plain code with comments only on hidden constraints or non-obvious invariants. No behavior change; all 41 java-source tests still pass. * test(java-source): isolate project-search tests from real ~/.m2 cache Three searchProject tests ("returns not-found", "skips common non-source directories", "handles empty project root gracefully") were walking the real ~/.m2 / ~/.gradle defaults — fine on a fresh CI runner, flaky on a dev machine with a populated cache under full-suite I/O contention. - Pass repoPaths: [] so the not-found path skips the jar scan entirely. - Bump per-test timeout to 30s as a defensive cap; the searches now run in ms, but Windows AV scanning of fresh tmp dirs can still spike. --------- Co-authored-by: reasonix <reasonix@deepseek.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add a
java_sourcetool that lets the agent find and decompile Java source code by fully-qualified class name. Default off — enabled via config"javaSource": trueor envREASONIX_JAVA_SOURCE=1.New modules:
src/java/zip-reader.ts— zero-dependency pure-Node ZIP/JAR entry reader (STORED + DEFLATED). No JDKjarcommand required.src/java/class-source-finder.ts— three-phase search engine: (1) BFS walk of the project tree for.javafiles, (2) recursive scan of Maven.m2and Gradle caches for matching jars, (3)javap -c -pdecompilation. Supports keyword filtering,maxJarScanguard,AbortSignalcancellation, and directjarPathmode.src/java/index.ts— barrel export.New tool (
parallelSafe,readOnly):java_source(className, projectRoot?, jarPath?, jarKeyword?)— registered inbuildCodeToolset()viaregisterJavaSourceTool(), gated byloadJavaSourceEnabled().Wiring:
src/config.ts:javaSourceconfig field +loadJavaSourceEnabled()(envREASONIX_JAVA_SOURCEtakes precedence).src/code/setup.ts: conditional registration inbuildCodeToolset().Why
Java developers working on Maven/Gradle projects need to inspect library source without leaving the agent session. The tool is default-off because
javapdecompilation is I/O-heavy and not relevant to non-Java projects.How to verify
npm run verifypasses (lint + typecheck + tests).tests/java-source.test.tscover zip reading, project search, repo scan, keyword filtering,maxJarScantruncation, corrupt jar resilience,AbortSignal, decompilation, javap failure, and tool registration + dispatch.javaSource: trueis set.Checklist
npm run verifypasses locally (lint + typecheck + tests + comment-policy gate)Co-Authored-By: Claudetrailer in commitsCHANGELOG.md— release notes are maintainer-written at release time