@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
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
execute,
|
|
4
4
|
openai_default,
|
|
5
5
|
warpGrepTool
|
|
6
|
-
} from "../../chunk-
|
|
6
|
+
} from "../../chunk-UR76P62F.js";
|
|
7
7
|
import "../../chunk-KW7OEGZK.js";
|
|
8
8
|
import {
|
|
9
9
|
formatResult
|
|
10
|
-
} from "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
10
|
+
} from "../../chunk-YJXAMX3V.js";
|
|
11
|
+
import "../../chunk-QL7MV3GT.js";
|
|
12
12
|
import "../../chunk-PUGSTXLO.js";
|
|
13
13
|
import "../../chunk-3MLWXJTJ.js";
|
|
14
|
-
import "../../chunk-
|
|
14
|
+
import "../../chunk-GHGJAQSJ.js";
|
|
15
15
|
import {
|
|
16
16
|
getSystemPrompt
|
|
17
17
|
} from "../../chunk-FMLHRJDF.js";
|
|
@@ -877,9 +877,23 @@ function parseNestedXmlTools(text) {
|
|
|
877
877
|
}
|
|
878
878
|
if (files.length > 0) {
|
|
879
879
|
tools.push({ name: "finish", arguments: { files } });
|
|
880
|
+
} else {
|
|
881
|
+
const raw = content.replace(/<[^>]*>/g, "").trim();
|
|
882
|
+
const textResult = !raw || raw === "*" ? "No relevant code found." : raw;
|
|
883
|
+
tools.push({ name: "finish", arguments: { files: [], textResult } });
|
|
880
884
|
}
|
|
881
885
|
}
|
|
882
886
|
}
|
|
887
|
+
if (tools.length === 0) {
|
|
888
|
+
const fnFinishMatch = text.match(/<function=finish>([\s\S]*?)<\/function>/i);
|
|
889
|
+
if (fnFinishMatch) {
|
|
890
|
+
const inner = fnFinishMatch[1];
|
|
891
|
+
const paramMatch = inner.match(/<parameter=result>([\s\S]*?)<\/parameter>/i);
|
|
892
|
+
const raw = (paramMatch ? paramMatch[1] : inner).trim();
|
|
893
|
+
const textResult = !raw || raw === "*" ? "No relevant code found." : raw;
|
|
894
|
+
tools.push({ name: "finish", arguments: { files: [], textResult } });
|
|
895
|
+
}
|
|
896
|
+
}
|
|
883
897
|
return tools;
|
|
884
898
|
}
|
|
885
899
|
function preprocessText(text) {
|
|
@@ -1506,8 +1520,20 @@ async function runWarpGrep(config) {
|
|
|
1506
1520
|
if (finishCalls.length) {
|
|
1507
1521
|
const fc = finishCalls[0];
|
|
1508
1522
|
const files = fc.arguments?.files ?? [];
|
|
1523
|
+
const textResult = fc.arguments?.textResult;
|
|
1509
1524
|
finishMeta = { files };
|
|
1510
1525
|
terminationReason = "completed";
|
|
1526
|
+
if (files.length === 0) {
|
|
1527
|
+
const payload2 = textResult || "No relevant code found.";
|
|
1528
|
+
timings.turns.push(turnMetrics);
|
|
1529
|
+
timings.total_ms = Date.now() - totalStart;
|
|
1530
|
+
return {
|
|
1531
|
+
terminationReason: "completed",
|
|
1532
|
+
messages,
|
|
1533
|
+
finish: { payload: payload2, metadata: finishMeta },
|
|
1534
|
+
timings
|
|
1535
|
+
};
|
|
1536
|
+
}
|
|
1511
1537
|
break;
|
|
1512
1538
|
}
|
|
1513
1539
|
}
|
|
@@ -1660,8 +1686,19 @@ async function* runWarpGrepStreaming(config) {
|
|
|
1660
1686
|
if (finishCalls.length) {
|
|
1661
1687
|
const fc = finishCalls[0];
|
|
1662
1688
|
const files = fc.arguments?.files ?? [];
|
|
1689
|
+
const textResult = fc.arguments?.textResult;
|
|
1663
1690
|
finishMeta = { files };
|
|
1664
1691
|
terminationReason = "completed";
|
|
1692
|
+
if (files.length === 0) {
|
|
1693
|
+
const payload2 = textResult || "No relevant code found.";
|
|
1694
|
+
timings.total_ms = Date.now() - totalStart;
|
|
1695
|
+
return {
|
|
1696
|
+
terminationReason: "completed",
|
|
1697
|
+
messages,
|
|
1698
|
+
finish: { payload: payload2, metadata: finishMeta },
|
|
1699
|
+
timings
|
|
1700
|
+
};
|
|
1701
|
+
}
|
|
1665
1702
|
break;
|
|
1666
1703
|
}
|
|
1667
1704
|
}
|