@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
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
executeToolCallStreaming,
|
|
5
5
|
executeWarpGrep,
|
|
6
6
|
formatResult
|
|
7
|
-
} from "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
7
|
+
} from "../../chunk-G7RSAZIK.js";
|
|
8
|
+
import "../../chunk-QL7MV3GT.js";
|
|
9
9
|
import "../../chunk-PUGSTXLO.js";
|
|
10
10
|
import "../../chunk-3MLWXJTJ.js";
|
|
11
|
-
import "../../chunk-
|
|
11
|
+
import "../../chunk-GHGJAQSJ.js";
|
|
12
12
|
import "../../chunk-FMLHRJDF.js";
|
|
13
13
|
import "../../chunk-5PNMAWLC.js";
|
|
14
14
|
import "../../chunk-APP75CBN.js";
|
|
@@ -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;
|
|
@@ -876,9 +881,23 @@ function parseNestedXmlTools(text) {
|
|
|
876
881
|
}
|
|
877
882
|
if (files.length > 0) {
|
|
878
883
|
tools.push({ name: "finish", arguments: { files } });
|
|
884
|
+
} else {
|
|
885
|
+
const raw = content.replace(/<[^>]*>/g, "").trim();
|
|
886
|
+
const textResult = !raw || raw === "*" ? "No relevant code found." : raw;
|
|
887
|
+
tools.push({ name: "finish", arguments: { files: [], textResult } });
|
|
879
888
|
}
|
|
880
889
|
}
|
|
881
890
|
}
|
|
891
|
+
if (tools.length === 0) {
|
|
892
|
+
const fnFinishMatch = text.match(/<function=finish>([\s\S]*?)<\/function>/i);
|
|
893
|
+
if (fnFinishMatch) {
|
|
894
|
+
const inner = fnFinishMatch[1];
|
|
895
|
+
const paramMatch = inner.match(/<parameter=result>([\s\S]*?)<\/parameter>/i);
|
|
896
|
+
const raw = (paramMatch ? paramMatch[1] : inner).trim();
|
|
897
|
+
const textResult = !raw || raw === "*" ? "No relevant code found." : raw;
|
|
898
|
+
tools.push({ name: "finish", arguments: { files: [], textResult } });
|
|
899
|
+
}
|
|
900
|
+
}
|
|
882
901
|
return tools;
|
|
883
902
|
}
|
|
884
903
|
function preprocessText(text) {
|
|
@@ -1505,8 +1524,20 @@ async function runWarpGrep(config) {
|
|
|
1505
1524
|
if (finishCalls.length) {
|
|
1506
1525
|
const fc = finishCalls[0];
|
|
1507
1526
|
const files = fc.arguments?.files ?? [];
|
|
1527
|
+
const textResult = fc.arguments?.textResult;
|
|
1508
1528
|
finishMeta = { files };
|
|
1509
1529
|
terminationReason = "completed";
|
|
1530
|
+
if (files.length === 0) {
|
|
1531
|
+
const payload2 = textResult || "No relevant code found.";
|
|
1532
|
+
timings.turns.push(turnMetrics);
|
|
1533
|
+
timings.total_ms = Date.now() - totalStart;
|
|
1534
|
+
return {
|
|
1535
|
+
terminationReason: "completed",
|
|
1536
|
+
messages,
|
|
1537
|
+
finish: { payload: payload2, metadata: finishMeta },
|
|
1538
|
+
timings
|
|
1539
|
+
};
|
|
1540
|
+
}
|
|
1510
1541
|
break;
|
|
1511
1542
|
}
|
|
1512
1543
|
}
|