@morphllm/morphsdk 0.2.133 → 0.2.135
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-573RNHHS.js → chunk-2F3DWO73.js} +2 -2
- package/dist/{chunk-HE5NZRU5.js → chunk-2OK2AQ53.js} +2 -2
- package/dist/{chunk-Q3JQDT46.js → chunk-3577VCO6.js} +2 -2
- package/dist/{chunk-PTRCFVJK.js → chunk-3VMIBLEC.js} +15 -15
- package/dist/{chunk-LTBSHGFI.js → chunk-6BXSZ3LY.js} +2 -2
- package/dist/{chunk-E7FNLX5W.js → chunk-B6CX5J56.js} +2 -2
- package/dist/{chunk-E7FNLX5W.js.map → chunk-B6CX5J56.js.map} +1 -1
- package/dist/{chunk-ZRZLHZR5.js → chunk-BIFHPQNI.js} +9 -9
- package/dist/chunk-BIFHPQNI.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-XYSSVYM5.js → chunk-GVKV5MPR.js} +1 -1
- package/dist/{chunk-TRB754WH.js → chunk-I3QRCIZM.js} +2 -2
- package/dist/{chunk-4COEPLLX.js → chunk-JKRJSADO.js} +2 -2
- package/dist/{chunk-DTTY24M4.js → chunk-JYU72GRI.js} +2 -2
- package/dist/{chunk-4VP2MXPA.js → chunk-KNE5TLKB.js} +6 -6
- package/dist/chunk-KNE5TLKB.js.map +1 -0
- package/dist/chunk-L3XJHXFB.js +43 -0
- package/dist/chunk-L3XJHXFB.js.map +1 -0
- package/dist/{chunk-6RPO53QB.js → chunk-OTOMB64C.js} +2 -2
- package/dist/{chunk-QXXIXJEC.js → chunk-PR3GR2TN.js} +2 -2
- package/dist/{chunk-M46CBRHW.js → chunk-PXUIQKXO.js} +5 -5
- package/dist/chunk-PXUIQKXO.js.map +1 -0
- package/dist/{chunk-HPFDY27K.js → chunk-QAMKU5RD.js} +2 -2
- package/dist/{chunk-KIYCTYMP.js → chunk-QUI7SUA3.js} +2 -2
- package/dist/{chunk-X7ED75S5.js → chunk-SHMXBOBV.js} +6 -6
- package/dist/chunk-SHMXBOBV.js.map +1 -0
- package/dist/{chunk-7WCPUV2L.js → chunk-UMMB5QLA.js} +2 -2
- package/dist/{chunk-RRQJICIO.js → chunk-VNSBLMYL.js} +3 -3
- package/dist/{chunk-YTOIKG44.js → chunk-Y5UTWBLJ.js} +9 -9
- package/dist/chunk-Y5UTWBLJ.js.map +1 -0
- package/dist/{chunk-FU6LDP6Y.js → chunk-Y6DEMQ2G.js} +2 -2
- package/dist/{chunk-2U3RMBXT.js → chunk-YLT4PSXT.js} +4 -4
- package/dist/chunk-YLT4PSXT.js.map +1 -0
- package/dist/{chunk-OOXQUG4W.js → chunk-YSO7KYOI.js} +2 -2
- package/dist/{client-B9oYy2SJ.d.ts → client-D1L9Yb3A.d.ts} +6 -6
- package/dist/client.cjs +26 -26
- 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 +27 -27
- 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 +20 -20
- 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 +21 -21
- 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 +18 -18
- 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 +20 -20
- 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 +21 -21
- 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-6DRIR7AI.js +0 -43
- package/dist/chunk-6DRIR7AI.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-573RNHHS.js.map → chunk-2F3DWO73.js.map} +0 -0
- /package/dist/{chunk-HE5NZRU5.js.map → chunk-2OK2AQ53.js.map} +0 -0
- /package/dist/{chunk-Q3JQDT46.js.map → chunk-3577VCO6.js.map} +0 -0
- /package/dist/{chunk-PTRCFVJK.js.map → chunk-3VMIBLEC.js.map} +0 -0
- /package/dist/{chunk-LTBSHGFI.js.map → chunk-6BXSZ3LY.js.map} +0 -0
- /package/dist/{chunk-XYSSVYM5.js.map → chunk-GVKV5MPR.js.map} +0 -0
- /package/dist/{chunk-TRB754WH.js.map → chunk-I3QRCIZM.js.map} +0 -0
- /package/dist/{chunk-4COEPLLX.js.map → chunk-JKRJSADO.js.map} +0 -0
- /package/dist/{chunk-DTTY24M4.js.map → chunk-JYU72GRI.js.map} +0 -0
- /package/dist/{chunk-6RPO53QB.js.map → chunk-OTOMB64C.js.map} +0 -0
- /package/dist/{chunk-QXXIXJEC.js.map → chunk-PR3GR2TN.js.map} +0 -0
- /package/dist/{chunk-HPFDY27K.js.map → chunk-QAMKU5RD.js.map} +0 -0
- /package/dist/{chunk-KIYCTYMP.js.map → chunk-QUI7SUA3.js.map} +0 -0
- /package/dist/{chunk-7WCPUV2L.js.map → chunk-UMMB5QLA.js.map} +0 -0
- /package/dist/{chunk-RRQJICIO.js.map → chunk-VNSBLMYL.js.map} +0 -0
- /package/dist/{chunk-FU6LDP6Y.js.map → chunk-Y6DEMQ2G.js.map} +0 -0
- /package/dist/{chunk-OOXQUG4W.js.map → chunk-YSO7KYOI.js.map} +0 -0
package/dist/client.cjs
CHANGED
|
@@ -36,7 +36,7 @@ var init_package = __esm({
|
|
|
36
36
|
"package.json"() {
|
|
37
37
|
package_default = {
|
|
38
38
|
name: "@morphllm/morphsdk",
|
|
39
|
-
version: "0.2.
|
|
39
|
+
version: "0.2.135",
|
|
40
40
|
description: "TypeScript SDK and CLI for Morph Fast Apply integration",
|
|
41
41
|
type: "module",
|
|
42
42
|
main: "./dist/index.cjs",
|
|
@@ -2779,7 +2779,7 @@ function calculateContextBudget(messages) {
|
|
|
2779
2779
|
const maxK = Math.round(maxChars / 1e3);
|
|
2780
2780
|
return `<context_budget>${percent}% (${usedK}K/${maxK}K chars)</context_budget>`;
|
|
2781
2781
|
}
|
|
2782
|
-
async function buildInitialState(repoRoot,
|
|
2782
|
+
async function buildInitialState(repoRoot, searchTerm, provider, options) {
|
|
2783
2783
|
const budget = calculateContextBudget([]);
|
|
2784
2784
|
const turnTag = `Turn 0/${AGENT_CONFIG.MAX_TURNS}`;
|
|
2785
2785
|
const treeDepth = options?.search_type === "node_modules" ? 1 : 2;
|
|
@@ -2802,7 +2802,7 @@ ${treeOutput}
|
|
|
2802
2802
|
</repo_structure>
|
|
2803
2803
|
|
|
2804
2804
|
<search_string>
|
|
2805
|
-
${
|
|
2805
|
+
${searchTerm}
|
|
2806
2806
|
</search_string>
|
|
2807
2807
|
${budget}
|
|
2808
2808
|
${turnTag}`;
|
|
@@ -2813,7 +2813,7 @@ ${repoName}/
|
|
|
2813
2813
|
</repo_structure>
|
|
2814
2814
|
|
|
2815
2815
|
<search_string>
|
|
2816
|
-
${
|
|
2816
|
+
${searchTerm}
|
|
2817
2817
|
</search_string>
|
|
2818
2818
|
${budget}
|
|
2819
2819
|
${turnTag}`;
|
|
@@ -2908,7 +2908,7 @@ async function runWarpGrep(config) {
|
|
|
2908
2908
|
const messages = [];
|
|
2909
2909
|
const maxTurns = AGENT_CONFIG.MAX_TURNS;
|
|
2910
2910
|
const initialStateStart = Date.now();
|
|
2911
|
-
const initialState = await buildInitialState(repoRoot, config.
|
|
2911
|
+
const initialState = await buildInitialState(repoRoot, config.searchTerm, config.provider, { search_type: config.search_type });
|
|
2912
2912
|
timings.initial_state_ms = Date.now() - initialStateStart;
|
|
2913
2913
|
messages.push({ role: "user", content: initialState });
|
|
2914
2914
|
const provider = config.provider;
|
|
@@ -3066,7 +3066,7 @@ async function* runWarpGrepStreaming(config) {
|
|
|
3066
3066
|
const messages = [];
|
|
3067
3067
|
const maxTurns = AGENT_CONFIG.MAX_TURNS;
|
|
3068
3068
|
const initialStateStart = Date.now();
|
|
3069
|
-
const initialState = await buildInitialState(repoRoot, config.
|
|
3069
|
+
const initialState = await buildInitialState(repoRoot, config.searchTerm, config.provider, { search_type: config.search_type });
|
|
3070
3070
|
timings.initial_state_ms = Date.now() - initialStateStart;
|
|
3071
3071
|
messages.push({ role: "user", content: initialState });
|
|
3072
3072
|
const provider = config.provider;
|
|
@@ -3475,9 +3475,9 @@ var WarpGrepClient = class {
|
|
|
3475
3475
|
timeout: this.config.timeout
|
|
3476
3476
|
};
|
|
3477
3477
|
if (input.streamSteps) {
|
|
3478
|
-
return executeToolCallStreaming({
|
|
3478
|
+
return executeToolCallStreaming({ search_term: input.searchTerm }, toolConfig);
|
|
3479
3479
|
}
|
|
3480
|
-
return executeToolCall({
|
|
3480
|
+
return executeToolCall({ search_term: input.searchTerm }, toolConfig);
|
|
3481
3481
|
}
|
|
3482
3482
|
searchGitHub(input) {
|
|
3483
3483
|
if (input.streamSteps) {
|
|
@@ -3520,7 +3520,7 @@ var WarpGrepClient = class {
|
|
|
3520
3520
|
try {
|
|
3521
3521
|
const { repo, remoteCommands } = await this._resolveGitHubRepo(input);
|
|
3522
3522
|
return this.execute({
|
|
3523
|
-
|
|
3523
|
+
searchTerm: input.searchTerm,
|
|
3524
3524
|
repoRoot: repo,
|
|
3525
3525
|
remoteCommands
|
|
3526
3526
|
});
|
|
@@ -3537,7 +3537,7 @@ var WarpGrepClient = class {
|
|
|
3537
3537
|
return { success: false, error: error instanceof Error ? error.message : String(error) };
|
|
3538
3538
|
}
|
|
3539
3539
|
const generator = this.execute({
|
|
3540
|
-
|
|
3540
|
+
searchTerm: input.searchTerm,
|
|
3541
3541
|
repoRoot: repo,
|
|
3542
3542
|
remoteCommands,
|
|
3543
3543
|
streamSteps: true
|
|
@@ -3558,7 +3558,7 @@ async function executeToolCall(input, config) {
|
|
|
3558
3558
|
const parsed = typeof input === "string" ? JSON.parse(input) : input;
|
|
3559
3559
|
const provider = config.remoteCommands ? new RemoteCommandsProvider(config.repoRoot, config.remoteCommands) : config.provider ?? await getLocalProvider(config.repoRoot, config.excludes);
|
|
3560
3560
|
const result = await runWarpGrep({
|
|
3561
|
-
|
|
3561
|
+
searchTerm: parsed.search_term,
|
|
3562
3562
|
repoRoot: config.repoRoot,
|
|
3563
3563
|
provider,
|
|
3564
3564
|
excludes: config.excludes,
|
|
@@ -3600,7 +3600,7 @@ async function* executeToolCallStreaming(input, config) {
|
|
|
3600
3600
|
const parsed = typeof input === "string" ? JSON.parse(input) : input;
|
|
3601
3601
|
const provider = config.remoteCommands ? new RemoteCommandsProvider(config.repoRoot, config.remoteCommands) : config.provider ?? await getLocalProvider(config.repoRoot, config.excludes);
|
|
3602
3602
|
const generator = runWarpGrepStreaming({
|
|
3603
|
-
|
|
3603
|
+
searchTerm: parsed.search_term,
|
|
3604
3604
|
repoRoot: config.repoRoot,
|
|
3605
3605
|
provider,
|
|
3606
3606
|
excludes: config.excludes,
|
|
@@ -3677,7 +3677,7 @@ function formatResult(result) {
|
|
|
3677
3677
|
return `Search failed: ${result.error}`;
|
|
3678
3678
|
}
|
|
3679
3679
|
if (!result.contexts || result.contexts.length === 0) {
|
|
3680
|
-
return "No relevant code found. Try rephrasing your
|
|
3680
|
+
return "No relevant code found. Try rephrasing your search term.";
|
|
3681
3681
|
}
|
|
3682
3682
|
const parts = [];
|
|
3683
3683
|
parts.push(`Morph Fast Context subagent performed search on repository:
|
|
@@ -4873,18 +4873,18 @@ var RawRouter = class extends BaseRouter {
|
|
|
4873
4873
|
|
|
4874
4874
|
// tools/warp_grep/prompts.ts
|
|
4875
4875
|
var WARP_GREP_TOOL_NAME = "warpgrep_codebase_search";
|
|
4876
|
-
var WARP_GREP_DESCRIPTION = '
|
|
4876
|
+
var WARP_GREP_DESCRIPTION = 'Very fast code search exploration subagent (not a grep tool) that runs parallel grep and file read calls over multiple turns to locate relevant files and line ranges. The search term should be a targeted natural-language query describing what you are trying to find or accomplish, e.g. "Find where authentication requests are handled in the Express routes" or "How do callers of processOrder handle the error case?". Fill in extra context you can infer to make the query specific. Do not pass bare keywords or symbol names \u2014 use grep directly for exact symbol lookups. Use this tool first when exploring unfamiliar code. The results may be partial \u2014 follow up with classical search tools or direct file reads if needed.';
|
|
4877
4877
|
var GITHUB_WARP_GREP_SEARCH_TOOL_NAME = "warpgrep_github_search";
|
|
4878
|
-
var GITHUB_WARP_GREP_SEARCH_DESCRIPTION =
|
|
4878
|
+
var GITHUB_WARP_GREP_SEARCH_DESCRIPTION = "Code search exploration subagent for public GitHub repositories (not your local workspace \u2014 use warpgrep_codebase_search for that). Runs parallel grep and file read calls to locate relevant files and line ranges in external github repositories without cloning the repository. Pass a targeted natural-language query, not bare keywords. Useful for understanding how a library works or investigating upstream bugs. You must provide either github_url or owner_repo (at least one required). ";
|
|
4879
4879
|
var GITHUB_WARP_GREP_SEARCH_INPUT_SCHEMA = {
|
|
4880
4880
|
type: "object",
|
|
4881
4881
|
properties: {
|
|
4882
|
-
|
|
4882
|
+
search_term: { type: "string", description: 'A targeted natural-language query describing what to find (e.g. "How does auth work for SSO users?"). Not a keyword or symbol name.' },
|
|
4883
4883
|
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.' },
|
|
4884
4884
|
owner_repo: { type: "string", description: 'Repository owner/repo shorthand (e.g. "vercel/next.js"). You must provide either github_url or owner_repo.' },
|
|
4885
4885
|
branch: { type: "string", description: "Branch to search (defaults to the repository default branch)" }
|
|
4886
4886
|
},
|
|
4887
|
-
required: ["
|
|
4887
|
+
required: ["search_term"]
|
|
4888
4888
|
};
|
|
4889
4889
|
var GITHUB_SEARCH_TOOL_NAME = GITHUB_WARP_GREP_SEARCH_TOOL_NAME;
|
|
4890
4890
|
var GITHUB_SEARCH_DESCRIPTION = GITHUB_WARP_GREP_SEARCH_DESCRIPTION;
|
|
@@ -4894,9 +4894,9 @@ var GITHUB_SEARCH_INPUT_SCHEMA = GITHUB_WARP_GREP_SEARCH_INPUT_SCHEMA;
|
|
|
4894
4894
|
var TOOL_PARAMETERS = {
|
|
4895
4895
|
type: "object",
|
|
4896
4896
|
properties: {
|
|
4897
|
-
|
|
4897
|
+
search_term: { type: "string", description: "Search problem statement that this subagent is supposed to research for" }
|
|
4898
4898
|
},
|
|
4899
|
-
required: ["
|
|
4899
|
+
required: ["search_term"]
|
|
4900
4900
|
};
|
|
4901
4901
|
function createWarpGrepTool(config) {
|
|
4902
4902
|
const tool4 = {
|
|
@@ -4932,7 +4932,7 @@ function createGitHubSearchTool(config) {
|
|
|
4932
4932
|
if (!github) {
|
|
4933
4933
|
throw new Error("Please provide github search url or owner/repo id");
|
|
4934
4934
|
}
|
|
4935
|
-
return client.searchGitHub({
|
|
4935
|
+
return client.searchGitHub({ searchTerm: input.search_term, github, branch: input.branch });
|
|
4936
4936
|
},
|
|
4937
4937
|
formatResult: (result) => {
|
|
4938
4938
|
return formatResult(result);
|
|
@@ -5201,9 +5201,9 @@ var OpenAIToolFactory = class {
|
|
|
5201
5201
|
var INPUT_SCHEMA = {
|
|
5202
5202
|
type: "object",
|
|
5203
5203
|
properties: {
|
|
5204
|
-
|
|
5204
|
+
search_term: { type: "string", description: "Search problem statement that this subagent is supposed to research for" }
|
|
5205
5205
|
},
|
|
5206
|
-
required: ["
|
|
5206
|
+
required: ["search_term"]
|
|
5207
5207
|
};
|
|
5208
5208
|
function createWarpGrepTool2(config) {
|
|
5209
5209
|
const tool4 = {
|
|
@@ -5233,7 +5233,7 @@ function createGitHubSearchTool2(config) {
|
|
|
5233
5233
|
if (!github) {
|
|
5234
5234
|
throw new Error("Please provide github search url or owner/repo id");
|
|
5235
5235
|
}
|
|
5236
|
-
return client.searchGitHub({
|
|
5236
|
+
return client.searchGitHub({ searchTerm: input.search_term, github, branch: input.branch });
|
|
5237
5237
|
},
|
|
5238
5238
|
formatResult: (result) => {
|
|
5239
5239
|
return formatResult(result);
|
|
@@ -5420,7 +5420,7 @@ var import_ai = require("ai");
|
|
|
5420
5420
|
var import_zod = require("zod");
|
|
5421
5421
|
function createWarpGrepTool3(config) {
|
|
5422
5422
|
const schema = config.inputSchema ?? import_zod.z.object({
|
|
5423
|
-
|
|
5423
|
+
search_term: import_zod.z.string().describe("Search problem statement that this subagent is supposed to research for")
|
|
5424
5424
|
});
|
|
5425
5425
|
return (0, import_ai.tool)({
|
|
5426
5426
|
description: config.description ?? WARP_GREP_DESCRIPTION,
|
|
@@ -5455,7 +5455,7 @@ function createGitHubSearchTool3(config) {
|
|
|
5455
5455
|
return (0, import_ai.tool)({
|
|
5456
5456
|
description: GITHUB_SEARCH_DESCRIPTION,
|
|
5457
5457
|
inputSchema: import_zod.z.object({
|
|
5458
|
-
|
|
5458
|
+
search_term: import_zod.z.string().describe("Search problem statement that this subagent is supposed to research for"),
|
|
5459
5459
|
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.'),
|
|
5460
5460
|
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.'),
|
|
5461
5461
|
branch: import_zod.z.string().optional().describe("Branch to search (defaults to repo default branch)")
|
|
@@ -5465,7 +5465,7 @@ function createGitHubSearchTool3(config) {
|
|
|
5465
5465
|
if (!github) {
|
|
5466
5466
|
throw new Error("Please provide github search url or owner/repo id");
|
|
5467
5467
|
}
|
|
5468
|
-
const result = await client.searchGitHub({
|
|
5468
|
+
const result = await client.searchGitHub({ searchTerm: params.search_term, github, branch: params.branch });
|
|
5469
5469
|
if (!result.success) {
|
|
5470
5470
|
throw new Error(`GitHub search failed: ${result.error}`);
|
|
5471
5471
|
}
|