@morphllm/morphsdk 0.2.116 → 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-SITZC3U6.js → chunk-5IVVJMMX.js} +2 -2
- package/dist/{chunk-5JARN2NG.js → chunk-A2LIILDJ.js} +2 -2
- package/dist/{chunk-QOEZARHG.js → chunk-EAT5W3SH.js} +2 -2
- package/dist/{chunk-SNGGSPYJ.js → chunk-GHGJAQSJ.js} +15 -1
- package/dist/chunk-GHGJAQSJ.js.map +1 -0
- package/dist/{chunk-25APYVON.js → chunk-PR44LEQQ.js} +2 -2
- package/dist/{chunk-62OVBE6G.js → chunk-QFEVCGR6.js} +6 -6
- 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/{chunk-Q6Y4R236.js → chunk-YTYCHRQ2.js} +7 -9
- package/dist/{chunk-Q6Y4R236.js.map → chunk-YTYCHRQ2.js.map} +1 -1
- package/dist/{chunk-4IOC2D5Y.js → chunk-ZYPLV3HP.js} +2 -2
- package/dist/client.cjs +43 -8
- package/dist/client.cjs.map +1 -1
- package/dist/client.js +9 -9
- package/dist/index.cjs +43 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -9
- package/dist/tools/browser/anthropic.js +3 -3
- package/dist/tools/browser/core.cjs +6 -8
- package/dist/tools/browser/core.cjs.map +1 -1
- package/dist/tools/browser/core.js +2 -2
- package/dist/tools/browser/index.cjs +6 -8
- package/dist/tools/browser/index.cjs.map +1 -1
- package/dist/tools/browser/index.js +5 -5
- package/dist/tools/browser/live.cjs +6 -8
- package/dist/tools/browser/live.cjs.map +1 -1
- package/dist/tools/browser/live.js +1 -1
- package/dist/tools/browser/openai.js +3 -3
- package/dist/tools/browser/vercel.js +3 -3
- 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-SITZC3U6.js.map → chunk-5IVVJMMX.js.map} +0 -0
- /package/dist/{chunk-5JARN2NG.js.map → chunk-A2LIILDJ.js.map} +0 -0
- /package/dist/{chunk-QOEZARHG.js.map → chunk-EAT5W3SH.js.map} +0 -0
- /package/dist/{chunk-25APYVON.js.map → chunk-PR44LEQQ.js.map} +0 -0
- /package/dist/{chunk-62OVBE6G.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
- /package/dist/{chunk-4IOC2D5Y.js.map → chunk-ZYPLV3HP.js.map} +0 -0
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
createWarpGrepTool,
|
|
3
3
|
execute,
|
|
4
4
|
warpGrepTool
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-A2LIILDJ.js";
|
|
6
6
|
import "../../chunk-KW7OEGZK.js";
|
|
7
7
|
import {
|
|
8
8
|
formatResult
|
|
9
|
-
} from "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
9
|
+
} from "../../chunk-YJXAMX3V.js";
|
|
10
|
+
import "../../chunk-QL7MV3GT.js";
|
|
11
11
|
import "../../chunk-PUGSTXLO.js";
|
|
12
12
|
import "../../chunk-3MLWXJTJ.js";
|
|
13
|
-
import "../../chunk-
|
|
13
|
+
import "../../chunk-GHGJAQSJ.js";
|
|
14
14
|
import {
|
|
15
15
|
getSystemPrompt
|
|
16
16
|
} from "../../chunk-FMLHRJDF.js";
|
|
@@ -874,9 +874,23 @@ function parseNestedXmlTools(text) {
|
|
|
874
874
|
}
|
|
875
875
|
if (files.length > 0) {
|
|
876
876
|
tools.push({ name: "finish", arguments: { files } });
|
|
877
|
+
} else {
|
|
878
|
+
const raw = content.replace(/<[^>]*>/g, "").trim();
|
|
879
|
+
const textResult = !raw || raw === "*" ? "No relevant code found." : raw;
|
|
880
|
+
tools.push({ name: "finish", arguments: { files: [], textResult } });
|
|
877
881
|
}
|
|
878
882
|
}
|
|
879
883
|
}
|
|
884
|
+
if (tools.length === 0) {
|
|
885
|
+
const fnFinishMatch = text.match(/<function=finish>([\s\S]*?)<\/function>/i);
|
|
886
|
+
if (fnFinishMatch) {
|
|
887
|
+
const inner = fnFinishMatch[1];
|
|
888
|
+
const paramMatch = inner.match(/<parameter=result>([\s\S]*?)<\/parameter>/i);
|
|
889
|
+
const raw = (paramMatch ? paramMatch[1] : inner).trim();
|
|
890
|
+
const textResult = !raw || raw === "*" ? "No relevant code found." : raw;
|
|
891
|
+
tools.push({ name: "finish", arguments: { files: [], textResult } });
|
|
892
|
+
}
|
|
893
|
+
}
|
|
880
894
|
return tools;
|
|
881
895
|
}
|
|
882
896
|
function preprocessText(text) {
|
|
@@ -1503,8 +1517,20 @@ async function runWarpGrep(config) {
|
|
|
1503
1517
|
if (finishCalls.length) {
|
|
1504
1518
|
const fc = finishCalls[0];
|
|
1505
1519
|
const files = fc.arguments?.files ?? [];
|
|
1520
|
+
const textResult = fc.arguments?.textResult;
|
|
1506
1521
|
finishMeta = { files };
|
|
1507
1522
|
terminationReason = "completed";
|
|
1523
|
+
if (files.length === 0) {
|
|
1524
|
+
const payload2 = textResult || "No relevant code found.";
|
|
1525
|
+
timings.turns.push(turnMetrics);
|
|
1526
|
+
timings.total_ms = Date.now() - totalStart;
|
|
1527
|
+
return {
|
|
1528
|
+
terminationReason: "completed",
|
|
1529
|
+
messages,
|
|
1530
|
+
finish: { payload: payload2, metadata: finishMeta },
|
|
1531
|
+
timings
|
|
1532
|
+
};
|
|
1533
|
+
}
|
|
1508
1534
|
break;
|
|
1509
1535
|
}
|
|
1510
1536
|
}
|
|
@@ -1657,8 +1683,19 @@ async function* runWarpGrepStreaming(config) {
|
|
|
1657
1683
|
if (finishCalls.length) {
|
|
1658
1684
|
const fc = finishCalls[0];
|
|
1659
1685
|
const files = fc.arguments?.files ?? [];
|
|
1686
|
+
const textResult = fc.arguments?.textResult;
|
|
1660
1687
|
finishMeta = { files };
|
|
1661
1688
|
terminationReason = "completed";
|
|
1689
|
+
if (files.length === 0) {
|
|
1690
|
+
const payload2 = textResult || "No relevant code found.";
|
|
1691
|
+
timings.total_ms = Date.now() - totalStart;
|
|
1692
|
+
return {
|
|
1693
|
+
terminationReason: "completed",
|
|
1694
|
+
messages,
|
|
1695
|
+
finish: { payload: payload2, metadata: finishMeta },
|
|
1696
|
+
timings
|
|
1697
|
+
};
|
|
1698
|
+
}
|
|
1662
1699
|
break;
|
|
1663
1700
|
}
|
|
1664
1701
|
}
|