@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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../tools/warp_grep/agent/types.ts"],"sourcesContent":["// Core types for morph-warp-grep agent\n\nexport type ChatMessage = {\n role: 'system' | 'user' | 'assistant';\n content: string;\n};\n\nexport type ToolName = 'list_directory' | 'grep' | 'read' | 'finish' | '_skip';\n\nexport type ToolCall = {\n name: ToolName;\n arguments?: Record<string, unknown>;\n};\n\nexport type FinishFileSpec = {\n path: string;\n lines: '*' | Array<[number, number]>;\n};\n\nexport type ResolvedContext = {\n path: string;\n ranges: '*' | Array<[number, number]>;\n content: string;\n};\n\nexport type AgentFinish = {\n files: FinishFileSpec[];\n};\n\nexport type ResolvedFile = {\n path: string;\n content: string;\n};\n\nexport type WarpGrepTurnMetrics = {\n turn: number;\n morph_api_ms: number;\n local_tools_ms: number;\n};\n\nexport type WarpGrepExecutionMetrics = {\n total_ms: number;\n timeout_ms: number;\n initial_state_ms: number;\n turns: WarpGrepTurnMetrics[];\n finish_resolution_ms?: number;\n};\n\nexport type AgentRunResult = {\n terminationReason: 'completed' | 'terminated' | 'error';\n messages: ChatMessage[];\n finish?: { \n payload: string; \n metadata?: AgentFinish;\n resolved?: ResolvedContext[];\n };\n errors?: Array<{ message: string }>;\n timings?: WarpGrepExecutionMetrics;\n};\n\nexport type SessionConfig = {\n
|
|
1
|
+
{"version":3,"sources":["../../../../tools/warp_grep/agent/types.ts"],"sourcesContent":["// Core types for morph-warp-grep agent\n\nexport type ChatMessage = {\n role: 'system' | 'user' | 'assistant';\n content: string;\n};\n\nexport type ToolName = 'list_directory' | 'grep' | 'read' | 'finish' | '_skip';\n\nexport type ToolCall = {\n name: ToolName;\n arguments?: Record<string, unknown>;\n};\n\nexport type FinishFileSpec = {\n path: string;\n lines: '*' | Array<[number, number]>;\n};\n\nexport type ResolvedContext = {\n path: string;\n ranges: '*' | Array<[number, number]>;\n content: string;\n};\n\nexport type AgentFinish = {\n files: FinishFileSpec[];\n};\n\nexport type ResolvedFile = {\n path: string;\n content: string;\n};\n\nexport type WarpGrepTurnMetrics = {\n turn: number;\n morph_api_ms: number;\n local_tools_ms: number;\n};\n\nexport type WarpGrepExecutionMetrics = {\n total_ms: number;\n timeout_ms: number;\n initial_state_ms: number;\n turns: WarpGrepTurnMetrics[];\n finish_resolution_ms?: number;\n};\n\nexport type AgentRunResult = {\n terminationReason: 'completed' | 'terminated' | 'error';\n messages: ChatMessage[];\n finish?: { \n payload: string; \n metadata?: AgentFinish;\n resolved?: ResolvedContext[];\n };\n errors?: Array<{ message: string }>;\n timings?: WarpGrepExecutionMetrics;\n};\n\nexport type SessionConfig = {\n searchTerm: string;\n model?: string;\n repoRoot: string;\n excludes?: string[];\n includes?: string[];\n debug?: boolean;\n provider?: unknown; // late-bound to provider interface to avoid cycles\n /** Morph API key (defaults to MORPH_API_KEY env var) */\n morphApiKey?: string;\n /** Morph API base URL */\n morphApiUrl?: string;\n /** Retry configuration */\n retryConfig?: import('../../utils/resilience.js').RetryConfig;\n /** Timeout for model calls in ms (defaults to MORPH_WARP_GREP_TIMEOUT env var, then 30000) */\n timeout?: number;\n /** Search type hint. When 'node_modules', uses shallower initial tree and includes node_modules in search. */\n search_type?: string;\n};\n\n/**\n * A single step yielded during streaming execution.\n * Contains the turn number and tool calls made during that turn.\n */\nexport type WarpGrepStep = {\n turn: number;\n toolCalls: Array<{\n name: string;\n arguments: Record<string, unknown>;\n }>;\n};\n\n\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -893,7 +893,7 @@ function calculateContextBudget(messages) {
|
|
|
893
893
|
const maxK = Math.round(maxChars / 1e3);
|
|
894
894
|
return `<context_budget>${percent}% (${usedK}K/${maxK}K chars)</context_budget>`;
|
|
895
895
|
}
|
|
896
|
-
async function buildInitialState(repoRoot,
|
|
896
|
+
async function buildInitialState(repoRoot, searchTerm, provider, options) {
|
|
897
897
|
const budget = calculateContextBudget([]);
|
|
898
898
|
const turnTag = `Turn 0/${AGENT_CONFIG.MAX_TURNS}`;
|
|
899
899
|
const treeDepth = options?.search_type === "node_modules" ? 1 : 2;
|
|
@@ -916,7 +916,7 @@ ${treeOutput}
|
|
|
916
916
|
</repo_structure>
|
|
917
917
|
|
|
918
918
|
<search_string>
|
|
919
|
-
${
|
|
919
|
+
${searchTerm}
|
|
920
920
|
</search_string>
|
|
921
921
|
${budget}
|
|
922
922
|
${turnTag}`;
|
|
@@ -927,7 +927,7 @@ ${repoName}/
|
|
|
927
927
|
</repo_structure>
|
|
928
928
|
|
|
929
929
|
<search_string>
|
|
930
|
-
${
|
|
930
|
+
${searchTerm}
|
|
931
931
|
</search_string>
|
|
932
932
|
${budget}
|
|
933
933
|
${turnTag}`;
|
|
@@ -966,7 +966,7 @@ var import_openai = __toESM(require("openai"), 1);
|
|
|
966
966
|
// package.json
|
|
967
967
|
var package_default = {
|
|
968
968
|
name: "@morphllm/morphsdk",
|
|
969
|
-
version: "0.2.
|
|
969
|
+
version: "0.2.134",
|
|
970
970
|
description: "TypeScript SDK and CLI for Morph Fast Apply integration",
|
|
971
971
|
type: "module",
|
|
972
972
|
main: "./dist/index.cjs",
|
|
@@ -1249,7 +1249,7 @@ async function runWarpGrep(config) {
|
|
|
1249
1249
|
const messages = [];
|
|
1250
1250
|
const maxTurns = AGENT_CONFIG.MAX_TURNS;
|
|
1251
1251
|
const initialStateStart = Date.now();
|
|
1252
|
-
const initialState = await buildInitialState(repoRoot, config.
|
|
1252
|
+
const initialState = await buildInitialState(repoRoot, config.searchTerm, config.provider, { search_type: config.search_type });
|
|
1253
1253
|
timings.initial_state_ms = Date.now() - initialStateStart;
|
|
1254
1254
|
messages.push({ role: "user", content: initialState });
|
|
1255
1255
|
const provider = config.provider;
|
|
@@ -1407,7 +1407,7 @@ async function* runWarpGrepStreaming(config) {
|
|
|
1407
1407
|
const messages = [];
|
|
1408
1408
|
const maxTurns = AGENT_CONFIG.MAX_TURNS;
|
|
1409
1409
|
const initialStateStart = Date.now();
|
|
1410
|
-
const initialState = await buildInitialState(repoRoot, config.
|
|
1410
|
+
const initialState = await buildInitialState(repoRoot, config.searchTerm, config.provider, { search_type: config.search_type });
|
|
1411
1411
|
timings.initial_state_ms = Date.now() - initialStateStart;
|
|
1412
1412
|
messages.push({ role: "user", content: initialState });
|
|
1413
1413
|
const provider = config.provider;
|
|
@@ -1816,9 +1816,9 @@ var WarpGrepClient = class {
|
|
|
1816
1816
|
timeout: this.config.timeout
|
|
1817
1817
|
};
|
|
1818
1818
|
if (input.streamSteps) {
|
|
1819
|
-
return executeToolCallStreaming({
|
|
1819
|
+
return executeToolCallStreaming({ search_term: input.searchTerm }, toolConfig);
|
|
1820
1820
|
}
|
|
1821
|
-
return executeToolCall({
|
|
1821
|
+
return executeToolCall({ search_term: input.searchTerm }, toolConfig);
|
|
1822
1822
|
}
|
|
1823
1823
|
searchGitHub(input) {
|
|
1824
1824
|
if (input.streamSteps) {
|
|
@@ -1861,7 +1861,7 @@ var WarpGrepClient = class {
|
|
|
1861
1861
|
try {
|
|
1862
1862
|
const { repo, remoteCommands } = await this._resolveGitHubRepo(input);
|
|
1863
1863
|
return this.execute({
|
|
1864
|
-
|
|
1864
|
+
searchTerm: input.searchTerm,
|
|
1865
1865
|
repoRoot: repo,
|
|
1866
1866
|
remoteCommands
|
|
1867
1867
|
});
|
|
@@ -1878,7 +1878,7 @@ var WarpGrepClient = class {
|
|
|
1878
1878
|
return { success: false, error: error instanceof Error ? error.message : String(error) };
|
|
1879
1879
|
}
|
|
1880
1880
|
const generator = this.execute({
|
|
1881
|
-
|
|
1881
|
+
searchTerm: input.searchTerm,
|
|
1882
1882
|
repoRoot: repo,
|
|
1883
1883
|
remoteCommands,
|
|
1884
1884
|
streamSteps: true
|
|
@@ -1899,7 +1899,7 @@ async function executeToolCall(input, config) {
|
|
|
1899
1899
|
const parsed = typeof input === "string" ? JSON.parse(input) : input;
|
|
1900
1900
|
const provider = config.remoteCommands ? new RemoteCommandsProvider(config.repoRoot, config.remoteCommands) : config.provider ?? await getLocalProvider(config.repoRoot, config.excludes);
|
|
1901
1901
|
const result = await runWarpGrep({
|
|
1902
|
-
|
|
1902
|
+
searchTerm: parsed.search_term,
|
|
1903
1903
|
repoRoot: config.repoRoot,
|
|
1904
1904
|
provider,
|
|
1905
1905
|
excludes: config.excludes,
|
|
@@ -1941,7 +1941,7 @@ async function* executeToolCallStreaming(input, config) {
|
|
|
1941
1941
|
const parsed = typeof input === "string" ? JSON.parse(input) : input;
|
|
1942
1942
|
const provider = config.remoteCommands ? new RemoteCommandsProvider(config.repoRoot, config.remoteCommands) : config.provider ?? await getLocalProvider(config.repoRoot, config.excludes);
|
|
1943
1943
|
const generator = runWarpGrepStreaming({
|
|
1944
|
-
|
|
1944
|
+
searchTerm: parsed.search_term,
|
|
1945
1945
|
repoRoot: config.repoRoot,
|
|
1946
1946
|
provider,
|
|
1947
1947
|
excludes: config.excludes,
|
|
@@ -2027,7 +2027,7 @@ function formatResult(result) {
|
|
|
2027
2027
|
return `Search failed: ${result.error}`;
|
|
2028
2028
|
}
|
|
2029
2029
|
if (!result.contexts || result.contexts.length === 0) {
|
|
2030
|
-
return "No relevant code found. Try rephrasing your
|
|
2030
|
+
return "No relevant code found. Try rephrasing your search term.";
|
|
2031
2031
|
}
|
|
2032
2032
|
const parts = [];
|
|
2033
2033
|
parts.push(`Morph Fast Context subagent performed search on repository:
|
|
@@ -2055,12 +2055,12 @@ var GITHUB_WARP_GREP_SEARCH_DESCRIPTION = 'IMPORTANT: If you need to explore the
|
|
|
2055
2055
|
var GITHUB_WARP_GREP_SEARCH_INPUT_SCHEMA = {
|
|
2056
2056
|
type: "object",
|
|
2057
2057
|
properties: {
|
|
2058
|
-
|
|
2058
|
+
search_term: { type: "string", description: "Search problem statement that this subagent is supposed to research for" },
|
|
2059
2059
|
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.' },
|
|
2060
2060
|
owner_repo: { type: "string", description: 'Repository owner/repo shorthand (e.g. "vercel/next.js"). You must provide either github_url or owner_repo.' },
|
|
2061
2061
|
branch: { type: "string", description: "Branch to search (defaults to the repository default branch)" }
|
|
2062
2062
|
},
|
|
2063
|
-
required: ["
|
|
2063
|
+
required: ["search_term"]
|
|
2064
2064
|
};
|
|
2065
2065
|
var GITHUB_SEARCH_TOOL_NAME = GITHUB_WARP_GREP_SEARCH_TOOL_NAME;
|
|
2066
2066
|
var GITHUB_SEARCH_DESCRIPTION = GITHUB_WARP_GREP_SEARCH_DESCRIPTION;
|
|
@@ -2083,9 +2083,9 @@ var GITHUB_READ_FILE_INPUT_SCHEMA = {
|
|
|
2083
2083
|
var INPUT_SCHEMA = {
|
|
2084
2084
|
type: "object",
|
|
2085
2085
|
properties: {
|
|
2086
|
-
|
|
2086
|
+
search_term: { type: "string", description: "Search problem statement that this subagent is supposed to research for" }
|
|
2087
2087
|
},
|
|
2088
|
-
required: ["
|
|
2088
|
+
required: ["search_term"]
|
|
2089
2089
|
};
|
|
2090
2090
|
var warpGrepTool = {
|
|
2091
2091
|
name: WARP_GREP_TOOL_NAME,
|
|
@@ -2123,7 +2123,7 @@ function createGitHubSearchTool(config) {
|
|
|
2123
2123
|
if (!github) {
|
|
2124
2124
|
throw new Error("Please provide github search url or owner/repo id");
|
|
2125
2125
|
}
|
|
2126
|
-
return client.searchGitHub({
|
|
2126
|
+
return client.searchGitHub({ searchTerm: input.search_term, github, branch: input.branch });
|
|
2127
2127
|
},
|
|
2128
2128
|
formatResult: (result) => {
|
|
2129
2129
|
return formatResult(result);
|