@morphllm/morphsdk 0.2.74 → 0.2.76
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/dist/{chunk-B5A4XLSQ.js → chunk-FY32COVL.js} +1 -1
- package/dist/{chunk-B5A4XLSQ.js.map → chunk-FY32COVL.js.map} +1 -1
- package/dist/{chunk-4WJSTOHP.js → chunk-G2EJHZSA.js} +2 -2
- package/dist/{chunk-QIG7YPFW.js → chunk-HBIDSKIQ.js} +14 -3
- package/dist/chunk-HBIDSKIQ.js.map +1 -0
- package/dist/{chunk-KEHWEBFQ.js → chunk-KILYNOE4.js} +5 -5
- package/dist/{chunk-POVU2CPK.js → chunk-P2LHXSMG.js} +2 -2
- package/dist/{chunk-IYLEB6BY.js → chunk-RK2MR3N2.js} +2 -2
- package/dist/{chunk-NGF2VIQV.js → chunk-XREWLWLA.js} +2 -2
- package/dist/{chunk-SMGZ6A64.js → chunk-YPKNMYD4.js} +17 -1
- package/dist/chunk-YPKNMYD4.js.map +1 -0
- package/dist/client.cjs +26 -1
- package/dist/client.cjs.map +1 -1
- package/dist/client.js +7 -7
- package/dist/index.cjs +26 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -8
- package/dist/tools/browser/index.cjs.map +1 -1
- package/dist/tools/browser/index.js.map +1 -1
- package/dist/tools/warp_grep/anthropic.cjs +26 -1
- package/dist/tools/warp_grep/anthropic.cjs.map +1 -1
- package/dist/tools/warp_grep/anthropic.js +4 -4
- package/dist/tools/warp_grep/client.cjs +26 -1
- package/dist/tools/warp_grep/client.cjs.map +1 -1
- package/dist/tools/warp_grep/client.js +3 -3
- package/dist/tools/warp_grep/gemini.cjs +26 -1
- package/dist/tools/warp_grep/gemini.cjs.map +1 -1
- package/dist/tools/warp_grep/gemini.js +3 -3
- package/dist/tools/warp_grep/harness.cjs +26 -1
- package/dist/tools/warp_grep/harness.cjs.map +1 -1
- package/dist/tools/warp_grep/harness.js +2 -2
- package/dist/tools/warp_grep/index.cjs +28 -1
- package/dist/tools/warp_grep/index.cjs.map +1 -1
- package/dist/tools/warp_grep/index.d.ts +1 -0
- package/dist/tools/warp_grep/index.js +7 -4
- package/dist/tools/warp_grep/openai.cjs +26 -1
- package/dist/tools/warp_grep/openai.cjs.map +1 -1
- package/dist/tools/warp_grep/openai.js +4 -4
- package/dist/tools/warp_grep/providers/local.cjs +26 -1
- package/dist/tools/warp_grep/providers/local.cjs.map +1 -1
- package/dist/tools/warp_grep/providers/local.js +2 -2
- package/dist/tools/warp_grep/utils/paths.cjs +17 -0
- package/dist/tools/warp_grep/utils/paths.cjs.map +1 -1
- package/dist/tools/warp_grep/utils/paths.d.ts +13 -1
- package/dist/tools/warp_grep/utils/paths.js +3 -1
- package/dist/tools/warp_grep/vercel.cjs +26 -1
- package/dist/tools/warp_grep/vercel.cjs.map +1 -1
- package/dist/tools/warp_grep/vercel.js +4 -4
- package/package.json +1 -1
- package/dist/chunk-QIG7YPFW.js.map +0 -1
- package/dist/chunk-SMGZ6A64.js.map +0 -1
- /package/dist/{chunk-4WJSTOHP.js.map → chunk-G2EJHZSA.js.map} +0 -0
- /package/dist/{chunk-KEHWEBFQ.js.map → chunk-KILYNOE4.js.map} +0 -0
- /package/dist/{chunk-POVU2CPK.js.map → chunk-P2LHXSMG.js.map} +0 -0
- /package/dist/{chunk-IYLEB6BY.js.map → chunk-RK2MR3N2.js.map} +0 -0
- /package/dist/{chunk-NGF2VIQV.js.map → chunk-XREWLWLA.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
warpGrepInputSchema
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-FY32COVL.js";
|
|
4
4
|
import {
|
|
5
5
|
WARP_GREP_DESCRIPTION,
|
|
6
6
|
WARP_GREP_TOOL_NAME
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
executeToolCall,
|
|
11
11
|
executeWarpGrep,
|
|
12
12
|
formatResult
|
|
13
|
-
} from "../../chunk-
|
|
13
|
+
} from "../../chunk-XREWLWLA.js";
|
|
14
14
|
import {
|
|
15
15
|
runWarpGrep
|
|
16
16
|
} from "../../chunk-RRWN62VU.js";
|
|
@@ -32,9 +32,11 @@ import {
|
|
|
32
32
|
} from "../../chunk-Q5AHGIQO.js";
|
|
33
33
|
import {
|
|
34
34
|
LocalRipgrepProvider
|
|
35
|
-
} from "../../chunk-
|
|
35
|
+
} from "../../chunk-HBIDSKIQ.js";
|
|
36
36
|
import "../../chunk-G2RSY56Q.js";
|
|
37
|
-
import
|
|
37
|
+
import {
|
|
38
|
+
fixPathRepetition
|
|
39
|
+
} from "../../chunk-YPKNMYD4.js";
|
|
38
40
|
import "../../chunk-TPP2UGQP.js";
|
|
39
41
|
import "../../chunk-XT5ZO6ES.js";
|
|
40
42
|
import "../../chunk-4VWJFZVS.js";
|
|
@@ -48,6 +50,7 @@ export {
|
|
|
48
50
|
WarpGrepClient,
|
|
49
51
|
executeToolCall,
|
|
50
52
|
executeWarpGrep,
|
|
53
|
+
fixPathRepetition,
|
|
51
54
|
formatResult,
|
|
52
55
|
getSystemPrompt,
|
|
53
56
|
normalizeFinishFiles,
|
|
@@ -1184,6 +1184,21 @@ function isSymlink(p) {
|
|
|
1184
1184
|
return false;
|
|
1185
1185
|
}
|
|
1186
1186
|
}
|
|
1187
|
+
function fixPathRepetition(fullPath) {
|
|
1188
|
+
const segments = fullPath.split(import_path3.default.sep).filter(Boolean);
|
|
1189
|
+
if (segments.length < 2) return null;
|
|
1190
|
+
for (let len = Math.floor(segments.length / 2); len >= 1; len--) {
|
|
1191
|
+
for (let i = 0; i <= segments.length - 2 * len; i++) {
|
|
1192
|
+
const first = segments.slice(i, i + len);
|
|
1193
|
+
const second = segments.slice(i + len, i + 2 * len);
|
|
1194
|
+
if (first.every((seg, idx) => seg === second[idx])) {
|
|
1195
|
+
const fixed = [...segments.slice(0, i), ...segments.slice(i + len)];
|
|
1196
|
+
return import_path3.default.sep + fixed.join(import_path3.default.sep);
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
return null;
|
|
1201
|
+
}
|
|
1187
1202
|
function isTextualFile(filePath, maxBytes = 2e6) {
|
|
1188
1203
|
try {
|
|
1189
1204
|
const st = import_fs.default.statSync(filePath);
|
|
@@ -1366,7 +1381,17 @@ Details: ${res.stderr}` : ""}`
|
|
|
1366
1381
|
error: `[PATH ERROR] ${err instanceof Error ? err.message : String(err)}`
|
|
1367
1382
|
};
|
|
1368
1383
|
}
|
|
1369
|
-
|
|
1384
|
+
let stat = await import_promises2.default.stat(abs).catch(() => null);
|
|
1385
|
+
if (!stat || !stat.isFile()) {
|
|
1386
|
+
const fixedPath = fixPathRepetition(abs);
|
|
1387
|
+
if (fixedPath) {
|
|
1388
|
+
const fixedStat = await import_promises2.default.stat(fixedPath).catch(() => null);
|
|
1389
|
+
if (fixedStat?.isFile()) {
|
|
1390
|
+
abs = fixedPath;
|
|
1391
|
+
stat = fixedStat;
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1370
1395
|
if (!stat || !stat.isFile()) {
|
|
1371
1396
|
return {
|
|
1372
1397
|
lines: [],
|