@morphllm/morphsdk 0.2.117 → 0.2.118
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-3JVHMOYJ.js → chunk-3Q7KXILI.js} +2 -2
- package/dist/{chunk-5JARN2NG.js → chunk-A2LIILDJ.js} +2 -2
- package/dist/{chunk-SNGGSPYJ.js → chunk-GHGJAQSJ.js} +15 -1
- package/dist/chunk-GHGJAQSJ.js.map +1 -0
- package/dist/{chunk-C3LJORIT.js → chunk-QFEVCGR6.js} +5 -5
- package/dist/{chunk-RBOCP2MX.js → chunk-QL7MV3GT.js} +25 -2
- package/dist/chunk-QL7MV3GT.js.map +1 -0
- package/dist/{chunk-GENFEPHG.js → chunk-UR76P62F.js} +2 -2
- package/dist/{chunk-OVNPKTEG.js → chunk-YJXAMX3V.js} +2 -2
- package/dist/client.cjs +37 -0
- package/dist/client.cjs.map +1 -1
- package/dist/client.js +7 -7
- package/dist/index.cjs +37 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -7
- 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 +26 -0
- 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 +37 -0
- 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 -0
- 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 +14 -0
- package/dist/tools/warp_grep/harness.cjs.map +1 -1
- package/dist/tools/warp_grep/harness.js +1 -1
- package/dist/tools/warp_grep/index.cjs +37 -0
- package/dist/tools/warp_grep/index.cjs.map +1 -1
- package/dist/tools/warp_grep/index.js +3 -3
- package/dist/tools/warp_grep/openai.cjs +26 -0
- package/dist/tools/warp_grep/openai.cjs.map +1 -1
- package/dist/tools/warp_grep/openai.js +4 -4
- package/dist/tools/warp_grep/vercel.cjs +37 -0
- 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-3JVHMOYJ.js.map → chunk-3Q7KXILI.js.map} +0 -0
- /package/dist/{chunk-5JARN2NG.js.map → chunk-A2LIILDJ.js.map} +0 -0
- /package/dist/{chunk-C3LJORIT.js.map → chunk-QFEVCGR6.js.map} +0 -0
- /package/dist/{chunk-GENFEPHG.js.map → chunk-UR76P62F.js.map} +0 -0
- /package/dist/{chunk-OVNPKTEG.js.map → chunk-YJXAMX3V.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-YJXAMX3V.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";
|
|
@@ -876,9 +876,23 @@ function parseNestedXmlTools(text) {
|
|
|
876
876
|
}
|
|
877
877
|
if (files.length > 0) {
|
|
878
878
|
tools.push({ name: "finish", arguments: { files } });
|
|
879
|
+
} else {
|
|
880
|
+
const raw = content.replace(/<[^>]*>/g, "").trim();
|
|
881
|
+
const textResult = !raw || raw === "*" ? "No relevant code found." : raw;
|
|
882
|
+
tools.push({ name: "finish", arguments: { files: [], textResult } });
|
|
879
883
|
}
|
|
880
884
|
}
|
|
881
885
|
}
|
|
886
|
+
if (tools.length === 0) {
|
|
887
|
+
const fnFinishMatch = text.match(/<function=finish>([\s\S]*?)<\/function>/i);
|
|
888
|
+
if (fnFinishMatch) {
|
|
889
|
+
const inner = fnFinishMatch[1];
|
|
890
|
+
const paramMatch = inner.match(/<parameter=result>([\s\S]*?)<\/parameter>/i);
|
|
891
|
+
const raw = (paramMatch ? paramMatch[1] : inner).trim();
|
|
892
|
+
const textResult = !raw || raw === "*" ? "No relevant code found." : raw;
|
|
893
|
+
tools.push({ name: "finish", arguments: { files: [], textResult } });
|
|
894
|
+
}
|
|
895
|
+
}
|
|
882
896
|
return tools;
|
|
883
897
|
}
|
|
884
898
|
function preprocessText(text) {
|
|
@@ -1505,8 +1519,20 @@ async function runWarpGrep(config) {
|
|
|
1505
1519
|
if (finishCalls.length) {
|
|
1506
1520
|
const fc = finishCalls[0];
|
|
1507
1521
|
const files = fc.arguments?.files ?? [];
|
|
1522
|
+
const textResult = fc.arguments?.textResult;
|
|
1508
1523
|
finishMeta = { files };
|
|
1509
1524
|
terminationReason = "completed";
|
|
1525
|
+
if (files.length === 0) {
|
|
1526
|
+
const payload2 = textResult || "No relevant code found.";
|
|
1527
|
+
timings.turns.push(turnMetrics);
|
|
1528
|
+
timings.total_ms = Date.now() - totalStart;
|
|
1529
|
+
return {
|
|
1530
|
+
terminationReason: "completed",
|
|
1531
|
+
messages,
|
|
1532
|
+
finish: { payload: payload2, metadata: finishMeta },
|
|
1533
|
+
timings
|
|
1534
|
+
};
|
|
1535
|
+
}
|
|
1510
1536
|
break;
|
|
1511
1537
|
}
|
|
1512
1538
|
}
|