reasonix 0.48.0 → 0.48.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/dist/cli/{acp-4ROCGYNH.js → acp-QJGGHQLA.js} +52 -135
- package/dist/cli/acp-QJGGHQLA.js.map +1 -0
- package/dist/cli/{chat-GZNB5625.js → chat-ZXF227MP.js} +23 -23
- package/dist/cli/{chunk-JMDE6IO3.js → chunk-3FULTFRB.js} +2 -2
- package/dist/cli/{chunk-7M4YYMKW.js → chunk-43ROGEX2.js} +47 -55
- package/dist/cli/{chunk-7M4YYMKW.js.map → chunk-43ROGEX2.js.map} +1 -1
- package/dist/cli/{chunk-3WGTGXO4.js → chunk-4E2BHJU4.js} +4 -4
- package/dist/cli/chunk-4E2BHJU4.js.map +1 -0
- package/dist/cli/{chunk-HR5NBKEM.js → chunk-5AW6NIHU.js} +2 -2
- package/dist/cli/{chunk-TE5UIIFL.js → chunk-5U5LMMFF.js} +2 -2
- package/dist/cli/{chunk-WZGNXR6E.js → chunk-6FRNXWDZ.js} +320 -75
- package/dist/cli/chunk-6FRNXWDZ.js.map +1 -0
- package/dist/cli/{chunk-6MZTZO7A.js → chunk-DABAOQSV.js} +1826 -1793
- package/dist/cli/chunk-DABAOQSV.js.map +1 -0
- package/dist/cli/{chunk-EMMENC4O.js → chunk-EO6RPTJG.js} +5 -5
- package/dist/cli/{chunk-2QSTA2QV.js → chunk-FD7SNDWW.js} +3 -3
- package/dist/cli/{chunk-CDVSFSAK.js → chunk-FPME5QOO.js} +19 -4
- package/dist/cli/chunk-FPME5QOO.js.map +1 -0
- package/dist/cli/{chunk-5OHHAQ4W.js → chunk-H2F4LDNH.js} +2 -2
- package/dist/cli/{chunk-OG5JANQ4.js → chunk-IKSYVBBZ.js} +2 -2
- package/dist/cli/{chunk-OPYALNTT.js → chunk-JFBGSWQB.js} +77 -38
- package/dist/cli/chunk-JFBGSWQB.js.map +1 -0
- package/dist/cli/{chunk-RUDBUHO4.js → chunk-KH5JIJJD.js} +2 -2
- package/dist/cli/{chunk-H4CCXMDD.js → chunk-NQZ5U37J.js} +2 -2
- package/dist/cli/{chunk-I4M5QJNL.js → chunk-O3AGYTG2.js} +2 -2
- package/dist/cli/{chunk-YW63N3ZR.js → chunk-PIC5HJRD.js} +124 -18
- package/dist/cli/chunk-PIC5HJRD.js.map +1 -0
- package/dist/cli/{chunk-NMQSUNLB.js → chunk-PJIQIYTV.js} +6 -3
- package/dist/cli/chunk-PJIQIYTV.js.map +1 -0
- package/dist/cli/{chunk-V4Y732RQ.js → chunk-R7U44O3Y.js} +2 -2
- package/dist/cli/{chunk-OB4BUJBL.js → chunk-RCLS63KE.js} +5 -2
- package/dist/cli/chunk-RCLS63KE.js.map +1 -0
- package/dist/cli/{chunk-FY4S7TJZ.js → chunk-SLAFMXAZ.js} +10 -2
- package/dist/cli/chunk-SLAFMXAZ.js.map +1 -0
- package/dist/cli/{chunk-DOWEOA6E.js → chunk-SWUMD2LX.js} +2 -2
- package/dist/cli/{chunk-S2RMQULY.js → chunk-TIJ4ZHD6.js} +7 -7
- package/dist/cli/{chunk-MOJYKO2A.js → chunk-WKOXKCF3.js} +3 -3
- package/dist/cli/{chunk-MRZG4GBF.js → chunk-XMR2VCGT.js} +3 -3
- package/dist/cli/{code-PMPJWXEO.js → code-OKA5YPOH.js} +26 -26
- package/dist/cli/{commands-QS6TG4G3.js → commands-3U6PUVSS.js} +4 -4
- package/dist/cli/{commit-XPRSKUBF.js → commit-HFB7SRBU.js} +3 -3
- package/dist/cli/{desktop-562OPWIU.js → desktop-G7UMW3CJ.js} +60 -23
- package/dist/cli/desktop-G7UMW3CJ.js.map +1 -0
- package/dist/cli/{diff-I6W4AUWJ.js → diff-PGXW4YZD.js} +8 -8
- package/dist/cli/{doctor-6XVZKT4U.js → doctor-WWJFLVCB.js} +8 -8
- package/dist/cli/index.js +33 -33
- package/dist/cli/{mcp-7W7ANO2Y.js → mcp-Y3VKIK3T.js} +2 -2
- package/dist/cli/{mcp-browse-LA4I4YIZ.js → mcp-browse-4IN2QIFR.js} +2 -2
- package/dist/cli/{mcp-inspect-LWXXU7BY.js → mcp-inspect-BUXFXDHB.js} +2 -2
- package/dist/cli/{prompt-RKZD4X6Y.js → prompt-US57R6BA.js} +5 -4
- package/dist/cli/{replay-2X7MVXOI.js → replay-EQJMZRB3.js} +8 -8
- package/dist/cli/{run-TPKXIJ27.js → run-KVEI66TR.js} +14 -14
- package/dist/cli/{server-NHQ3QXOZ.js → server-D6C4GHWN.js} +13 -11
- package/dist/cli/server-D6C4GHWN.js.map +1 -0
- package/dist/cli/{sessions-2A4DGSHA.js → sessions-TGVS2RQZ.js} +13 -13
- package/dist/cli/{setup-GOLP7J4C.js → setup-WLKX6GGG.js} +5 -5
- package/dist/cli/{stats-CGDAFDKI.js → stats-TCD7Q6MB.js} +6 -6
- package/dist/cli/{version-FIL4ZFOS.js → version-BCWWS2OU.js} +13 -13
- package/dist/index.d.ts +8 -2
- package/dist/index.js +200 -46
- package/dist/index.js.map +1 -1
- package/package.json +5 -2
- package/dist/cli/acp-4ROCGYNH.js.map +0 -1
- package/dist/cli/chunk-3WGTGXO4.js.map +0 -1
- package/dist/cli/chunk-6MZTZO7A.js.map +0 -1
- package/dist/cli/chunk-CDVSFSAK.js.map +0 -1
- package/dist/cli/chunk-FY4S7TJZ.js.map +0 -1
- package/dist/cli/chunk-NMQSUNLB.js.map +0 -1
- package/dist/cli/chunk-OB4BUJBL.js.map +0 -1
- package/dist/cli/chunk-OPYALNTT.js.map +0 -1
- package/dist/cli/chunk-WZGNXR6E.js.map +0 -1
- package/dist/cli/chunk-YW63N3ZR.js.map +0 -1
- package/dist/cli/desktop-562OPWIU.js.map +0 -1
- package/dist/cli/server-NHQ3QXOZ.js.map +0 -1
- /package/dist/cli/{chat-GZNB5625.js.map → chat-ZXF227MP.js.map} +0 -0
- /package/dist/cli/{chunk-JMDE6IO3.js.map → chunk-3FULTFRB.js.map} +0 -0
- /package/dist/cli/{chunk-HR5NBKEM.js.map → chunk-5AW6NIHU.js.map} +0 -0
- /package/dist/cli/{chunk-TE5UIIFL.js.map → chunk-5U5LMMFF.js.map} +0 -0
- /package/dist/cli/{chunk-EMMENC4O.js.map → chunk-EO6RPTJG.js.map} +0 -0
- /package/dist/cli/{chunk-2QSTA2QV.js.map → chunk-FD7SNDWW.js.map} +0 -0
- /package/dist/cli/{chunk-5OHHAQ4W.js.map → chunk-H2F4LDNH.js.map} +0 -0
- /package/dist/cli/{chunk-OG5JANQ4.js.map → chunk-IKSYVBBZ.js.map} +0 -0
- /package/dist/cli/{chunk-RUDBUHO4.js.map → chunk-KH5JIJJD.js.map} +0 -0
- /package/dist/cli/{chunk-H4CCXMDD.js.map → chunk-NQZ5U37J.js.map} +0 -0
- /package/dist/cli/{chunk-I4M5QJNL.js.map → chunk-O3AGYTG2.js.map} +0 -0
- /package/dist/cli/{chunk-V4Y732RQ.js.map → chunk-R7U44O3Y.js.map} +0 -0
- /package/dist/cli/{chunk-DOWEOA6E.js.map → chunk-SWUMD2LX.js.map} +0 -0
- /package/dist/cli/{chunk-S2RMQULY.js.map → chunk-TIJ4ZHD6.js.map} +0 -0
- /package/dist/cli/{chunk-MOJYKO2A.js.map → chunk-WKOXKCF3.js.map} +0 -0
- /package/dist/cli/{chunk-MRZG4GBF.js.map → chunk-XMR2VCGT.js.map} +0 -0
- /package/dist/cli/{code-PMPJWXEO.js.map → code-OKA5YPOH.js.map} +0 -0
- /package/dist/cli/{commands-QS6TG4G3.js.map → commands-3U6PUVSS.js.map} +0 -0
- /package/dist/cli/{commit-XPRSKUBF.js.map → commit-HFB7SRBU.js.map} +0 -0
- /package/dist/cli/{diff-I6W4AUWJ.js.map → diff-PGXW4YZD.js.map} +0 -0
- /package/dist/cli/{doctor-6XVZKT4U.js.map → doctor-WWJFLVCB.js.map} +0 -0
- /package/dist/cli/{mcp-7W7ANO2Y.js.map → mcp-Y3VKIK3T.js.map} +0 -0
- /package/dist/cli/{mcp-browse-LA4I4YIZ.js.map → mcp-browse-4IN2QIFR.js.map} +0 -0
- /package/dist/cli/{mcp-inspect-LWXXU7BY.js.map → mcp-inspect-BUXFXDHB.js.map} +0 -0
- /package/dist/cli/{prompt-RKZD4X6Y.js.map → prompt-US57R6BA.js.map} +0 -0
- /package/dist/cli/{replay-2X7MVXOI.js.map → replay-EQJMZRB3.js.map} +0 -0
- /package/dist/cli/{run-TPKXIJ27.js.map → run-KVEI66TR.js.map} +0 -0
- /package/dist/cli/{sessions-2A4DGSHA.js.map → sessions-TGVS2RQZ.js.map} +0 -0
- /package/dist/cli/{setup-GOLP7J4C.js.map → setup-WLKX6GGG.js.map} +0 -0
- /package/dist/cli/{stats-CGDAFDKI.js.map → stats-TCD7Q6MB.js.map} +0 -0
- /package/dist/cli/{version-FIL4ZFOS.js.map → version-BCWWS2OU.js.map} +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire as __cr } from 'node:module'; if (typeof globalThis.require === 'undefined') { globalThis.require = __cr(import.meta.url); }
|
|
3
3
|
import {
|
|
4
4
|
registerSkillTools
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-RCLS63KE.js";
|
|
6
6
|
import {
|
|
7
7
|
preflightStdioSpec
|
|
8
8
|
} from "./chunk-EQATK2L2.js";
|
|
@@ -17,20 +17,20 @@ import {
|
|
|
17
17
|
registerTodoTool,
|
|
18
18
|
registerWebTools,
|
|
19
19
|
spawnSubagent
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-JFBGSWQB.js";
|
|
21
21
|
import {
|
|
22
22
|
DeepSeekClient
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-5U5LMMFF.js";
|
|
24
24
|
import {
|
|
25
25
|
bootstrapSemanticSearchInCodeMode
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-R7U44O3Y.js";
|
|
27
27
|
import {
|
|
28
28
|
JobRegistry,
|
|
29
29
|
registerShellTools
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-6FRNXWDZ.js";
|
|
31
31
|
import {
|
|
32
32
|
SkillStore
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-SLAFMXAZ.js";
|
|
34
34
|
import {
|
|
35
35
|
MCP_CATALOG
|
|
36
36
|
} from "./chunk-PLHAZOLZ.js";
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
readConfig,
|
|
47
47
|
searchEnabled,
|
|
48
48
|
writeConfig
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-FPME5QOO.js";
|
|
50
50
|
|
|
51
51
|
// src/tools/code-query.ts
|
|
52
52
|
import { readFile } from "fs/promises";
|
|
@@ -4645,13 +4645,30 @@ var ClassSourceFinder = class _ClassSourceFinder {
|
|
|
4645
4645
|
return null;
|
|
4646
4646
|
}
|
|
4647
4647
|
async searchRepositories(fqn, jarKeyword) {
|
|
4648
|
+
const javaEntry = `${fqn.replace(/\./g, "/")}.java`;
|
|
4648
4649
|
const classEntry = `${fqn.replace(/\./g, "/")}.class`;
|
|
4649
|
-
const
|
|
4650
|
+
const sourceJars = [];
|
|
4651
|
+
const regularJars = [];
|
|
4650
4652
|
for (const repoDir of this.repoPaths) {
|
|
4651
|
-
await this.walkForJars(repoDir,
|
|
4653
|
+
await this.walkForJars(repoDir, sourceJars, regularJars, jarKeyword);
|
|
4654
|
+
}
|
|
4655
|
+
for (const jarPath of sourceJars) {
|
|
4656
|
+
this.throwIfAborted();
|
|
4657
|
+
try {
|
|
4658
|
+
const content = readJarEntry(jarPath, javaEntry);
|
|
4659
|
+
if (content) {
|
|
4660
|
+
return {
|
|
4661
|
+
found: true,
|
|
4662
|
+
source: content.data.toString("utf-8"),
|
|
4663
|
+
method: "m2-source-jar",
|
|
4664
|
+
sourcePath: jarPath
|
|
4665
|
+
};
|
|
4666
|
+
}
|
|
4667
|
+
} catch {
|
|
4668
|
+
}
|
|
4652
4669
|
}
|
|
4653
4670
|
let scanned = 0;
|
|
4654
|
-
for (const jarPath of
|
|
4671
|
+
for (const jarPath of regularJars) {
|
|
4655
4672
|
this.throwIfAborted();
|
|
4656
4673
|
if (scanned >= this.maxJarScan) break;
|
|
4657
4674
|
scanned++;
|
|
@@ -4667,7 +4684,7 @@ var ClassSourceFinder = class _ClassSourceFinder {
|
|
|
4667
4684
|
return { found: false, method: "not-found" };
|
|
4668
4685
|
}
|
|
4669
4686
|
static MAX_WALK_DEPTH = 64;
|
|
4670
|
-
async walkForJars(dir,
|
|
4687
|
+
async walkForJars(dir, sourceJars, regularJars, keyword, depth = 0) {
|
|
4671
4688
|
if (depth >= _ClassSourceFinder.MAX_WALK_DEPTH) return;
|
|
4672
4689
|
let entries;
|
|
4673
4690
|
try {
|
|
@@ -4677,13 +4694,17 @@ var ClassSourceFinder = class _ClassSourceFinder {
|
|
|
4677
4694
|
}
|
|
4678
4695
|
for (const entry of entries) {
|
|
4679
4696
|
this.throwIfAborted();
|
|
4680
|
-
if (
|
|
4697
|
+
if (sourceJars.length + regularJars.length >= this.maxJarScan) return;
|
|
4681
4698
|
const fullPath = path.join(dir, entry.name);
|
|
4682
4699
|
if (entry.isDirectory()) {
|
|
4683
|
-
await this.walkForJars(fullPath,
|
|
4700
|
+
await this.walkForJars(fullPath, sourceJars, regularJars, keyword, depth + 1);
|
|
4684
4701
|
} else if (entry.isFile() && entry.name.endsWith(".jar")) {
|
|
4685
4702
|
if (!keyword || fullPath.toLowerCase().includes(keyword.toLowerCase())) {
|
|
4686
|
-
|
|
4703
|
+
if (entry.name.endsWith("-sources.jar") || entry.name.includes("-sources-")) {
|
|
4704
|
+
sourceJars.push(fullPath);
|
|
4705
|
+
} else {
|
|
4706
|
+
regularJars.push(fullPath);
|
|
4707
|
+
}
|
|
4687
4708
|
}
|
|
4688
4709
|
}
|
|
4689
4710
|
}
|
|
@@ -4768,10 +4789,7 @@ function registerJavaSourceTool(registry, opts = {}) {
|
|
|
4768
4789
|
description: [
|
|
4769
4790
|
"Find and return Java source code by fully-qualified class name.",
|
|
4770
4791
|
"",
|
|
4771
|
-
"
|
|
4772
|
-
"1. **Default** (className + jarKeyword): walk project tree for a `.java` file, then scan `~/.m2/repository` jars whose path/name contains the keyword.",
|
|
4773
|
-
"2. **Without keyword** (className only): same as default but scans ALL jars \u2014 much slower, use only when you don't know the library.",
|
|
4774
|
-
"3. **With jarPath** (className + jarPath): skip both project + .m2 scans, decompile directly from the specified jar file.",
|
|
4792
|
+
"Search mode: walk the project tree for a `.java` file, then scan `~/.m2/repository` jars whose filename or path contains `jarKeyword`.",
|
|
4775
4793
|
"",
|
|
4776
4794
|
"Returns the source text (or decompiled bytecode) on success, or a clear 'not found' message.",
|
|
4777
4795
|
"Only call this tool once per class name \u2014 it's I/O heavy."
|
|
@@ -4784,20 +4802,12 @@ function registerJavaSourceTool(registry, opts = {}) {
|
|
|
4784
4802
|
type: "string",
|
|
4785
4803
|
description: 'Fully qualified Java class name, e.g. "com.google.common.collect.Lists" or "org.springframework.web.servlet.DispatcherServlet".'
|
|
4786
4804
|
},
|
|
4787
|
-
projectRoot: {
|
|
4788
|
-
type: "string",
|
|
4789
|
-
description: "Optional. Override the project root directory for phase-1 file search. Defaults to the current session's workspace root."
|
|
4790
|
-
},
|
|
4791
|
-
jarPath: {
|
|
4792
|
-
type: "string",
|
|
4793
|
-
description: 'Optional. Exact path to a .jar file. When set, skips project file search and .m2 scan \u2014 reads the class directly from this jar and decompiles it. Useful when you know which dependency jar contains the class, e.g. "/home/user/.m2/repository/org/springframework/spring-core/6.1.0/spring-core-6.1.0.jar".'
|
|
4794
|
-
},
|
|
4795
4805
|
jarKeyword: {
|
|
4796
4806
|
type: "string",
|
|
4797
|
-
description: '
|
|
4807
|
+
description: 'Only search jars whose filename or path contains this keyword (case-insensitive). Keep it short \u2014 a narrow substring like "spring-core", "guava", or "mycompany-utils" scans faster and matches more precisely than a long fragment.'
|
|
4798
4808
|
}
|
|
4799
4809
|
},
|
|
4800
|
-
required: ["className"]
|
|
4810
|
+
required: ["className", "jarKeyword"]
|
|
4801
4811
|
},
|
|
4802
4812
|
parallelSafe: true,
|
|
4803
4813
|
fn: async (args2) => {
|
|
@@ -4810,34 +4820,16 @@ function registerJavaSourceTool(registry, opts = {}) {
|
|
|
4810
4820
|
`java_source: "${className}" is not a valid fully qualified Java class name. Expected format: \`com.example.MyClass\``
|
|
4811
4821
|
);
|
|
4812
4822
|
}
|
|
4813
|
-
const jarKeyword =
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
const finder = new ClassSourceFinder({ projectRoot });
|
|
4817
|
-
if (jarPath) {
|
|
4818
|
-
const result2 = await finder.findSourceInJar(className, jarPath);
|
|
4819
|
-
if (!result2.found) {
|
|
4820
|
-
return JSON.stringify({
|
|
4821
|
-
status: "not-found",
|
|
4822
|
-
className,
|
|
4823
|
-
message: `Class "${className}" not found in jar:
|
|
4824
|
-
${jarPath}
|
|
4825
|
-
|
|
4826
|
-
Make sure the class name is correct and that the jar contains that entry.`
|
|
4827
|
-
});
|
|
4828
|
-
}
|
|
4829
|
-
return JSON.stringify({
|
|
4830
|
-
status: "found",
|
|
4831
|
-
className,
|
|
4832
|
-
method: result2.method,
|
|
4833
|
-
sourcePath: result2.sourcePath,
|
|
4834
|
-
source: result2.source
|
|
4835
|
-
});
|
|
4823
|
+
const jarKeyword = args2.jarKeyword.trim();
|
|
4824
|
+
if (!jarKeyword) {
|
|
4825
|
+
throw new Error("java_source: `jarKeyword` must not be empty");
|
|
4836
4826
|
}
|
|
4837
|
-
const
|
|
4827
|
+
const projectRoot = opts.projectRoot || process.cwd();
|
|
4828
|
+
const finder = new ClassSourceFinder({ projectRoot });
|
|
4829
|
+
const result = await finder.findSource(className, { jarKeyword });
|
|
4838
4830
|
if (!result.found) {
|
|
4839
|
-
const keywordLine =
|
|
4840
|
-
const tip =
|
|
4831
|
+
const keywordLine = ` \u2022 Maven .m2 / Gradle cache for jars containing keyword "${jarKeyword}"`;
|
|
4832
|
+
const tip = "Try a different keyword, or check if the class is in a different library.";
|
|
4841
4833
|
return JSON.stringify({
|
|
4842
4834
|
status: "not-found",
|
|
4843
4835
|
className,
|
|
@@ -5195,4 +5187,4 @@ async function buildCodeToolset(opts) {
|
|
|
5195
5187
|
export {
|
|
5196
5188
|
buildCodeToolset
|
|
5197
5189
|
};
|
|
5198
|
-
//# sourceMappingURL=chunk-
|
|
5190
|
+
//# sourceMappingURL=chunk-43ROGEX2.js.map
|