@morphllm/morphsdk 0.2.117 → 0.2.119
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-C3LJORIT.js → chunk-3T4BGWCV.js} +5 -5
- package/dist/{chunk-OVNPKTEG.js → chunk-G7RSAZIK.js} +2 -2
- package/dist/{chunk-SNGGSPYJ.js → chunk-GHGJAQSJ.js} +15 -1
- package/dist/chunk-GHGJAQSJ.js.map +1 -0
- package/dist/{chunk-YJZP5ZL5.js → chunk-HMQSMEN2.js} +7 -2
- package/dist/{chunk-YJZP5ZL5.js.map → chunk-HMQSMEN2.js.map} +1 -1
- package/dist/{chunk-3JVHMOYJ.js → chunk-K4EO7S2O.js} +2 -2
- package/dist/{chunk-5JARN2NG.js → chunk-OOCSNAA5.js} +2 -2
- package/dist/{chunk-RBOCP2MX.js → chunk-QL7MV3GT.js} +25 -2
- package/dist/chunk-QL7MV3GT.js.map +1 -0
- package/dist/{chunk-GENFEPHG.js → chunk-WVTX3QS6.js} +2 -2
- package/dist/client.cjs +43 -1
- package/dist/client.cjs.map +1 -1
- package/dist/client.js +7 -7
- package/dist/index.cjs +43 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -8
- package/dist/tools/warp_grep/agent/parser.cjs +14 -0
- 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 +37 -0
- package/dist/tools/warp_grep/agent/runner.cjs.map +1 -1
- package/dist/tools/warp_grep/agent/runner.js +2 -2
- package/dist/tools/warp_grep/anthropic.cjs +32 -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 +43 -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 +32 -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 +20 -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 +43 -1
- package/dist/tools/warp_grep/index.cjs.map +1 -1
- package/dist/tools/warp_grep/index.js +4 -4
- package/dist/tools/warp_grep/openai.cjs +32 -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 +6 -1
- package/dist/tools/warp_grep/providers/local.cjs.map +1 -1
- package/dist/tools/warp_grep/providers/local.js +1 -1
- package/dist/tools/warp_grep/vercel.cjs +43 -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-RBOCP2MX.js.map +0 -1
- package/dist/chunk-SNGGSPYJ.js.map +0 -1
- /package/dist/{chunk-C3LJORIT.js.map → chunk-3T4BGWCV.js.map} +0 -0
- /package/dist/{chunk-OVNPKTEG.js.map → chunk-G7RSAZIK.js.map} +0 -0
- /package/dist/{chunk-3JVHMOYJ.js.map → chunk-K4EO7S2O.js.map} +0 -0
- /package/dist/{chunk-5JARN2NG.js.map → chunk-OOCSNAA5.js.map} +0 -0
- /package/dist/{chunk-GENFEPHG.js.map → chunk-WVTX3QS6.js.map} +0 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "../../chunk-L5C6E32T.js";
|
|
4
4
|
import {
|
|
5
5
|
LocalRipgrepProvider
|
|
6
|
-
} from "../../chunk-
|
|
6
|
+
} from "../../chunk-HMQSMEN2.js";
|
|
7
7
|
import {
|
|
8
8
|
fixPathRepetition
|
|
9
9
|
} from "../../chunk-YPKNMYD4.js";
|
|
@@ -18,11 +18,11 @@ import {
|
|
|
18
18
|
executeToolCall,
|
|
19
19
|
executeWarpGrep,
|
|
20
20
|
formatResult
|
|
21
|
-
} from "../../chunk-
|
|
21
|
+
} from "../../chunk-G7RSAZIK.js";
|
|
22
22
|
import {
|
|
23
23
|
runWarpGrep,
|
|
24
24
|
runWarpGrepStreaming
|
|
25
|
-
} from "../../chunk-
|
|
25
|
+
} from "../../chunk-QL7MV3GT.js";
|
|
26
26
|
import {
|
|
27
27
|
RemoteCommandsProvider
|
|
28
28
|
} from "../../chunk-PUGSTXLO.js";
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
toolListDirectory,
|
|
34
34
|
toolRead
|
|
35
35
|
} from "../../chunk-3MLWXJTJ.js";
|
|
36
|
-
import "../../chunk-
|
|
36
|
+
import "../../chunk-GHGJAQSJ.js";
|
|
37
37
|
import {
|
|
38
38
|
SYSTEM_PROMPT,
|
|
39
39
|
getSystemPrompt
|
|
@@ -539,7 +539,12 @@ Details: ${res.stderr}` : ""}`
|
|
|
539
539
|
return;
|
|
540
540
|
}
|
|
541
541
|
if (depth > maxDepth || results.length >= maxResults) return;
|
|
542
|
-
|
|
542
|
+
let entries;
|
|
543
|
+
try {
|
|
544
|
+
entries = await import_promises2.default.readdir(dir, { withFileTypes: true });
|
|
545
|
+
} catch {
|
|
546
|
+
return;
|
|
547
|
+
}
|
|
543
548
|
for (const entry of entries) {
|
|
544
549
|
if (timedOut || results.length >= maxResults) break;
|
|
545
550
|
if (shouldSkip2(entry.name)) continue;
|
|
@@ -875,9 +880,23 @@ function parseNestedXmlTools(text) {
|
|
|
875
880
|
}
|
|
876
881
|
if (files.length > 0) {
|
|
877
882
|
tools.push({ name: "finish", arguments: { files } });
|
|
883
|
+
} else {
|
|
884
|
+
const raw = content.replace(/<[^>]*>/g, "").trim();
|
|
885
|
+
const textResult = !raw || raw === "*" ? "No relevant code found." : raw;
|
|
886
|
+
tools.push({ name: "finish", arguments: { files: [], textResult } });
|
|
878
887
|
}
|
|
879
888
|
}
|
|
880
889
|
}
|
|
890
|
+
if (tools.length === 0) {
|
|
891
|
+
const fnFinishMatch = text.match(/<function=finish>([\s\S]*?)<\/function>/i);
|
|
892
|
+
if (fnFinishMatch) {
|
|
893
|
+
const inner = fnFinishMatch[1];
|
|
894
|
+
const paramMatch = inner.match(/<parameter=result>([\s\S]*?)<\/parameter>/i);
|
|
895
|
+
const raw = (paramMatch ? paramMatch[1] : inner).trim();
|
|
896
|
+
const textResult = !raw || raw === "*" ? "No relevant code found." : raw;
|
|
897
|
+
tools.push({ name: "finish", arguments: { files: [], textResult } });
|
|
898
|
+
}
|
|
899
|
+
}
|
|
881
900
|
return tools;
|
|
882
901
|
}
|
|
883
902
|
function preprocessText(text) {
|
|
@@ -1504,8 +1523,20 @@ async function runWarpGrep(config) {
|
|
|
1504
1523
|
if (finishCalls.length) {
|
|
1505
1524
|
const fc = finishCalls[0];
|
|
1506
1525
|
const files = fc.arguments?.files ?? [];
|
|
1526
|
+
const textResult = fc.arguments?.textResult;
|
|
1507
1527
|
finishMeta = { files };
|
|
1508
1528
|
terminationReason = "completed";
|
|
1529
|
+
if (files.length === 0) {
|
|
1530
|
+
const payload2 = textResult || "No relevant code found.";
|
|
1531
|
+
timings.turns.push(turnMetrics);
|
|
1532
|
+
timings.total_ms = Date.now() - totalStart;
|
|
1533
|
+
return {
|
|
1534
|
+
terminationReason: "completed",
|
|
1535
|
+
messages,
|
|
1536
|
+
finish: { payload: payload2, metadata: finishMeta },
|
|
1537
|
+
timings
|
|
1538
|
+
};
|
|
1539
|
+
}
|
|
1509
1540
|
break;
|
|
1510
1541
|
}
|
|
1511
1542
|
}
|