@morphllm/morphsdk 0.2.117 → 0.2.119
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-C3LJORIT.js → chunk-3T4BGWCV.js} +5 -5
- package/dist/{chunk-OVNPKTEG.js → chunk-G7RSAZIK.js} +2 -2
- package/dist/{chunk-SNGGSPYJ.js → chunk-GHGJAQSJ.js} +15 -1
- package/dist/chunk-GHGJAQSJ.js.map +1 -0
- package/dist/{chunk-YJZP5ZL5.js → chunk-HMQSMEN2.js} +7 -2
- package/dist/{chunk-YJZP5ZL5.js.map → chunk-HMQSMEN2.js.map} +1 -1
- package/dist/{chunk-3JVHMOYJ.js → chunk-K4EO7S2O.js} +2 -2
- package/dist/{chunk-5JARN2NG.js → chunk-OOCSNAA5.js} +2 -2
- package/dist/{chunk-RBOCP2MX.js → chunk-QL7MV3GT.js} +25 -2
- package/dist/chunk-QL7MV3GT.js.map +1 -0
- package/dist/{chunk-GENFEPHG.js → chunk-WVTX3QS6.js} +2 -2
- package/dist/client.cjs +43 -1
- package/dist/client.cjs.map +1 -1
- package/dist/client.js +7 -7
- package/dist/index.cjs +43 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -8
- 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 +32 -1
- 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 +43 -1
- 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 +32 -1
- 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 +20 -1
- package/dist/tools/warp_grep/harness.cjs.map +1 -1
- package/dist/tools/warp_grep/harness.js +2 -2
- package/dist/tools/warp_grep/index.cjs +43 -1
- package/dist/tools/warp_grep/index.cjs.map +1 -1
- package/dist/tools/warp_grep/index.js +4 -4
- package/dist/tools/warp_grep/openai.cjs +32 -1
- package/dist/tools/warp_grep/openai.cjs.map +1 -1
- package/dist/tools/warp_grep/openai.js +4 -4
- package/dist/tools/warp_grep/providers/local.cjs +6 -1
- package/dist/tools/warp_grep/providers/local.cjs.map +1 -1
- package/dist/tools/warp_grep/providers/local.js +1 -1
- package/dist/tools/warp_grep/vercel.cjs +43 -1
- 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-C3LJORIT.js.map → chunk-3T4BGWCV.js.map} +0 -0
- /package/dist/{chunk-OVNPKTEG.js.map → chunk-G7RSAZIK.js.map} +0 -0
- /package/dist/{chunk-3JVHMOYJ.js.map → chunk-K4EO7S2O.js.map} +0 -0
- /package/dist/{chunk-5JARN2NG.js.map → chunk-OOCSNAA5.js.map} +0 -0
- /package/dist/{chunk-GENFEPHG.js.map → chunk-WVTX3QS6.js.map} +0 -0
package/dist/client.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MorphClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-3T4BGWCV.js";
|
|
4
|
+
import "./chunk-WVTX3QS6.js";
|
|
5
|
+
import "./chunk-K4EO7S2O.js";
|
|
6
|
+
import "./chunk-OOCSNAA5.js";
|
|
7
7
|
import "./chunk-KW7OEGZK.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-G7RSAZIK.js";
|
|
9
|
+
import "./chunk-QL7MV3GT.js";
|
|
10
10
|
import "./chunk-PUGSTXLO.js";
|
|
11
11
|
import "./chunk-3MLWXJTJ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-GHGJAQSJ.js";
|
|
13
13
|
import "./chunk-FMLHRJDF.js";
|
|
14
14
|
import "./chunk-5PNMAWLC.js";
|
|
15
15
|
import "./chunk-APP75CBN.js";
|
package/dist/index.cjs
CHANGED
|
@@ -659,7 +659,12 @@ Details: ${res.stderr}` : ""}`
|
|
|
659
659
|
return;
|
|
660
660
|
}
|
|
661
661
|
if (depth > maxDepth || results.length >= maxResults) return;
|
|
662
|
-
|
|
662
|
+
let entries;
|
|
663
|
+
try {
|
|
664
|
+
entries = await import_promises2.default.readdir(dir, { withFileTypes: true });
|
|
665
|
+
} catch {
|
|
666
|
+
return;
|
|
667
|
+
}
|
|
663
668
|
for (const entry of entries) {
|
|
664
669
|
if (timedOut || results.length >= maxResults) break;
|
|
665
670
|
if (shouldSkip2(entry.name)) continue;
|
|
@@ -2538,9 +2543,23 @@ function parseNestedXmlTools(text) {
|
|
|
2538
2543
|
}
|
|
2539
2544
|
if (files.length > 0) {
|
|
2540
2545
|
tools.push({ name: "finish", arguments: { files } });
|
|
2546
|
+
} else {
|
|
2547
|
+
const raw = content.replace(/<[^>]*>/g, "").trim();
|
|
2548
|
+
const textResult = !raw || raw === "*" ? "No relevant code found." : raw;
|
|
2549
|
+
tools.push({ name: "finish", arguments: { files: [], textResult } });
|
|
2541
2550
|
}
|
|
2542
2551
|
}
|
|
2543
2552
|
}
|
|
2553
|
+
if (tools.length === 0) {
|
|
2554
|
+
const fnFinishMatch = text.match(/<function=finish>([\s\S]*?)<\/function>/i);
|
|
2555
|
+
if (fnFinishMatch) {
|
|
2556
|
+
const inner = fnFinishMatch[1];
|
|
2557
|
+
const paramMatch = inner.match(/<parameter=result>([\s\S]*?)<\/parameter>/i);
|
|
2558
|
+
const raw = (paramMatch ? paramMatch[1] : inner).trim();
|
|
2559
|
+
const textResult = !raw || raw === "*" ? "No relevant code found." : raw;
|
|
2560
|
+
tools.push({ name: "finish", arguments: { files: [], textResult } });
|
|
2561
|
+
}
|
|
2562
|
+
}
|
|
2544
2563
|
return tools;
|
|
2545
2564
|
}
|
|
2546
2565
|
function preprocessText(text) {
|
|
@@ -3167,8 +3186,20 @@ async function runWarpGrep(config) {
|
|
|
3167
3186
|
if (finishCalls.length) {
|
|
3168
3187
|
const fc = finishCalls[0];
|
|
3169
3188
|
const files = fc.arguments?.files ?? [];
|
|
3189
|
+
const textResult = fc.arguments?.textResult;
|
|
3170
3190
|
finishMeta = { files };
|
|
3171
3191
|
terminationReason = "completed";
|
|
3192
|
+
if (files.length === 0) {
|
|
3193
|
+
const payload2 = textResult || "No relevant code found.";
|
|
3194
|
+
timings.turns.push(turnMetrics);
|
|
3195
|
+
timings.total_ms = Date.now() - totalStart;
|
|
3196
|
+
return {
|
|
3197
|
+
terminationReason: "completed",
|
|
3198
|
+
messages,
|
|
3199
|
+
finish: { payload: payload2, metadata: finishMeta },
|
|
3200
|
+
timings
|
|
3201
|
+
};
|
|
3202
|
+
}
|
|
3172
3203
|
break;
|
|
3173
3204
|
}
|
|
3174
3205
|
}
|
|
@@ -3321,8 +3352,19 @@ async function* runWarpGrepStreaming(config) {
|
|
|
3321
3352
|
if (finishCalls.length) {
|
|
3322
3353
|
const fc = finishCalls[0];
|
|
3323
3354
|
const files = fc.arguments?.files ?? [];
|
|
3355
|
+
const textResult = fc.arguments?.textResult;
|
|
3324
3356
|
finishMeta = { files };
|
|
3325
3357
|
terminationReason = "completed";
|
|
3358
|
+
if (files.length === 0) {
|
|
3359
|
+
const payload2 = textResult || "No relevant code found.";
|
|
3360
|
+
timings.total_ms = Date.now() - totalStart;
|
|
3361
|
+
return {
|
|
3362
|
+
terminationReason: "completed",
|
|
3363
|
+
messages,
|
|
3364
|
+
finish: { payload: payload2, metadata: finishMeta },
|
|
3365
|
+
timings
|
|
3366
|
+
};
|
|
3367
|
+
}
|
|
3326
3368
|
break;
|
|
3327
3369
|
}
|
|
3328
3370
|
}
|