@morphllm/morphsdk 0.2.132 → 0.2.134
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-S5ERJO5O.js → chunk-37APZU2T.js} +2 -2
- package/dist/{chunk-6DRIR7AI.js → chunk-37SPZ55Z.js} +3 -3
- package/dist/{chunk-6DRIR7AI.js.map → chunk-37SPZ55Z.js.map} +1 -1
- package/dist/{chunk-JKKJIHJB.js → chunk-5ALXAPOK.js} +2 -2
- package/dist/{chunk-JKKJIHJB.js.map → chunk-5ALXAPOK.js.map} +1 -1
- package/dist/{chunk-UXYDF4WI.js → chunk-67DYLZPG.js} +16 -16
- package/dist/{chunk-XR6VN7BD.js → chunk-AGFVQOGJ.js} +4 -4
- package/dist/chunk-AGFVQOGJ.js.map +1 -0
- package/dist/{chunk-QDDCQQJS.js → chunk-B6LTRVNE.js} +9 -9
- package/dist/chunk-B6LTRVNE.js.map +1 -0
- package/dist/chunk-FIVYDIHX.js +10 -0
- package/dist/{chunk-QLBRTLEI.js.map → chunk-FIVYDIHX.js.map} +1 -1
- package/dist/{chunk-7JK2QJH7.js → chunk-FIZ62J4I.js} +2 -2
- package/dist/{chunk-6ENTHJT7.js → chunk-GX2LIDD3.js} +2 -2
- package/dist/{chunk-6DFYIVHI.js → chunk-JCHVRIMF.js} +2 -2
- package/dist/{chunk-BFTVZEXV.js → chunk-JQRQHNNL.js} +2 -2
- package/dist/{chunk-TSXV3K5M.js → chunk-JZ5QGBGN.js} +1 -1
- package/dist/{chunk-NHOHTNUN.js → chunk-K6XWPSVZ.js} +2 -2
- package/dist/{chunk-K3WPQ6AC.js → chunk-KBDOWN6S.js} +2 -2
- package/dist/{chunk-MLB4VE6A.js → chunk-KDBJPYTR.js} +2 -2
- package/dist/{chunk-MBWLLQLU.js → chunk-KNB5LOE2.js} +2 -2
- package/dist/{chunk-PRSKMCUD.js → chunk-LCNDWM3Z.js} +6 -6
- package/dist/chunk-LCNDWM3Z.js.map +1 -0
- package/dist/{chunk-PMQ3VJ3W.js → chunk-MTLAZJTA.js} +3 -3
- package/dist/{chunk-CRBOE3YM.js → chunk-PSITTOMP.js} +2 -2
- package/dist/{chunk-HIK6RPDO.js → chunk-PTGAOOSH.js} +6 -6
- package/dist/chunk-PTGAOOSH.js.map +1 -0
- package/dist/{chunk-PDKNXUBX.js → chunk-TNS7ANSG.js} +2 -2
- package/dist/{chunk-H6QGABAH.js → chunk-VQZBQDXC.js} +2 -2
- package/dist/{chunk-TEZDQDJ3.js → chunk-VZX3HT24.js} +9 -9
- package/dist/chunk-VZX3HT24.js.map +1 -0
- package/dist/{chunk-C66NYTNQ.js → chunk-WBMMR34M.js} +5 -5
- package/dist/chunk-WBMMR34M.js.map +1 -0
- package/dist/{chunk-KNAHKOMJ.js → chunk-XCQYVJFB.js} +2 -2
- package/dist/{chunk-33SCAH4A.js → chunk-XI7DF7PI.js} +2 -2
- package/dist/{chunk-2U3RMBXT.js → chunk-YLT4PSXT.js} +4 -4
- package/dist/chunk-YLT4PSXT.js.map +1 -0
- package/dist/{client-B9oYy2SJ.d.ts → client-D1L9Yb3A.d.ts} +6 -6
- package/dist/client.cjs +27 -27
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.ts +2 -2
- package/dist/client.js +23 -23
- package/dist/edge.cjs +4 -4
- package/dist/edge.cjs.map +1 -1
- package/dist/edge.js +5 -5
- package/dist/index.cjs +28 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +24 -24
- package/dist/modelrouter/core.cjs +1 -1
- package/dist/modelrouter/core.cjs.map +1 -1
- package/dist/modelrouter/core.js +3 -3
- package/dist/modelrouter/index.cjs +1 -1
- package/dist/modelrouter/index.cjs.map +1 -1
- package/dist/modelrouter/index.js +3 -3
- package/dist/tools/browser/anthropic.cjs +1 -1
- package/dist/tools/browser/anthropic.cjs.map +1 -1
- package/dist/tools/browser/anthropic.js +5 -5
- package/dist/tools/browser/core.cjs +1 -1
- package/dist/tools/browser/core.cjs.map +1 -1
- package/dist/tools/browser/core.js +4 -4
- package/dist/tools/browser/index.cjs +1 -1
- package/dist/tools/browser/index.cjs.map +1 -1
- package/dist/tools/browser/index.js +7 -7
- package/dist/tools/browser/openai.cjs +1 -1
- package/dist/tools/browser/openai.cjs.map +1 -1
- package/dist/tools/browser/openai.js +5 -5
- package/dist/tools/browser/profiles/core.cjs +1 -1
- package/dist/tools/browser/profiles/core.cjs.map +1 -1
- package/dist/tools/browser/profiles/core.js +3 -3
- package/dist/tools/browser/profiles/index.cjs +1 -1
- package/dist/tools/browser/profiles/index.cjs.map +1 -1
- package/dist/tools/browser/profiles/index.js +3 -3
- package/dist/tools/browser/vercel.cjs +1 -1
- package/dist/tools/browser/vercel.cjs.map +1 -1
- package/dist/tools/browser/vercel.js +5 -5
- package/dist/tools/codebase_search/anthropic.cjs +1 -1
- package/dist/tools/codebase_search/anthropic.cjs.map +1 -1
- package/dist/tools/codebase_search/anthropic.js +4 -4
- package/dist/tools/codebase_search/core.cjs +1 -1
- package/dist/tools/codebase_search/core.cjs.map +1 -1
- package/dist/tools/codebase_search/core.js +3 -3
- package/dist/tools/codebase_search/index.cjs +1 -1
- package/dist/tools/codebase_search/index.cjs.map +1 -1
- package/dist/tools/codebase_search/index.js +6 -6
- package/dist/tools/codebase_search/openai.cjs +1 -1
- package/dist/tools/codebase_search/openai.cjs.map +1 -1
- package/dist/tools/codebase_search/openai.js +4 -4
- package/dist/tools/codebase_search/vercel.cjs +1 -1
- package/dist/tools/codebase_search/vercel.cjs.map +1 -1
- package/dist/tools/codebase_search/vercel.js +4 -4
- package/dist/tools/compact/core.cjs +3 -3
- package/dist/tools/compact/core.cjs.map +1 -1
- package/dist/tools/compact/core.js +1 -1
- package/dist/tools/compact/index.cjs +3 -3
- package/dist/tools/compact/index.cjs.map +1 -1
- package/dist/tools/compact/index.js +1 -1
- package/dist/tools/fastapply/anthropic.cjs +1 -1
- package/dist/tools/fastapply/anthropic.cjs.map +1 -1
- package/dist/tools/fastapply/anthropic.js +4 -4
- package/dist/tools/fastapply/apply.cjs +1 -1
- package/dist/tools/fastapply/apply.cjs.map +1 -1
- package/dist/tools/fastapply/apply.js +2 -2
- package/dist/tools/fastapply/core.cjs +1 -1
- package/dist/tools/fastapply/core.cjs.map +1 -1
- package/dist/tools/fastapply/core.js +3 -3
- package/dist/tools/fastapply/index.cjs +1 -1
- package/dist/tools/fastapply/index.cjs.map +1 -1
- package/dist/tools/fastapply/index.js +6 -6
- package/dist/tools/fastapply/openai.cjs +1 -1
- package/dist/tools/fastapply/openai.cjs.map +1 -1
- package/dist/tools/fastapply/openai.js +4 -4
- package/dist/tools/fastapply/vercel.cjs +1 -1
- package/dist/tools/fastapply/vercel.cjs.map +1 -1
- package/dist/tools/fastapply/vercel.js +4 -4
- package/dist/tools/index.cjs +1 -1
- package/dist/tools/index.cjs.map +1 -1
- package/dist/tools/index.js +6 -6
- package/dist/tools/utils/resilience.cjs +1 -1
- package/dist/tools/utils/resilience.cjs.map +1 -1
- package/dist/tools/utils/resilience.js +2 -2
- package/dist/tools/warp_grep/agent/runner.cjs +6 -6
- package/dist/tools/warp_grep/agent/runner.cjs.map +1 -1
- package/dist/tools/warp_grep/agent/runner.js +3 -3
- 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 +18 -18
- package/dist/tools/warp_grep/anthropic.cjs.map +1 -1
- package/dist/tools/warp_grep/anthropic.d.ts +6 -6
- package/dist/tools/warp_grep/anthropic.js +6 -6
- package/dist/tools/warp_grep/client.cjs +13 -13
- package/dist/tools/warp_grep/client.cjs.map +1 -1
- package/dist/tools/warp_grep/client.d.ts +13 -13
- package/dist/tools/warp_grep/client.js +4 -4
- package/dist/tools/warp_grep/gemini.cjs +19 -19
- package/dist/tools/warp_grep/gemini.cjs.map +1 -1
- package/dist/tools/warp_grep/gemini.d.ts +5 -5
- package/dist/tools/warp_grep/gemini.js +11 -11
- package/dist/tools/warp_grep/gemini.js.map +1 -1
- package/dist/tools/warp_grep/harness.cjs +3 -3
- package/dist/tools/warp_grep/harness.cjs.map +1 -1
- package/dist/tools/warp_grep/harness.d.ts +3 -3
- package/dist/tools/warp_grep/harness.js +1 -1
- package/dist/tools/warp_grep/harness.js.map +1 -1
- package/dist/tools/warp_grep/index.cjs +16 -16
- package/dist/tools/warp_grep/index.cjs.map +1 -1
- package/dist/tools/warp_grep/index.d.ts +9 -9
- package/dist/tools/warp_grep/index.js +6 -6
- package/dist/tools/warp_grep/openai.cjs +18 -18
- package/dist/tools/warp_grep/openai.cjs.map +1 -1
- package/dist/tools/warp_grep/openai.d.ts +6 -6
- package/dist/tools/warp_grep/openai.js +6 -6
- package/dist/tools/warp_grep/providers/code_storage_http.d.ts +1 -1
- package/dist/tools/warp_grep/providers/remote.d.ts +1 -1
- package/dist/tools/warp_grep/vercel.cjs +19 -19
- package/dist/tools/warp_grep/vercel.cjs.map +1 -1
- package/dist/tools/warp_grep/vercel.d.ts +13 -13
- package/dist/tools/warp_grep/vercel.js +6 -6
- package/dist/{types-DY_hq2eZ.d.ts → types-C5r_ph-V.d.ts} +4 -4
- package/dist/version.cjs +1 -1
- package/dist/version.cjs.map +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-2U3RMBXT.js.map +0 -1
- package/dist/chunk-C66NYTNQ.js.map +0 -1
- package/dist/chunk-HIK6RPDO.js.map +0 -1
- package/dist/chunk-PRSKMCUD.js.map +0 -1
- package/dist/chunk-QDDCQQJS.js.map +0 -1
- package/dist/chunk-QLBRTLEI.js +0 -10
- package/dist/chunk-TEZDQDJ3.js.map +0 -1
- package/dist/chunk-XR6VN7BD.js.map +0 -1
- /package/dist/{chunk-S5ERJO5O.js.map → chunk-37APZU2T.js.map} +0 -0
- /package/dist/{chunk-UXYDF4WI.js.map → chunk-67DYLZPG.js.map} +0 -0
- /package/dist/{chunk-7JK2QJH7.js.map → chunk-FIZ62J4I.js.map} +0 -0
- /package/dist/{chunk-6ENTHJT7.js.map → chunk-GX2LIDD3.js.map} +0 -0
- /package/dist/{chunk-6DFYIVHI.js.map → chunk-JCHVRIMF.js.map} +0 -0
- /package/dist/{chunk-BFTVZEXV.js.map → chunk-JQRQHNNL.js.map} +0 -0
- /package/dist/{chunk-TSXV3K5M.js.map → chunk-JZ5QGBGN.js.map} +0 -0
- /package/dist/{chunk-NHOHTNUN.js.map → chunk-K6XWPSVZ.js.map} +0 -0
- /package/dist/{chunk-K3WPQ6AC.js.map → chunk-KBDOWN6S.js.map} +0 -0
- /package/dist/{chunk-MLB4VE6A.js.map → chunk-KDBJPYTR.js.map} +0 -0
- /package/dist/{chunk-MBWLLQLU.js.map → chunk-KNB5LOE2.js.map} +0 -0
- /package/dist/{chunk-PMQ3VJ3W.js.map → chunk-MTLAZJTA.js.map} +0 -0
- /package/dist/{chunk-CRBOE3YM.js.map → chunk-PSITTOMP.js.map} +0 -0
- /package/dist/{chunk-PDKNXUBX.js.map → chunk-TNS7ANSG.js.map} +0 -0
- /package/dist/{chunk-H6QGABAH.js.map → chunk-VQZBQDXC.js.map} +0 -0
- /package/dist/{chunk-KNAHKOMJ.js.map → chunk-XCQYVJFB.js.map} +0 -0
- /package/dist/{chunk-33SCAH4A.js.map → chunk-XI7DF7PI.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WarpGrepStep } from './agent/types.js';
|
|
2
|
-
import { W as WarpGrepClientConfig, a as WarpGrepInput, b as WarpGrepResult, G as GitHubSearchInput, e as GitHubReadFileInput, f as GitHubReadFileResult, d as WarpGrepToolConfig } from '../../types-
|
|
2
|
+
import { W as WarpGrepClientConfig, a as WarpGrepInput, b as WarpGrepResult, G as GitHubSearchInput, e as GitHubReadFileInput, f as GitHubReadFileResult, d as WarpGrepToolConfig } from '../../types-C5r_ph-V.js';
|
|
3
3
|
import '../utils/resilience.js';
|
|
4
4
|
import './providers/types.js';
|
|
5
5
|
|
|
@@ -18,13 +18,13 @@ import './providers/types.js';
|
|
|
18
18
|
*
|
|
19
19
|
* // Simple usage - defaults to LocalRipgrepProvider
|
|
20
20
|
* const result = await client.execute({
|
|
21
|
-
*
|
|
21
|
+
* searchTerm: 'Find authentication middleware',
|
|
22
22
|
* repoRoot: '.'
|
|
23
23
|
* });
|
|
24
24
|
*
|
|
25
25
|
* // With custom excludes
|
|
26
26
|
* const result = await client.execute({
|
|
27
|
-
*
|
|
27
|
+
* searchTerm: 'Find database models',
|
|
28
28
|
* repoRoot: '.',
|
|
29
29
|
* excludes: ['node_modules', '.git', 'dist']
|
|
30
30
|
* });
|
|
@@ -34,16 +34,16 @@ declare class WarpGrepClient {
|
|
|
34
34
|
private config;
|
|
35
35
|
constructor(config?: WarpGrepClientConfig);
|
|
36
36
|
/**
|
|
37
|
-
* Execute a code search
|
|
37
|
+
* Execute a code search
|
|
38
38
|
*
|
|
39
|
-
* @param input - Search parameters including
|
|
39
|
+
* @param input - Search parameters including searchTerm, repoRoot, and optional provider
|
|
40
40
|
* @returns Search results with relevant code contexts, or an AsyncGenerator if streamSteps is true
|
|
41
41
|
*
|
|
42
42
|
* @example
|
|
43
43
|
* ```typescript
|
|
44
44
|
* // Standard execution
|
|
45
45
|
* const result = await client.execute({
|
|
46
|
-
*
|
|
46
|
+
* searchTerm: 'Find authentication middleware',
|
|
47
47
|
* repoRoot: '.'
|
|
48
48
|
* });
|
|
49
49
|
*
|
|
@@ -56,7 +56,7 @@ declare class WarpGrepClient {
|
|
|
56
56
|
*
|
|
57
57
|
* // Streaming execution
|
|
58
58
|
* const stream = client.execute({
|
|
59
|
-
*
|
|
59
|
+
* searchTerm: 'Find auth middleware',
|
|
60
60
|
* repoRoot: '.',
|
|
61
61
|
* streamSteps: true
|
|
62
62
|
* });
|
|
@@ -79,13 +79,13 @@ declare class WarpGrepClient {
|
|
|
79
79
|
* ```typescript
|
|
80
80
|
* // Simple usage
|
|
81
81
|
* const result = await client.searchGitHub({
|
|
82
|
-
*
|
|
82
|
+
* searchTerm: 'Find authentication middleware',
|
|
83
83
|
* github: 'vercel/next.js',
|
|
84
84
|
* });
|
|
85
85
|
*
|
|
86
86
|
* // With streaming
|
|
87
87
|
* const stream = client.searchGitHub({
|
|
88
|
-
*
|
|
88
|
+
* searchTerm: 'Find auth middleware',
|
|
89
89
|
* github: 'https://github.com/vercel/next.js',
|
|
90
90
|
* streamSteps: true,
|
|
91
91
|
* });
|
|
@@ -131,13 +131,13 @@ declare class WarpGrepClient {
|
|
|
131
131
|
* import { executeWarpGrep } from '@morphllm/morphsdk/tools/warp-grep';
|
|
132
132
|
*
|
|
133
133
|
* const result = await executeWarpGrep({
|
|
134
|
-
*
|
|
134
|
+
* searchTerm: 'Find authentication middleware',
|
|
135
135
|
* repoRoot: '.'
|
|
136
136
|
* });
|
|
137
137
|
*
|
|
138
138
|
* // Streaming
|
|
139
139
|
* const stream = executeWarpGrep({
|
|
140
|
-
*
|
|
140
|
+
* searchTerm: 'Find auth',
|
|
141
141
|
* repoRoot: '.',
|
|
142
142
|
* streamSteps: true
|
|
143
143
|
* });
|
|
@@ -153,13 +153,13 @@ declare function executeWarpGrep(input: WarpGrepInput & {
|
|
|
153
153
|
streamSteps?: false | undefined;
|
|
154
154
|
}, config?: WarpGrepClientConfig): Promise<WarpGrepResult>;
|
|
155
155
|
declare function executeToolCall(input: {
|
|
156
|
-
|
|
156
|
+
search_term: string;
|
|
157
157
|
} | string, config: WarpGrepToolConfig): Promise<WarpGrepResult>;
|
|
158
158
|
/**
|
|
159
159
|
* Streaming version of executeToolCall that yields WarpGrepStep for each turn.
|
|
160
160
|
*/
|
|
161
161
|
declare function executeToolCallStreaming(input: {
|
|
162
|
-
|
|
162
|
+
search_term: string;
|
|
163
163
|
} | string, config: WarpGrepToolConfig): AsyncGenerator<WarpGrepStep, WarpGrepResult, undefined>;
|
|
164
164
|
/**
|
|
165
165
|
* Read a single file (or line range) from a public GitHub repository
|
|
@@ -6,16 +6,16 @@ import {
|
|
|
6
6
|
executeWarpGrep,
|
|
7
7
|
formatGitHubReadFileResult,
|
|
8
8
|
formatResult
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-B6LTRVNE.js";
|
|
10
10
|
import "../../chunk-NF2QWJDY.js";
|
|
11
11
|
import "../../chunk-63VHBANJ.js";
|
|
12
|
-
import "../../chunk-
|
|
12
|
+
import "../../chunk-WBMMR34M.js";
|
|
13
13
|
import "../../chunk-GVGJIXV2.js";
|
|
14
|
-
import "../../chunk-
|
|
14
|
+
import "../../chunk-YLT4PSXT.js";
|
|
15
15
|
import "../../chunk-DKODF3YG.js";
|
|
16
16
|
import "../../chunk-QRXG5CAZ.js";
|
|
17
17
|
import "../../chunk-VCKJ22DX.js";
|
|
18
|
-
import "../../chunk-
|
|
18
|
+
import "../../chunk-5ALXAPOK.js";
|
|
19
19
|
import "../../chunk-PZ5AY32C.js";
|
|
20
20
|
export {
|
|
21
21
|
WarpGrepClient,
|
|
@@ -895,7 +895,7 @@ function calculateContextBudget(messages) {
|
|
|
895
895
|
const maxK = Math.round(maxChars / 1e3);
|
|
896
896
|
return `<context_budget>${percent}% (${usedK}K/${maxK}K chars)</context_budget>`;
|
|
897
897
|
}
|
|
898
|
-
async function buildInitialState(repoRoot,
|
|
898
|
+
async function buildInitialState(repoRoot, searchTerm, provider, options) {
|
|
899
899
|
const budget = calculateContextBudget([]);
|
|
900
900
|
const turnTag = `Turn 0/${AGENT_CONFIG.MAX_TURNS}`;
|
|
901
901
|
const treeDepth = options?.search_type === "node_modules" ? 1 : 2;
|
|
@@ -918,7 +918,7 @@ ${treeOutput}
|
|
|
918
918
|
</repo_structure>
|
|
919
919
|
|
|
920
920
|
<search_string>
|
|
921
|
-
${
|
|
921
|
+
${searchTerm}
|
|
922
922
|
</search_string>
|
|
923
923
|
${budget}
|
|
924
924
|
${turnTag}`;
|
|
@@ -929,7 +929,7 @@ ${repoName}/
|
|
|
929
929
|
</repo_structure>
|
|
930
930
|
|
|
931
931
|
<search_string>
|
|
932
|
-
${
|
|
932
|
+
${searchTerm}
|
|
933
933
|
</search_string>
|
|
934
934
|
${budget}
|
|
935
935
|
${turnTag}`;
|
|
@@ -968,7 +968,7 @@ var import_openai = __toESM(require("openai"), 1);
|
|
|
968
968
|
// package.json
|
|
969
969
|
var package_default = {
|
|
970
970
|
name: "@morphllm/morphsdk",
|
|
971
|
-
version: "0.2.
|
|
971
|
+
version: "0.2.134",
|
|
972
972
|
description: "TypeScript SDK and CLI for Morph Fast Apply integration",
|
|
973
973
|
type: "module",
|
|
974
974
|
main: "./dist/index.cjs",
|
|
@@ -1251,7 +1251,7 @@ async function runWarpGrep(config) {
|
|
|
1251
1251
|
const messages = [];
|
|
1252
1252
|
const maxTurns = AGENT_CONFIG.MAX_TURNS;
|
|
1253
1253
|
const initialStateStart = Date.now();
|
|
1254
|
-
const initialState = await buildInitialState(repoRoot, config.
|
|
1254
|
+
const initialState = await buildInitialState(repoRoot, config.searchTerm, config.provider, { search_type: config.search_type });
|
|
1255
1255
|
timings.initial_state_ms = Date.now() - initialStateStart;
|
|
1256
1256
|
messages.push({ role: "user", content: initialState });
|
|
1257
1257
|
const provider = config.provider;
|
|
@@ -1409,7 +1409,7 @@ async function* runWarpGrepStreaming(config) {
|
|
|
1409
1409
|
const messages = [];
|
|
1410
1410
|
const maxTurns = AGENT_CONFIG.MAX_TURNS;
|
|
1411
1411
|
const initialStateStart = Date.now();
|
|
1412
|
-
const initialState = await buildInitialState(repoRoot, config.
|
|
1412
|
+
const initialState = await buildInitialState(repoRoot, config.searchTerm, config.provider, { search_type: config.search_type });
|
|
1413
1413
|
timings.initial_state_ms = Date.now() - initialStateStart;
|
|
1414
1414
|
messages.push({ role: "user", content: initialState });
|
|
1415
1415
|
const provider = config.provider;
|
|
@@ -1818,9 +1818,9 @@ var WarpGrepClient = class {
|
|
|
1818
1818
|
timeout: this.config.timeout
|
|
1819
1819
|
};
|
|
1820
1820
|
if (input.streamSteps) {
|
|
1821
|
-
return executeToolCallStreaming({
|
|
1821
|
+
return executeToolCallStreaming({ search_term: input.searchTerm }, toolConfig);
|
|
1822
1822
|
}
|
|
1823
|
-
return executeToolCall({
|
|
1823
|
+
return executeToolCall({ search_term: input.searchTerm }, toolConfig);
|
|
1824
1824
|
}
|
|
1825
1825
|
searchGitHub(input) {
|
|
1826
1826
|
if (input.streamSteps) {
|
|
@@ -1863,7 +1863,7 @@ var WarpGrepClient = class {
|
|
|
1863
1863
|
try {
|
|
1864
1864
|
const { repo, remoteCommands } = await this._resolveGitHubRepo(input);
|
|
1865
1865
|
return this.execute({
|
|
1866
|
-
|
|
1866
|
+
searchTerm: input.searchTerm,
|
|
1867
1867
|
repoRoot: repo,
|
|
1868
1868
|
remoteCommands
|
|
1869
1869
|
});
|
|
@@ -1880,7 +1880,7 @@ var WarpGrepClient = class {
|
|
|
1880
1880
|
return { success: false, error: error instanceof Error ? error.message : String(error) };
|
|
1881
1881
|
}
|
|
1882
1882
|
const generator = this.execute({
|
|
1883
|
-
|
|
1883
|
+
searchTerm: input.searchTerm,
|
|
1884
1884
|
repoRoot: repo,
|
|
1885
1885
|
remoteCommands,
|
|
1886
1886
|
streamSteps: true
|
|
@@ -1901,7 +1901,7 @@ async function executeToolCall(input, config) {
|
|
|
1901
1901
|
const parsed = typeof input === "string" ? JSON.parse(input) : input;
|
|
1902
1902
|
const provider = config.remoteCommands ? new RemoteCommandsProvider(config.repoRoot, config.remoteCommands) : config.provider ?? await getLocalProvider(config.repoRoot, config.excludes);
|
|
1903
1903
|
const result = await runWarpGrep({
|
|
1904
|
-
|
|
1904
|
+
searchTerm: parsed.search_term,
|
|
1905
1905
|
repoRoot: config.repoRoot,
|
|
1906
1906
|
provider,
|
|
1907
1907
|
excludes: config.excludes,
|
|
@@ -1943,7 +1943,7 @@ async function* executeToolCallStreaming(input, config) {
|
|
|
1943
1943
|
const parsed = typeof input === "string" ? JSON.parse(input) : input;
|
|
1944
1944
|
const provider = config.remoteCommands ? new RemoteCommandsProvider(config.repoRoot, config.remoteCommands) : config.provider ?? await getLocalProvider(config.repoRoot, config.excludes);
|
|
1945
1945
|
const generator = runWarpGrepStreaming({
|
|
1946
|
-
|
|
1946
|
+
searchTerm: parsed.search_term,
|
|
1947
1947
|
repoRoot: config.repoRoot,
|
|
1948
1948
|
provider,
|
|
1949
1949
|
excludes: config.excludes,
|
|
@@ -2029,7 +2029,7 @@ function formatResult(result) {
|
|
|
2029
2029
|
return `Search failed: ${result.error}`;
|
|
2030
2030
|
}
|
|
2031
2031
|
if (!result.contexts || result.contexts.length === 0) {
|
|
2032
|
-
return "No relevant code found. Try rephrasing your
|
|
2032
|
+
return "No relevant code found. Try rephrasing your search term.";
|
|
2033
2033
|
}
|
|
2034
2034
|
const parts = [];
|
|
2035
2035
|
parts.push(`Morph Fast Context subagent performed search on repository:
|
|
@@ -2063,12 +2063,12 @@ var GITHUB_READ_FILE_DESCRIPTION = "Read a single file (or a line range) from a
|
|
|
2063
2063
|
var TOOL_PARAMETERS = {
|
|
2064
2064
|
type: "OBJECT",
|
|
2065
2065
|
properties: {
|
|
2066
|
-
|
|
2066
|
+
search_term: {
|
|
2067
2067
|
type: "STRING",
|
|
2068
|
-
description: "
|
|
2068
|
+
description: "Search problem statement that this subagent is supposed to research for"
|
|
2069
2069
|
}
|
|
2070
2070
|
},
|
|
2071
|
-
required: ["
|
|
2071
|
+
required: ["search_term"]
|
|
2072
2072
|
};
|
|
2073
2073
|
var warpGrepFunctionDeclaration = {
|
|
2074
2074
|
name: WARP_GREP_TOOL_NAME,
|
|
@@ -2097,12 +2097,12 @@ var createMorphWarpGrepTool = createWarpGrepTool;
|
|
|
2097
2097
|
var GITHUB_SEARCH_PARAMETERS = {
|
|
2098
2098
|
type: "OBJECT",
|
|
2099
2099
|
properties: {
|
|
2100
|
-
|
|
2100
|
+
search_term: { type: "STRING", description: "Search problem statement that this subagent is supposed to research for" },
|
|
2101
2101
|
github_url: { type: "STRING", description: 'GitHub repository URL to search (e.g. "https://github.com/vercel/next.js"). You must provide either github_url or owner_repo.' },
|
|
2102
2102
|
owner_repo: { type: "STRING", description: 'Repository owner/repo shorthand (e.g. "vercel/next.js"). You must provide either github_url or owner_repo.' },
|
|
2103
2103
|
branch: { type: "STRING", description: "Branch to search (defaults to repo default branch)" }
|
|
2104
2104
|
},
|
|
2105
|
-
required: ["
|
|
2105
|
+
required: ["search_term"]
|
|
2106
2106
|
};
|
|
2107
2107
|
function createGitHubSearchTool(config) {
|
|
2108
2108
|
const client = new WarpGrepClient(config);
|
|
@@ -2117,7 +2117,7 @@ function createGitHubSearchTool(config) {
|
|
|
2117
2117
|
if (!github) {
|
|
2118
2118
|
throw new Error("Please provide github search url or owner/repo id");
|
|
2119
2119
|
}
|
|
2120
|
-
return client.searchGitHub({
|
|
2120
|
+
return client.searchGitHub({ searchTerm: input.search_term, github, branch: input.branch });
|
|
2121
2121
|
},
|
|
2122
2122
|
formatResult: (result) => {
|
|
2123
2123
|
return formatResult(result);
|