@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
|
@@ -18,11 +18,11 @@ import {
|
|
|
18
18
|
executeToolCall,
|
|
19
19
|
executeWarpGrep,
|
|
20
20
|
formatResult
|
|
21
|
-
} from "../../chunk-
|
|
21
|
+
} from "../../chunk-YJXAMX3V.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
|
|
@@ -875,9 +875,23 @@ function parseNestedXmlTools(text) {
|
|
|
875
875
|
}
|
|
876
876
|
if (files.length > 0) {
|
|
877
877
|
tools.push({ name: "finish", arguments: { files } });
|
|
878
|
+
} else {
|
|
879
|
+
const raw = content.replace(/<[^>]*>/g, "").trim();
|
|
880
|
+
const textResult = !raw || raw === "*" ? "No relevant code found." : raw;
|
|
881
|
+
tools.push({ name: "finish", arguments: { files: [], textResult } });
|
|
878
882
|
}
|
|
879
883
|
}
|
|
880
884
|
}
|
|
885
|
+
if (tools.length === 0) {
|
|
886
|
+
const fnFinishMatch = text.match(/<function=finish>([\s\S]*?)<\/function>/i);
|
|
887
|
+
if (fnFinishMatch) {
|
|
888
|
+
const inner = fnFinishMatch[1];
|
|
889
|
+
const paramMatch = inner.match(/<parameter=result>([\s\S]*?)<\/parameter>/i);
|
|
890
|
+
const raw = (paramMatch ? paramMatch[1] : inner).trim();
|
|
891
|
+
const textResult = !raw || raw === "*" ? "No relevant code found." : raw;
|
|
892
|
+
tools.push({ name: "finish", arguments: { files: [], textResult } });
|
|
893
|
+
}
|
|
894
|
+
}
|
|
881
895
|
return tools;
|
|
882
896
|
}
|
|
883
897
|
function preprocessText(text) {
|
|
@@ -1504,8 +1518,20 @@ async function runWarpGrep(config) {
|
|
|
1504
1518
|
if (finishCalls.length) {
|
|
1505
1519
|
const fc = finishCalls[0];
|
|
1506
1520
|
const files = fc.arguments?.files ?? [];
|
|
1521
|
+
const textResult = fc.arguments?.textResult;
|
|
1507
1522
|
finishMeta = { files };
|
|
1508
1523
|
terminationReason = "completed";
|
|
1524
|
+
if (files.length === 0) {
|
|
1525
|
+
const payload2 = textResult || "No relevant code found.";
|
|
1526
|
+
timings.turns.push(turnMetrics);
|
|
1527
|
+
timings.total_ms = Date.now() - totalStart;
|
|
1528
|
+
return {
|
|
1529
|
+
terminationReason: "completed",
|
|
1530
|
+
messages,
|
|
1531
|
+
finish: { payload: payload2, metadata: finishMeta },
|
|
1532
|
+
timings
|
|
1533
|
+
};
|
|
1534
|
+
}
|
|
1509
1535
|
break;
|
|
1510
1536
|
}
|
|
1511
1537
|
}
|