@morphllm/morphsdk 0.2.62 → 0.2.63
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-Y7CPJGLU.js → chunk-3SHLMXBV.js} +4 -4
- package/dist/{chunk-Y7CPJGLU.js.map → chunk-3SHLMXBV.js.map} +1 -1
- package/dist/{chunk-GZ7TJ7UB.js → chunk-3WMLFUAR.js} +2 -2
- package/dist/{chunk-3M4DOG6N.js → chunk-5QRN3JNB.js} +9 -9
- package/dist/chunk-5QRN3JNB.js.map +1 -0
- package/dist/{chunk-6Y5JB4JC.js → chunk-DCIUCDWJ.js} +15 -7
- package/dist/{chunk-6Y5JB4JC.js.map → chunk-DCIUCDWJ.js.map} +1 -1
- package/dist/{chunk-LHKFRPUO.js → chunk-GJ573YH3.js} +2 -2
- package/dist/{chunk-Z75HCPIE.js → chunk-GM5VR33N.js} +2 -2
- package/dist/{chunk-44GS4GJJ.js → chunk-PNIQNTXR.js} +2 -2
- package/dist/{chunk-XWSKUQVQ.js → chunk-T6677HCA.js} +5 -5
- package/dist/{chunk-S3RCM32V.js → chunk-TTBXKDCT.js} +2 -2
- package/dist/client.cjs +20 -15
- package/dist/client.cjs.map +1 -1
- package/dist/client.js +8 -8
- package/dist/{finish-kXAcUJyB.d.ts → finish-pPJfB0uO.d.ts} +2 -2
- package/dist/index.cjs +20 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -9
- package/dist/tools/warp_grep/agent/parser.cjs +8 -8
- package/dist/tools/warp_grep/agent/parser.cjs.map +1 -1
- package/dist/tools/warp_grep/agent/parser.js +1 -1
- package/dist/tools/warp_grep/agent/runner.cjs +20 -15
- package/dist/tools/warp_grep/agent/runner.cjs.map +1 -1
- package/dist/tools/warp_grep/agent/runner.js +3 -3
- package/dist/tools/warp_grep/agent/types.cjs.map +1 -1
- package/dist/tools/warp_grep/agent/types.d.ts +2 -2
- package/dist/tools/warp_grep/anthropic.cjs +20 -15
- package/dist/tools/warp_grep/anthropic.cjs.map +1 -1
- package/dist/tools/warp_grep/anthropic.js +5 -5
- package/dist/tools/warp_grep/client.cjs +20 -15
- package/dist/tools/warp_grep/client.cjs.map +1 -1
- package/dist/tools/warp_grep/client.js +4 -4
- package/dist/tools/warp_grep/gemini.cjs +20 -15
- package/dist/tools/warp_grep/gemini.cjs.map +1 -1
- package/dist/tools/warp_grep/gemini.js +5 -5
- package/dist/tools/warp_grep/harness.cjs +22 -14
- package/dist/tools/warp_grep/harness.cjs.map +1 -1
- package/dist/tools/warp_grep/harness.d.ts +1 -1
- package/dist/tools/warp_grep/harness.js +2 -2
- package/dist/tools/warp_grep/harness.js.map +1 -1
- package/dist/tools/warp_grep/index.cjs +23 -15
- package/dist/tools/warp_grep/index.cjs.map +1 -1
- package/dist/tools/warp_grep/index.d.ts +1 -1
- package/dist/tools/warp_grep/index.js +8 -8
- package/dist/tools/warp_grep/openai.cjs +20 -15
- package/dist/tools/warp_grep/openai.cjs.map +1 -1
- package/dist/tools/warp_grep/openai.js +5 -5
- package/dist/tools/warp_grep/vercel.cjs +20 -15
- package/dist/tools/warp_grep/vercel.cjs.map +1 -1
- package/dist/tools/warp_grep/vercel.js +5 -5
- package/package.json +1 -1
- package/dist/chunk-3M4DOG6N.js.map +0 -1
- /package/dist/{chunk-GZ7TJ7UB.js.map → chunk-3WMLFUAR.js.map} +0 -0
- /package/dist/{chunk-LHKFRPUO.js.map → chunk-GJ573YH3.js.map} +0 -0
- /package/dist/{chunk-Z75HCPIE.js.map → chunk-GM5VR33N.js.map} +0 -0
- /package/dist/{chunk-44GS4GJJ.js.map → chunk-PNIQNTXR.js.map} +0 -0
- /package/dist/{chunk-XWSKUQVQ.js.map → chunk-T6677HCA.js.map} +0 -0
- /package/dist/{chunk-S3RCM32V.js.map → chunk-TTBXKDCT.js.map} +0 -0
package/dist/client.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MorphClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-T6677HCA.js";
|
|
4
|
+
import "./chunk-GM5VR33N.js";
|
|
5
|
+
import "./chunk-3WMLFUAR.js";
|
|
6
|
+
import "./chunk-GJ573YH3.js";
|
|
7
7
|
import "./chunk-KW7OEGZK.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-TTBXKDCT.js";
|
|
9
|
+
import "./chunk-3SHLMXBV.js";
|
|
10
10
|
import "./chunk-527P5X2E.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-DCIUCDWJ.js";
|
|
12
12
|
import "./chunk-APP75CBN.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-5QRN3JNB.js";
|
|
14
14
|
import "./chunk-Q5AHGIQO.js";
|
|
15
15
|
import "./chunk-JNOZPU44.js";
|
|
16
16
|
import "./chunk-G2RSY56Q.js";
|
|
@@ -24,9 +24,9 @@ declare function toolListDirectory(provider: WarpGrepProvider, args: {
|
|
|
24
24
|
}): Promise<string>;
|
|
25
25
|
|
|
26
26
|
declare function normalizeFinishFiles(files: FinishFileSpec[]): FinishFileSpec[];
|
|
27
|
-
declare function readFinishFiles(repoRoot: string, files: FinishFileSpec[], reader: (path: string, start
|
|
27
|
+
declare function readFinishFiles(repoRoot: string, files: FinishFileSpec[], reader: (path: string, start?: number, end?: number) => Promise<string[]>): Promise<{
|
|
28
28
|
path: string;
|
|
29
|
-
ranges: Array<[number, number]>;
|
|
29
|
+
ranges: '*' | Array<[number, number]>;
|
|
30
30
|
content: string;
|
|
31
31
|
}[]>;
|
|
32
32
|
|
package/dist/index.cjs
CHANGED
|
@@ -1337,19 +1337,19 @@ function parseNestedXmlTools(text) {
|
|
|
1337
1337
|
const filePath = getXmlElementText(fileContent, "path");
|
|
1338
1338
|
const linesStr = getXmlElementText(fileContent, "lines");
|
|
1339
1339
|
if (filePath && linesStr) {
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1340
|
+
if (linesStr.trim() === "*") {
|
|
1341
|
+
files.push({ path: filePath, lines: "*" });
|
|
1342
|
+
} else {
|
|
1343
|
+
const ranges = [];
|
|
1344
|
+
for (const rangeStr of linesStr.split(",")) {
|
|
1345
1345
|
const [s, e] = rangeStr.split("-").map((v) => parseInt(v.trim(), 10));
|
|
1346
1346
|
if (Number.isFinite(s) && Number.isFinite(e)) {
|
|
1347
1347
|
ranges.push([s, e]);
|
|
1348
1348
|
}
|
|
1349
1349
|
}
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1350
|
+
if (ranges.length > 0) {
|
|
1351
|
+
files.push({ path: filePath, lines: ranges });
|
|
1352
|
+
}
|
|
1353
1353
|
}
|
|
1354
1354
|
}
|
|
1355
1355
|
}
|
|
@@ -1580,13 +1580,18 @@ async function toolListDirectory(provider, args) {
|
|
|
1580
1580
|
async function readFinishFiles(repoRoot, files, reader) {
|
|
1581
1581
|
const out = [];
|
|
1582
1582
|
for (const f of files) {
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1583
|
+
if (f.lines === "*") {
|
|
1584
|
+
const lines = await reader(f.path);
|
|
1585
|
+
out.push({ path: f.path, ranges: "*", content: lines.join("\n") });
|
|
1586
|
+
} else {
|
|
1587
|
+
const ranges = mergeRanges(f.lines);
|
|
1588
|
+
const chunks = [];
|
|
1589
|
+
for (const [s, e] of ranges) {
|
|
1590
|
+
const lines = await reader(f.path, s, e);
|
|
1591
|
+
chunks.push(lines.join("\n"));
|
|
1592
|
+
}
|
|
1593
|
+
out.push({ path: f.path, ranges, content: chunks.join("\n") });
|
|
1588
1594
|
}
|
|
1589
|
-
out.push({ path: f.path, ranges, content: chunks.join("\n") });
|
|
1590
1595
|
}
|
|
1591
1596
|
return out;
|
|
1592
1597
|
}
|
|
@@ -1913,7 +1918,7 @@ async function runWarpGrep(config) {
|
|
|
1913
1918
|
}
|
|
1914
1919
|
const parts = ["Relevant context found:"];
|
|
1915
1920
|
for (const f of finishMeta.files) {
|
|
1916
|
-
const ranges = f.lines.map(([s, e]) => `${s}-${e}`).join(", ");
|
|
1921
|
+
const ranges = f.lines === "*" ? "*" : f.lines.map(([s, e]) => `${s}-${e}`).join(", ");
|
|
1917
1922
|
parts.push(`- ${f.path}: ${ranges}`);
|
|
1918
1923
|
}
|
|
1919
1924
|
const payload = parts.join("\n");
|