@morphllm/morphsdk 0.2.114 → 0.2.115
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-ALTKGCG5.js → chunk-CM75JPVD.js} +2 -2
- package/dist/{chunk-FL4ZBHK2.js → chunk-GQUNK324.js} +2 -2
- package/dist/{chunk-23R562QJ.js → chunk-NTDAIKZI.js} +9 -4
- package/dist/chunk-NTDAIKZI.js.map +1 -0
- package/dist/{chunk-YY7NZLAI.js → chunk-RBTL6EJG.js} +11 -3
- package/dist/chunk-RBTL6EJG.js.map +1 -0
- package/dist/{chunk-HI35Y6EZ.js → chunk-SYZ75S3S.js} +18 -5
- package/dist/chunk-SYZ75S3S.js.map +1 -0
- package/dist/{chunk-3U7AWFBN.js → chunk-TZBDXZFC.js} +5 -5
- package/dist/{client-Bm_umdno.d.ts → client-D7iO2TbA.d.ts} +7 -0
- package/dist/client.cjs +30 -6
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.js +6 -6
- package/dist/index.cjs +30 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -6
- package/dist/tools/warp_grep/agent/runner.cjs +10 -2
- package/dist/tools/warp_grep/agent/runner.cjs.map +1 -1
- package/dist/tools/warp_grep/agent/runner.js +1 -1
- package/dist/tools/warp_grep/anthropic.cjs +8 -2
- package/dist/tools/warp_grep/anthropic.cjs.map +1 -1
- package/dist/tools/warp_grep/anthropic.js +3 -3
- package/dist/tools/warp_grep/client.cjs +18 -4
- package/dist/tools/warp_grep/client.cjs.map +1 -1
- package/dist/tools/warp_grep/client.d.ts +7 -1
- package/dist/tools/warp_grep/client.js +4 -2
- package/dist/tools/warp_grep/gemini.cjs +8 -2
- package/dist/tools/warp_grep/gemini.cjs.map +1 -1
- package/dist/tools/warp_grep/gemini.js +2 -2
- package/dist/tools/warp_grep/index.cjs +16 -4
- package/dist/tools/warp_grep/index.cjs.map +1 -1
- package/dist/tools/warp_grep/index.js +2 -2
- package/dist/tools/warp_grep/openai.cjs +8 -2
- package/dist/tools/warp_grep/openai.cjs.map +1 -1
- package/dist/tools/warp_grep/openai.js +3 -3
- package/dist/tools/warp_grep/vercel.cjs +216 -4
- package/dist/tools/warp_grep/vercel.cjs.map +1 -1
- package/dist/tools/warp_grep/vercel.d.ts +7 -0
- package/dist/tools/warp_grep/vercel.js +3 -3
- package/package.json +6 -1
- package/dist/chunk-23R562QJ.js.map +0 -1
- package/dist/chunk-HI35Y6EZ.js.map +0 -1
- package/dist/chunk-YY7NZLAI.js.map +0 -1
- /package/dist/{chunk-ALTKGCG5.js.map → chunk-CM75JPVD.js.map} +0 -0
- /package/dist/{chunk-FL4ZBHK2.js.map → chunk-GQUNK324.js.map} +0 -0
- /package/dist/{chunk-3U7AWFBN.js.map → chunk-TZBDXZFC.js.map} +0 -0
|
@@ -18,11 +18,11 @@ import {
|
|
|
18
18
|
executeToolCall,
|
|
19
19
|
executeWarpGrep,
|
|
20
20
|
formatResult
|
|
21
|
-
} from "../../chunk-
|
|
21
|
+
} from "../../chunk-NTDAIKZI.js";
|
|
22
22
|
import {
|
|
23
23
|
runWarpGrep,
|
|
24
24
|
runWarpGrepStreaming
|
|
25
|
-
} from "../../chunk-
|
|
25
|
+
} from "../../chunk-RBTL6EJG.js";
|
|
26
26
|
import {
|
|
27
27
|
RemoteCommandsProvider
|
|
28
28
|
} from "../../chunk-PUGSTXLO.js";
|
|
@@ -1417,17 +1417,21 @@ async function runWarpGrep(config) {
|
|
|
1417
1417
|
retryConfig: config.retryConfig,
|
|
1418
1418
|
timeout: timeoutMs
|
|
1419
1419
|
}).catch((e) => {
|
|
1420
|
-
|
|
1420
|
+
const errMsg = e instanceof Error ? e.message : String(e);
|
|
1421
|
+
console.error(`[warp_grep] Morph API call failed on turn ${turn}:`, errMsg);
|
|
1422
|
+
errors.push({ message: errMsg });
|
|
1421
1423
|
return "";
|
|
1422
1424
|
});
|
|
1423
1425
|
turnMetrics.morph_api_ms = Date.now() - modelCallStart;
|
|
1424
1426
|
if (!assistantContent) {
|
|
1427
|
+
console.error(`[warp_grep] Empty response from Morph API on turn ${turn}. Errors so far:`, errors);
|
|
1425
1428
|
timings.turns.push(turnMetrics);
|
|
1426
1429
|
break;
|
|
1427
1430
|
}
|
|
1428
1431
|
messages.push({ role: "assistant", content: assistantContent });
|
|
1429
1432
|
const toolCalls = parser.parse(assistantContent);
|
|
1430
1433
|
if (toolCalls.length === 0) {
|
|
1434
|
+
console.error(`[warp_grep] No tool calls parsed on turn ${turn}. Assistant content (first 500 chars):`, assistantContent.slice(0, 500));
|
|
1431
1435
|
errors.push({ message: "No tool calls produced by the model. Your MCP is likely out of date! Update it by running: rm -rf ~/.npm/_npx && npm cache clean --force && npx -y @morphllm/morphmcp@latest" });
|
|
1432
1436
|
terminationReason = "terminated";
|
|
1433
1437
|
timings.turns.push(turnMetrics);
|
|
@@ -1737,7 +1741,9 @@ async function executeToolCall(input, config) {
|
|
|
1737
1741
|
});
|
|
1738
1742
|
const finish = result.finish;
|
|
1739
1743
|
if (result.terminationReason !== "completed" || !finish?.metadata) {
|
|
1740
|
-
|
|
1744
|
+
const errorDetails = result.errors?.map((e) => e.message).join("; ") || "unknown reason";
|
|
1745
|
+
console.error(`[warp_grep] executeToolCall failed. Reason: ${result.terminationReason}. Errors: ${errorDetails}. Turns: ${result.timings?.turns?.length ?? 0}`);
|
|
1746
|
+
return { success: false, error: `Search did not complete: ${errorDetails}` };
|
|
1741
1747
|
}
|
|
1742
1748
|
const contexts = (finish.resolved ?? []).map((r) => ({
|
|
1743
1749
|
file: r.path,
|