@morphllm/morphsdk 0.2.133 → 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-FU6LDP6Y.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-E7FNLX5W.js → chunk-5ALXAPOK.js} +2 -2
- package/dist/{chunk-E7FNLX5W.js.map → chunk-5ALXAPOK.js.map} +1 -1
- package/dist/{chunk-PTRCFVJK.js → chunk-67DYLZPG.js} +15 -15
- package/dist/{chunk-YTOIKG44.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-DTTY24M4.js → chunk-FIZ62J4I.js} +2 -2
- package/dist/{chunk-KIYCTYMP.js → chunk-GX2LIDD3.js} +2 -2
- package/dist/{chunk-6RPO53QB.js → chunk-JCHVRIMF.js} +2 -2
- package/dist/{chunk-LTBSHGFI.js → chunk-JQRQHNNL.js} +2 -2
- package/dist/{chunk-XYSSVYM5.js → chunk-JZ5QGBGN.js} +1 -1
- package/dist/{chunk-QXXIXJEC.js → chunk-K6XWPSVZ.js} +2 -2
- package/dist/{chunk-HE5NZRU5.js → chunk-KBDOWN6S.js} +2 -2
- package/dist/{chunk-HPFDY27K.js → chunk-KDBJPYTR.js} +2 -2
- package/dist/{chunk-Q3JQDT46.js → chunk-KNB5LOE2.js} +2 -2
- package/dist/{chunk-X7ED75S5.js → chunk-LCNDWM3Z.js} +6 -6
- package/dist/chunk-LCNDWM3Z.js.map +1 -0
- package/dist/{chunk-RRQJICIO.js → chunk-MTLAZJTA.js} +3 -3
- package/dist/{chunk-OOXQUG4W.js → chunk-PSITTOMP.js} +2 -2
- package/dist/{chunk-4VP2MXPA.js → chunk-PTGAOOSH.js} +6 -6
- package/dist/chunk-PTGAOOSH.js.map +1 -0
- package/dist/{chunk-7WCPUV2L.js → chunk-TNS7ANSG.js} +2 -2
- package/dist/{chunk-TRB754WH.js → chunk-VQZBQDXC.js} +2 -2
- package/dist/{chunk-ZRZLHZR5.js → chunk-VZX3HT24.js} +9 -9
- package/dist/chunk-VZX3HT24.js.map +1 -0
- package/dist/{chunk-M46CBRHW.js → chunk-WBMMR34M.js} +5 -5
- package/dist/chunk-WBMMR34M.js.map +1 -0
- package/dist/{chunk-4COEPLLX.js → chunk-XCQYVJFB.js} +2 -2
- package/dist/{chunk-573RNHHS.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 +24 -24
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.ts +2 -2
- package/dist/client.js +22 -22
- package/dist/edge.cjs +1 -1
- package/dist/edge.cjs.map +1 -1
- package/dist/edge.js +4 -4
- package/dist/index.cjs +25 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +23 -23
- 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/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-4VP2MXPA.js.map +0 -1
- package/dist/chunk-M46CBRHW.js.map +0 -1
- package/dist/chunk-QLBRTLEI.js +0 -10
- package/dist/chunk-X7ED75S5.js.map +0 -1
- package/dist/chunk-YTOIKG44.js.map +0 -1
- package/dist/chunk-ZRZLHZR5.js.map +0 -1
- /package/dist/{chunk-FU6LDP6Y.js.map → chunk-37APZU2T.js.map} +0 -0
- /package/dist/{chunk-PTRCFVJK.js.map → chunk-67DYLZPG.js.map} +0 -0
- /package/dist/{chunk-DTTY24M4.js.map → chunk-FIZ62J4I.js.map} +0 -0
- /package/dist/{chunk-KIYCTYMP.js.map → chunk-GX2LIDD3.js.map} +0 -0
- /package/dist/{chunk-6RPO53QB.js.map → chunk-JCHVRIMF.js.map} +0 -0
- /package/dist/{chunk-LTBSHGFI.js.map → chunk-JQRQHNNL.js.map} +0 -0
- /package/dist/{chunk-XYSSVYM5.js.map → chunk-JZ5QGBGN.js.map} +0 -0
- /package/dist/{chunk-QXXIXJEC.js.map → chunk-K6XWPSVZ.js.map} +0 -0
- /package/dist/{chunk-HE5NZRU5.js.map → chunk-KBDOWN6S.js.map} +0 -0
- /package/dist/{chunk-HPFDY27K.js.map → chunk-KDBJPYTR.js.map} +0 -0
- /package/dist/{chunk-Q3JQDT46.js.map → chunk-KNB5LOE2.js.map} +0 -0
- /package/dist/{chunk-RRQJICIO.js.map → chunk-MTLAZJTA.js.map} +0 -0
- /package/dist/{chunk-OOXQUG4W.js.map → chunk-PSITTOMP.js.map} +0 -0
- /package/dist/{chunk-7WCPUV2L.js.map → chunk-TNS7ANSG.js.map} +0 -0
- /package/dist/{chunk-TRB754WH.js.map → chunk-VQZBQDXC.js.map} +0 -0
- /package/dist/{chunk-4COEPLLX.js.map → chunk-XCQYVJFB.js.map} +0 -0
- /package/dist/{chunk-573RNHHS.js.map → chunk-XI7DF7PI.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChatCompletionTool } from 'openai/resources/chat/completions';
|
|
2
2
|
export { formatResult } from './client.js';
|
|
3
|
-
import { d as WarpGrepToolConfig, b as WarpGrepResult, g as GitHubSearchToolConfig, h as GitHubReadFileToolConfig, e as GitHubReadFileInput, f as GitHubReadFileResult } from '../../types-
|
|
3
|
+
import { d as WarpGrepToolConfig, b as WarpGrepResult, g as GitHubSearchToolConfig, h as GitHubReadFileToolConfig, e as GitHubReadFileInput, f as GitHubReadFileResult } from '../../types-C5r_ph-V.js';
|
|
4
4
|
import './agent/types.js';
|
|
5
5
|
import '../utils/resilience.js';
|
|
6
6
|
import './providers/types.js';
|
|
@@ -25,19 +25,19 @@ import './providers/types.js';
|
|
|
25
25
|
* });
|
|
26
26
|
*
|
|
27
27
|
* // Execute the tool call
|
|
28
|
-
* const result = await execute({
|
|
28
|
+
* const result = await execute({ search_term: '...' }, { repoRoot: '.' });
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
31
|
declare const warpGrepTool: ChatCompletionTool;
|
|
32
32
|
/**
|
|
33
33
|
* Execute warp grep search
|
|
34
34
|
*
|
|
35
|
-
* @param input - Tool input with
|
|
35
|
+
* @param input - Tool input with search_term
|
|
36
36
|
* @param config - Configuration with repoRoot and optional provider
|
|
37
37
|
* @returns Search results
|
|
38
38
|
*/
|
|
39
39
|
declare function execute(input: {
|
|
40
|
-
|
|
40
|
+
search_term: string;
|
|
41
41
|
} | string, config: WarpGrepToolConfig): Promise<WarpGrepResult>;
|
|
42
42
|
|
|
43
43
|
/**
|
|
@@ -97,13 +97,13 @@ declare function createWarpGrepTool(config: WarpGrepToolConfig): ChatCompletionT
|
|
|
97
97
|
* });
|
|
98
98
|
*
|
|
99
99
|
* // Execute
|
|
100
|
-
* const result = await tool.execute({
|
|
100
|
+
* const result = await tool.execute({ search_term: 'auth middleware', github_url: 'https://github.com/vercel/next.js' });
|
|
101
101
|
* console.log(tool.formatResult(result));
|
|
102
102
|
* ```
|
|
103
103
|
*/
|
|
104
104
|
declare function createGitHubSearchTool(config: GitHubSearchToolConfig): ChatCompletionTool & {
|
|
105
105
|
execute: (input: {
|
|
106
|
-
|
|
106
|
+
search_term: string;
|
|
107
107
|
github_url?: string;
|
|
108
108
|
owner_repo?: string;
|
|
109
109
|
branch?: string;
|
|
@@ -5,20 +5,20 @@ import {
|
|
|
5
5
|
execute,
|
|
6
6
|
openai_default,
|
|
7
7
|
warpGrepTool
|
|
8
|
-
} from "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
8
|
+
} from "../../chunk-PTGAOOSH.js";
|
|
9
|
+
import "../../chunk-37SPZ55Z.js";
|
|
10
10
|
import {
|
|
11
11
|
formatResult
|
|
12
|
-
} from "../../chunk-
|
|
12
|
+
} from "../../chunk-B6LTRVNE.js";
|
|
13
13
|
import "../../chunk-NF2QWJDY.js";
|
|
14
14
|
import "../../chunk-63VHBANJ.js";
|
|
15
|
-
import "../../chunk-
|
|
15
|
+
import "../../chunk-WBMMR34M.js";
|
|
16
16
|
import "../../chunk-GVGJIXV2.js";
|
|
17
|
-
import "../../chunk-
|
|
17
|
+
import "../../chunk-YLT4PSXT.js";
|
|
18
18
|
import "../../chunk-DKODF3YG.js";
|
|
19
19
|
import "../../chunk-QRXG5CAZ.js";
|
|
20
20
|
import "../../chunk-VCKJ22DX.js";
|
|
21
|
-
import "../../chunk-
|
|
21
|
+
import "../../chunk-5ALXAPOK.js";
|
|
22
22
|
import "../../chunk-PZ5AY32C.js";
|
|
23
23
|
export {
|
|
24
24
|
createGitHubReadFileTool,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WarpGrepProvider, GrepResult, ReadResult, ListDirectoryEntry } from './types.js';
|
|
2
|
-
import { R as RemoteCommands } from '../../../types-
|
|
2
|
+
import { R as RemoteCommands } from '../../../types-C5r_ph-V.js';
|
|
3
3
|
import '../../utils/resilience.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -896,7 +896,7 @@ function calculateContextBudget(messages) {
|
|
|
896
896
|
const maxK = Math.round(maxChars / 1e3);
|
|
897
897
|
return `<context_budget>${percent}% (${usedK}K/${maxK}K chars)</context_budget>`;
|
|
898
898
|
}
|
|
899
|
-
async function buildInitialState(repoRoot,
|
|
899
|
+
async function buildInitialState(repoRoot, searchTerm, provider, options) {
|
|
900
900
|
const budget = calculateContextBudget([]);
|
|
901
901
|
const turnTag = `Turn 0/${AGENT_CONFIG.MAX_TURNS}`;
|
|
902
902
|
const treeDepth = options?.search_type === "node_modules" ? 1 : 2;
|
|
@@ -919,7 +919,7 @@ ${treeOutput}
|
|
|
919
919
|
</repo_structure>
|
|
920
920
|
|
|
921
921
|
<search_string>
|
|
922
|
-
${
|
|
922
|
+
${searchTerm}
|
|
923
923
|
</search_string>
|
|
924
924
|
${budget}
|
|
925
925
|
${turnTag}`;
|
|
@@ -930,7 +930,7 @@ ${repoName}/
|
|
|
930
930
|
</repo_structure>
|
|
931
931
|
|
|
932
932
|
<search_string>
|
|
933
|
-
${
|
|
933
|
+
${searchTerm}
|
|
934
934
|
</search_string>
|
|
935
935
|
${budget}
|
|
936
936
|
${turnTag}`;
|
|
@@ -969,7 +969,7 @@ var import_openai = __toESM(require("openai"), 1);
|
|
|
969
969
|
// package.json
|
|
970
970
|
var package_default = {
|
|
971
971
|
name: "@morphllm/morphsdk",
|
|
972
|
-
version: "0.2.
|
|
972
|
+
version: "0.2.134",
|
|
973
973
|
description: "TypeScript SDK and CLI for Morph Fast Apply integration",
|
|
974
974
|
type: "module",
|
|
975
975
|
main: "./dist/index.cjs",
|
|
@@ -1252,7 +1252,7 @@ async function runWarpGrep(config) {
|
|
|
1252
1252
|
const messages = [];
|
|
1253
1253
|
const maxTurns = AGENT_CONFIG.MAX_TURNS;
|
|
1254
1254
|
const initialStateStart = Date.now();
|
|
1255
|
-
const initialState = await buildInitialState(repoRoot, config.
|
|
1255
|
+
const initialState = await buildInitialState(repoRoot, config.searchTerm, config.provider, { search_type: config.search_type });
|
|
1256
1256
|
timings.initial_state_ms = Date.now() - initialStateStart;
|
|
1257
1257
|
messages.push({ role: "user", content: initialState });
|
|
1258
1258
|
const provider = config.provider;
|
|
@@ -1410,7 +1410,7 @@ async function* runWarpGrepStreaming(config) {
|
|
|
1410
1410
|
const messages = [];
|
|
1411
1411
|
const maxTurns = AGENT_CONFIG.MAX_TURNS;
|
|
1412
1412
|
const initialStateStart = Date.now();
|
|
1413
|
-
const initialState = await buildInitialState(repoRoot, config.
|
|
1413
|
+
const initialState = await buildInitialState(repoRoot, config.searchTerm, config.provider, { search_type: config.search_type });
|
|
1414
1414
|
timings.initial_state_ms = Date.now() - initialStateStart;
|
|
1415
1415
|
messages.push({ role: "user", content: initialState });
|
|
1416
1416
|
const provider = config.provider;
|
|
@@ -1819,9 +1819,9 @@ var WarpGrepClient = class {
|
|
|
1819
1819
|
timeout: this.config.timeout
|
|
1820
1820
|
};
|
|
1821
1821
|
if (input.streamSteps) {
|
|
1822
|
-
return executeToolCallStreaming({
|
|
1822
|
+
return executeToolCallStreaming({ search_term: input.searchTerm }, toolConfig);
|
|
1823
1823
|
}
|
|
1824
|
-
return executeToolCall({
|
|
1824
|
+
return executeToolCall({ search_term: input.searchTerm }, toolConfig);
|
|
1825
1825
|
}
|
|
1826
1826
|
searchGitHub(input) {
|
|
1827
1827
|
if (input.streamSteps) {
|
|
@@ -1864,7 +1864,7 @@ var WarpGrepClient = class {
|
|
|
1864
1864
|
try {
|
|
1865
1865
|
const { repo, remoteCommands } = await this._resolveGitHubRepo(input);
|
|
1866
1866
|
return this.execute({
|
|
1867
|
-
|
|
1867
|
+
searchTerm: input.searchTerm,
|
|
1868
1868
|
repoRoot: repo,
|
|
1869
1869
|
remoteCommands
|
|
1870
1870
|
});
|
|
@@ -1881,7 +1881,7 @@ var WarpGrepClient = class {
|
|
|
1881
1881
|
return { success: false, error: error instanceof Error ? error.message : String(error) };
|
|
1882
1882
|
}
|
|
1883
1883
|
const generator = this.execute({
|
|
1884
|
-
|
|
1884
|
+
searchTerm: input.searchTerm,
|
|
1885
1885
|
repoRoot: repo,
|
|
1886
1886
|
remoteCommands,
|
|
1887
1887
|
streamSteps: true
|
|
@@ -1902,7 +1902,7 @@ async function executeToolCall(input, config) {
|
|
|
1902
1902
|
const parsed = typeof input === "string" ? JSON.parse(input) : input;
|
|
1903
1903
|
const provider = config.remoteCommands ? new RemoteCommandsProvider(config.repoRoot, config.remoteCommands) : config.provider ?? await getLocalProvider(config.repoRoot, config.excludes);
|
|
1904
1904
|
const result = await runWarpGrep({
|
|
1905
|
-
|
|
1905
|
+
searchTerm: parsed.search_term,
|
|
1906
1906
|
repoRoot: config.repoRoot,
|
|
1907
1907
|
provider,
|
|
1908
1908
|
excludes: config.excludes,
|
|
@@ -1944,7 +1944,7 @@ async function* executeToolCallStreaming(input, config) {
|
|
|
1944
1944
|
const parsed = typeof input === "string" ? JSON.parse(input) : input;
|
|
1945
1945
|
const provider = config.remoteCommands ? new RemoteCommandsProvider(config.repoRoot, config.remoteCommands) : config.provider ?? await getLocalProvider(config.repoRoot, config.excludes);
|
|
1946
1946
|
const generator = runWarpGrepStreaming({
|
|
1947
|
-
|
|
1947
|
+
searchTerm: parsed.search_term,
|
|
1948
1948
|
repoRoot: config.repoRoot,
|
|
1949
1949
|
provider,
|
|
1950
1950
|
excludes: config.excludes,
|
|
@@ -2021,7 +2021,7 @@ function formatResult(result) {
|
|
|
2021
2021
|
return `Search failed: ${result.error}`;
|
|
2022
2022
|
}
|
|
2023
2023
|
if (!result.contexts || result.contexts.length === 0) {
|
|
2024
|
-
return "No relevant code found. Try rephrasing your
|
|
2024
|
+
return "No relevant code found. Try rephrasing your search term.";
|
|
2025
2025
|
}
|
|
2026
2026
|
const parts = [];
|
|
2027
2027
|
parts.push(`Morph Fast Context subagent performed search on repository:
|
|
@@ -2051,12 +2051,12 @@ var GITHUB_READ_FILE_DESCRIPTION = "Read a single file (or a line range) from a
|
|
|
2051
2051
|
var warpGrepJsonSchema = {
|
|
2052
2052
|
type: "object",
|
|
2053
2053
|
properties: {
|
|
2054
|
-
|
|
2054
|
+
search_term: {
|
|
2055
2055
|
type: "string",
|
|
2056
|
-
description: "
|
|
2056
|
+
description: "Search problem statement that this subagent is supposed to research for"
|
|
2057
2057
|
}
|
|
2058
2058
|
},
|
|
2059
|
-
required: ["
|
|
2059
|
+
required: ["search_term"],
|
|
2060
2060
|
additionalProperties: false
|
|
2061
2061
|
};
|
|
2062
2062
|
async function execute(input, config) {
|
|
@@ -2064,7 +2064,7 @@ async function execute(input, config) {
|
|
|
2064
2064
|
}
|
|
2065
2065
|
function createWarpGrepTool(config) {
|
|
2066
2066
|
const schema = config.inputSchema ?? import_zod.z.object({
|
|
2067
|
-
|
|
2067
|
+
search_term: import_zod.z.string().describe("Search problem statement that this subagent is supposed to research for")
|
|
2068
2068
|
});
|
|
2069
2069
|
return (0, import_ai.tool)({
|
|
2070
2070
|
description: config.description ?? WARP_GREP_DESCRIPTION,
|
|
@@ -2099,7 +2099,7 @@ function createGitHubSearchTool(config) {
|
|
|
2099
2099
|
return (0, import_ai.tool)({
|
|
2100
2100
|
description: GITHUB_SEARCH_DESCRIPTION,
|
|
2101
2101
|
inputSchema: import_zod.z.object({
|
|
2102
|
-
|
|
2102
|
+
search_term: import_zod.z.string().describe("Search problem statement that this subagent is supposed to research for"),
|
|
2103
2103
|
github_url: import_zod.z.string().optional().describe('GitHub repository URL to search (e.g. "https://github.com/vercel/next.js"). You must provide either github_url or owner_repo.'),
|
|
2104
2104
|
owner_repo: import_zod.z.string().optional().describe('Repository owner/repo shorthand (e.g. "vercel/next.js"). You must provide either github_url or owner_repo.'),
|
|
2105
2105
|
branch: import_zod.z.string().optional().describe("Branch to search (defaults to repo default branch)")
|
|
@@ -2109,7 +2109,7 @@ function createGitHubSearchTool(config) {
|
|
|
2109
2109
|
if (!github) {
|
|
2110
2110
|
throw new Error("Please provide github search url or owner/repo id");
|
|
2111
2111
|
}
|
|
2112
|
-
const result = await client.searchGitHub({
|
|
2112
|
+
const result = await client.searchGitHub({ searchTerm: params.search_term, github, branch: params.branch });
|
|
2113
2113
|
if (!result.success) {
|
|
2114
2114
|
throw new Error(`GitHub search failed: ${result.error}`);
|
|
2115
2115
|
}
|