@morphllm/morphsdk 0.2.108 → 0.2.110
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-4CZPXV6R.js → chunk-23R562QJ.js} +20 -16
- package/dist/chunk-23R562QJ.js.map +1 -0
- package/dist/{chunk-KRDIR7GG.js → chunk-3MLWXJTJ.js} +8 -2
- package/dist/chunk-3MLWXJTJ.js.map +1 -0
- package/dist/{chunk-AFLEE2PO.js → chunk-ALTKGCG5.js} +2 -2
- package/dist/{chunk-QUIGATZE.js → chunk-FL4ZBHK2.js} +2 -2
- package/dist/{chunk-MY4OU4ON.js → chunk-HI35Y6EZ.js} +2 -2
- package/dist/{chunk-GOPNOZVI.js → chunk-I72WZNZF.js} +5 -5
- package/dist/chunk-I72WZNZF.js.map +1 -0
- package/dist/{chunk-ZROQPUCQ.js → chunk-YY7NZLAI.js} +2 -2
- package/dist/{client-DYnecl6H.d.ts → client-BH1R-YHX.d.ts} +1 -1
- package/dist/client.cjs +26 -16
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.ts +2 -2
- package/dist/client.js +7 -7
- package/dist/index.cjs +26 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -7
- package/dist/tools/warp_grep/agent/runner.cjs +7 -1
- 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/agent/types.cjs.map +1 -1
- package/dist/tools/warp_grep/agent/types.d.ts +1 -1
- package/dist/tools/warp_grep/anthropic.cjs +23 -14
- package/dist/tools/warp_grep/anthropic.cjs.map +1 -1
- package/dist/tools/warp_grep/anthropic.d.ts +1 -1
- package/dist/tools/warp_grep/anthropic.js +4 -4
- package/dist/tools/warp_grep/client.cjs +26 -16
- package/dist/tools/warp_grep/client.cjs.map +1 -1
- package/dist/tools/warp_grep/client.d.ts +1 -1
- package/dist/tools/warp_grep/client.js +3 -3
- package/dist/tools/warp_grep/gemini.cjs +23 -14
- package/dist/tools/warp_grep/gemini.cjs.map +1 -1
- package/dist/tools/warp_grep/gemini.d.ts +1 -1
- package/dist/tools/warp_grep/gemini.js +3 -3
- package/dist/tools/warp_grep/harness.cjs +7 -1
- 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 +26 -16
- package/dist/tools/warp_grep/index.cjs.map +1 -1
- package/dist/tools/warp_grep/index.d.ts +1 -1
- package/dist/tools/warp_grep/index.js +3 -3
- package/dist/tools/warp_grep/openai.cjs +23 -14
- package/dist/tools/warp_grep/openai.cjs.map +1 -1
- package/dist/tools/warp_grep/openai.d.ts +1 -1
- package/dist/tools/warp_grep/openai.js +4 -4
- package/dist/tools/warp_grep/providers/remote.d.ts +1 -1
- package/dist/tools/warp_grep/vercel.cjs +23 -14
- package/dist/tools/warp_grep/vercel.cjs.map +1 -1
- package/dist/tools/warp_grep/vercel.d.ts +1 -1
- package/dist/tools/warp_grep/vercel.js +4 -4
- package/dist/{types-BMowL9iZ.d.ts → types-D5p8QErL.d.ts} +2 -0
- package/package.json +1 -1
- package/dist/chunk-4CZPXV6R.js.map +0 -1
- package/dist/chunk-GOPNOZVI.js.map +0 -1
- package/dist/chunk-KRDIR7GG.js.map +0 -1
- /package/dist/{chunk-AFLEE2PO.js.map → chunk-ALTKGCG5.js.map} +0 -0
- /package/dist/{chunk-QUIGATZE.js.map → chunk-FL4ZBHK2.js.map} +0 -0
- /package/dist/{chunk-MY4OU4ON.js.map → chunk-HI35Y6EZ.js.map} +0 -0
- /package/dist/{chunk-ZROQPUCQ.js.map → chunk-YY7NZLAI.js.map} +0 -0
package/dist/client.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import './tools/fastapply/core.js';
|
|
|
3
3
|
import './tools/codebase_search/core.js';
|
|
4
4
|
import './tools/browser/core.js';
|
|
5
5
|
import './tools/warp_grep/client.js';
|
|
6
|
-
export { M as MorphClient, a as MorphClientConfig } from './client-
|
|
6
|
+
export { M as MorphClient, a as MorphClientConfig } from './client-BH1R-YHX.js';
|
|
7
7
|
import './git/client.js';
|
|
8
8
|
import './modelrouter/core.js';
|
|
9
9
|
import './tools/fastapply/types.js';
|
|
@@ -13,7 +13,7 @@ import './tools/browser/types.js';
|
|
|
13
13
|
import './tools/browser/profiles/core.js';
|
|
14
14
|
import './tools/browser/profiles/types.js';
|
|
15
15
|
import './tools/warp_grep/agent/types.js';
|
|
16
|
-
import './types-
|
|
16
|
+
import './types-D5p8QErL.js';
|
|
17
17
|
import './tools/warp_grep/providers/types.js';
|
|
18
18
|
import 'openai/resources/index.mjs';
|
|
19
19
|
import '@anthropic-ai/sdk/resources/messages.mjs';
|
package/dist/client.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MorphClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-I72WZNZF.js";
|
|
4
|
+
import "./chunk-FL4ZBHK2.js";
|
|
5
|
+
import "./chunk-HI35Y6EZ.js";
|
|
6
|
+
import "./chunk-ALTKGCG5.js";
|
|
7
7
|
import "./chunk-KW7OEGZK.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-23R562QJ.js";
|
|
9
|
+
import "./chunk-YY7NZLAI.js";
|
|
10
10
|
import "./chunk-PUGSTXLO.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-3MLWXJTJ.js";
|
|
12
12
|
import "./chunk-SNGGSPYJ.js";
|
|
13
13
|
import "./chunk-FMLHRJDF.js";
|
|
14
14
|
import "./chunk-5PNMAWLC.js";
|
package/dist/index.cjs
CHANGED
|
@@ -2833,7 +2833,13 @@ async function readFinishFiles(repoRoot, files, reader) {
|
|
|
2833
2833
|
} else {
|
|
2834
2834
|
const ranges = mergeRanges(validRanges);
|
|
2835
2835
|
const chunks = [];
|
|
2836
|
-
for (
|
|
2836
|
+
for (let i = 0; i < ranges.length; i++) {
|
|
2837
|
+
const [s, e] = ranges[i];
|
|
2838
|
+
if (i === 0 && s > 1) {
|
|
2839
|
+
chunks.push(`// ... existing code, block starting at line ${s} ...`);
|
|
2840
|
+
} else if (i > 0) {
|
|
2841
|
+
chunks.push(`// ... existing code, block starting at line ${s} ...`);
|
|
2842
|
+
}
|
|
2837
2843
|
const lines = await reader(f.path, s, e);
|
|
2838
2844
|
chunks.push(lines.join("\n"));
|
|
2839
2845
|
}
|
|
@@ -3603,7 +3609,8 @@ async function executeToolCall(input, config) {
|
|
|
3603
3609
|
}
|
|
3604
3610
|
const contexts = (finish.resolved ?? []).map((r) => ({
|
|
3605
3611
|
file: r.path,
|
|
3606
|
-
content: r.content
|
|
3612
|
+
content: r.content,
|
|
3613
|
+
lines: r.ranges
|
|
3607
3614
|
}));
|
|
3608
3615
|
return { success: true, contexts, summary: finish.payload };
|
|
3609
3616
|
}
|
|
@@ -3614,7 +3621,8 @@ function processAgentResult(result) {
|
|
|
3614
3621
|
}
|
|
3615
3622
|
const contexts = (finish.resolved ?? []).map((r) => ({
|
|
3616
3623
|
file: r.path,
|
|
3617
|
-
content: r.content
|
|
3624
|
+
content: r.content,
|
|
3625
|
+
lines: r.ranges
|
|
3618
3626
|
}));
|
|
3619
3627
|
return { success: true, contexts, summary: finish.payload };
|
|
3620
3628
|
}
|
|
@@ -3651,20 +3659,22 @@ function formatResult(result) {
|
|
|
3651
3659
|
if (!result.contexts || result.contexts.length === 0) {
|
|
3652
3660
|
return "No relevant code found. Try rephrasing your query.";
|
|
3653
3661
|
}
|
|
3654
|
-
const
|
|
3655
|
-
|
|
3662
|
+
const parts = [];
|
|
3663
|
+
parts.push(`Morph Fast Context subagent performed search on repository:
|
|
3656
3664
|
`);
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
lines.
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3665
|
+
parts.push("Relevant context found:");
|
|
3666
|
+
for (const ctx of result.contexts) {
|
|
3667
|
+
const rangeStr = !ctx.lines || ctx.lines === "*" ? "*" : ctx.lines.map(([s, e]) => `${s}-${e}`).join(",");
|
|
3668
|
+
parts.push(`- ${ctx.file}:${rangeStr}`);
|
|
3669
|
+
}
|
|
3670
|
+
parts.push("\nHere is the content of files:\n");
|
|
3671
|
+
for (const ctx of result.contexts) {
|
|
3672
|
+
const rangeStr = !ctx.lines || ctx.lines === "*" ? "" : ` lines="${ctx.lines.map(([s, e]) => `${s}-${e}`).join(",")}"`;
|
|
3673
|
+
parts.push(`<file path="${ctx.file}"${rangeStr}>`);
|
|
3674
|
+
parts.push(ctx.content);
|
|
3675
|
+
parts.push("</file>\n");
|
|
3676
|
+
}
|
|
3677
|
+
return parts.join("\n");
|
|
3668
3678
|
}
|
|
3669
3679
|
|
|
3670
3680
|
// tools/github/types.ts
|