@morphllm/morphsdk 0.2.122 → 0.2.123
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-2AQLRL4U.js → chunk-5OJE7GH4.js} +2 -2
- package/dist/{chunk-4IU2K63O.js → chunk-ANPZFWYV.js} +2 -2
- package/dist/{chunk-OTGBQEVH.js → chunk-BJ2764MK.js} +2 -2
- package/dist/{chunk-GTANVDUZ.js → chunk-DBSOONOY.js} +2 -2
- package/dist/{chunk-TBLMIAIH.js → chunk-ETTCJWJK.js} +25 -3
- package/dist/chunk-ETTCJWJK.js.map +1 -0
- package/dist/{chunk-RNKHRNSG.js → chunk-FMKJ72KT.js} +2 -2
- package/dist/{chunk-RNKHRNSG.js.map → chunk-FMKJ72KT.js.map} +1 -1
- package/dist/{chunk-EBROW6GK.js → chunk-GXFJLL5O.js} +2 -2
- package/dist/{chunk-4LA3OT4Q.js → chunk-H3U7J5RI.js} +25 -4
- package/dist/chunk-H3U7J5RI.js.map +1 -0
- package/dist/{chunk-LE24SVVU.js → chunk-HVBJ4UO6.js} +2 -2
- package/dist/{chunk-73GZ6KUK.js → chunk-K74GLGST.js} +2 -2
- package/dist/{chunk-4GEBF5OH.js → chunk-KL3AMLGL.js} +2 -2
- package/dist/{chunk-3PMFQ5AV.js → chunk-L426IMZD.js} +2 -2
- package/dist/{chunk-TXT3W4QK.js → chunk-MXSGTN7R.js} +80 -2
- package/dist/chunk-MXSGTN7R.js.map +1 -0
- package/dist/{chunk-2MJEULZU.js → chunk-OFJYDTQI.js} +2 -2
- package/dist/chunk-OTOVGCG6.js +42 -0
- package/dist/chunk-OTOVGCG6.js.map +1 -0
- package/dist/{chunk-7KOUCN6T.js → chunk-QD7KPI7A.js} +2 -2
- package/dist/{chunk-T3T4LGRD.js → chunk-QGRFAVGK.js} +27 -3
- package/dist/chunk-QGRFAVGK.js.map +1 -0
- package/dist/{chunk-L4URLBKV.js → chunk-UHL2ZEWG.js} +3 -3
- package/dist/{chunk-5UUJULLM.js → chunk-UJS3AIWS.js} +2 -2
- package/dist/{chunk-QGE7FGGT.js → chunk-UX65IRCX.js} +2 -2
- package/dist/{chunk-64KNVHR4.js → chunk-V3HLOZK2.js} +1 -1
- package/dist/{chunk-64KNVHR4.js.map → chunk-V3HLOZK2.js.map} +1 -1
- package/dist/{chunk-UDGJQBTC.js → chunk-V4KBK66V.js} +15 -15
- package/dist/{chunk-ZHRT6F72.js → chunk-WE75QX2B.js} +1 -1
- package/dist/{chunk-OWISPSLH.js → chunk-XXL62KSJ.js} +2 -2
- package/dist/{chunk-MQWEZJTP.js → chunk-ZZCMAFN7.js} +5 -5
- package/dist/chunk-ZZCMAFN7.js.map +1 -0
- package/dist/{client-BJrzbMYL.d.ts → client-JHPwle1Z.d.ts} +1 -1
- package/dist/client.cjs +78 -8
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.ts +2 -2
- package/dist/client.js +21 -21
- package/dist/edge.cjs +1 -1
- package/dist/edge.cjs.map +1 -1
- package/dist/edge.js +4 -4
- package/dist/index.cjs +78 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +22 -22
- 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 +4 -4
- 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/anthropic.cjs +117 -8
- package/dist/tools/warp_grep/anthropic.cjs.map +1 -1
- package/dist/tools/warp_grep/anthropic.d.ts +29 -2
- package/dist/tools/warp_grep/anthropic.js +7 -5
- package/dist/tools/warp_grep/client.cjs +84 -4
- package/dist/tools/warp_grep/client.cjs.map +1 -1
- package/dist/tools/warp_grep/client.d.ts +27 -2
- package/dist/tools/warp_grep/client.js +7 -3
- package/dist/tools/warp_grep/gemini.cjs +114 -6
- package/dist/tools/warp_grep/gemini.cjs.map +1 -1
- package/dist/tools/warp_grep/gemini.d.ts +29 -2
- package/dist/tools/warp_grep/gemini.js +35 -4
- package/dist/tools/warp_grep/gemini.js.map +1 -1
- package/dist/tools/warp_grep/index.cjs +110 -8
- package/dist/tools/warp_grep/index.cjs.map +1 -1
- package/dist/tools/warp_grep/index.d.ts +32 -4
- package/dist/tools/warp_grep/index.js +15 -5
- package/dist/tools/warp_grep/openai.cjs +120 -8
- package/dist/tools/warp_grep/openai.cjs.map +1 -1
- package/dist/tools/warp_grep/openai.d.ts +29 -2
- package/dist/tools/warp_grep/openai.js +7 -5
- 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 +95 -5
- package/dist/tools/warp_grep/vercel.cjs.map +1 -1
- package/dist/tools/warp_grep/vercel.d.ts +30 -2
- package/dist/tools/warp_grep/vercel.js +7 -5
- package/dist/{types-CA7989hK.d.ts → types-DY_hq2eZ.d.ts} +37 -1
- 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-4LA3OT4Q.js.map +0 -1
- package/dist/chunk-KJZMKDDP.js +0 -23
- package/dist/chunk-KJZMKDDP.js.map +0 -1
- package/dist/chunk-MQWEZJTP.js.map +0 -1
- package/dist/chunk-T3T4LGRD.js.map +0 -1
- package/dist/chunk-TBLMIAIH.js.map +0 -1
- package/dist/chunk-TXT3W4QK.js.map +0 -1
- /package/dist/{chunk-2AQLRL4U.js.map → chunk-5OJE7GH4.js.map} +0 -0
- /package/dist/{chunk-4IU2K63O.js.map → chunk-ANPZFWYV.js.map} +0 -0
- /package/dist/{chunk-OTGBQEVH.js.map → chunk-BJ2764MK.js.map} +0 -0
- /package/dist/{chunk-GTANVDUZ.js.map → chunk-DBSOONOY.js.map} +0 -0
- /package/dist/{chunk-EBROW6GK.js.map → chunk-GXFJLL5O.js.map} +0 -0
- /package/dist/{chunk-LE24SVVU.js.map → chunk-HVBJ4UO6.js.map} +0 -0
- /package/dist/{chunk-73GZ6KUK.js.map → chunk-K74GLGST.js.map} +0 -0
- /package/dist/{chunk-4GEBF5OH.js.map → chunk-KL3AMLGL.js.map} +0 -0
- /package/dist/{chunk-3PMFQ5AV.js.map → chunk-L426IMZD.js.map} +0 -0
- /package/dist/{chunk-2MJEULZU.js.map → chunk-OFJYDTQI.js.map} +0 -0
- /package/dist/{chunk-7KOUCN6T.js.map → chunk-QD7KPI7A.js.map} +0 -0
- /package/dist/{chunk-L4URLBKV.js.map → chunk-UHL2ZEWG.js.map} +0 -0
- /package/dist/{chunk-5UUJULLM.js.map → chunk-UJS3AIWS.js.map} +0 -0
- /package/dist/{chunk-QGE7FGGT.js.map → chunk-UX65IRCX.js.map} +0 -0
- /package/dist/{chunk-UDGJQBTC.js.map → chunk-V4KBK66V.js.map} +0 -0
- /package/dist/{chunk-ZHRT6F72.js.map → chunk-WE75QX2B.js.map} +0 -0
- /package/dist/{chunk-OWISPSLH.js.map → chunk-XXL62KSJ.js.map} +0 -0
|
@@ -572,6 +572,7 @@ Details: ${res.stderr}` : ""}`
|
|
|
572
572
|
// tools/warp_grep/anthropic.ts
|
|
573
573
|
var anthropic_exports = {};
|
|
574
574
|
__export(anthropic_exports, {
|
|
575
|
+
createGitHubReadFileTool: () => createGitHubReadFileTool,
|
|
575
576
|
createGitHubSearchTool: () => createGitHubSearchTool,
|
|
576
577
|
createWarpGrepTool: () => createWarpGrepTool,
|
|
577
578
|
execute: () => execute,
|
|
@@ -1378,7 +1379,7 @@ var import_openai = __toESM(require("openai"), 1);
|
|
|
1378
1379
|
// package.json
|
|
1379
1380
|
var package_default = {
|
|
1380
1381
|
name: "@morphllm/morphsdk",
|
|
1381
|
-
version: "0.2.
|
|
1382
|
+
version: "0.2.123",
|
|
1382
1383
|
description: "TypeScript SDK and CLI for Morph Fast Apply integration",
|
|
1383
1384
|
type: "module",
|
|
1384
1385
|
main: "./dist/index.cjs",
|
|
@@ -1628,9 +1629,9 @@ async function callModel(messages, model, options = {}) {
|
|
|
1628
1629
|
});
|
|
1629
1630
|
} catch (error) {
|
|
1630
1631
|
if (error instanceof import_openai.default.APIError && error.status === 404) {
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
);
|
|
1632
|
+
const defaultMsg = "The endpoint you are trying to call is likely deprecated. Please update with: npm cache clean --force && npx -y @morphllm/morphmcp@latest or visit: https://morphllm.com/mcp";
|
|
1633
|
+
const errorText = error.message?.trim();
|
|
1634
|
+
throw new Error(errorText || defaultMsg);
|
|
1634
1635
|
}
|
|
1635
1636
|
throw error;
|
|
1636
1637
|
}
|
|
@@ -2236,6 +2237,23 @@ var WarpGrepClient = class {
|
|
|
2236
2237
|
}
|
|
2237
2238
|
return this._searchGitHubAsync(input);
|
|
2238
2239
|
}
|
|
2240
|
+
/**
|
|
2241
|
+
* Read a single file from a public GitHub repository
|
|
2242
|
+
*
|
|
2243
|
+
* @example
|
|
2244
|
+
* ```typescript
|
|
2245
|
+
* const result = await client.readGitHubFile({
|
|
2246
|
+
* github: 'vercel/next.js',
|
|
2247
|
+
* path: 'src/server/app-render/index.tsx',
|
|
2248
|
+
* startLine: 1,
|
|
2249
|
+
* endLine: 50,
|
|
2250
|
+
* });
|
|
2251
|
+
* if (result.success) console.log(result.content);
|
|
2252
|
+
* ```
|
|
2253
|
+
*/
|
|
2254
|
+
async readGitHubFile(input) {
|
|
2255
|
+
return executeGitHubReadFile(input, { timeout: this.config.timeout });
|
|
2256
|
+
}
|
|
2239
2257
|
async _resolveGitHubRepo(input) {
|
|
2240
2258
|
const { owner, repo } = parseGitHubUrl(input.github);
|
|
2241
2259
|
const baseUrl = this.config.codeSearchUrl || DEFAULT_CODE_SEARCH_URL;
|
|
@@ -2356,6 +2374,65 @@ async function* executeToolCallStreaming(input, config) {
|
|
|
2356
2374
|
}
|
|
2357
2375
|
return processAgentResult(agentResult);
|
|
2358
2376
|
}
|
|
2377
|
+
async function fetchRawGitHubFile(owner, repo, filePath, branch, timeout) {
|
|
2378
|
+
const branches = branch ? [branch] : ["HEAD"];
|
|
2379
|
+
const fallbacks = ["main", "master", "develop"];
|
|
2380
|
+
const fetchWithTimeout = (url) => timeout ? fetch(url, { signal: AbortSignal.timeout(timeout) }) : fetch(url);
|
|
2381
|
+
for (const b of branches) {
|
|
2382
|
+
const url = `https://raw.githubusercontent.com/${owner}/${repo}/${b}/${filePath}`;
|
|
2383
|
+
const res = await fetchWithTimeout(url);
|
|
2384
|
+
if (res.ok) return { content: await res.text(), branch: b };
|
|
2385
|
+
}
|
|
2386
|
+
for (const fb of fallbacks) {
|
|
2387
|
+
if (branch && fb === branch) continue;
|
|
2388
|
+
const url = `https://raw.githubusercontent.com/${owner}/${repo}/${fb}/${filePath}`;
|
|
2389
|
+
const res = await fetchWithTimeout(url);
|
|
2390
|
+
if (res.ok) return { content: await res.text(), branch: fb };
|
|
2391
|
+
}
|
|
2392
|
+
throw new Error(`File not found: ${owner}/${repo}/${filePath}`);
|
|
2393
|
+
}
|
|
2394
|
+
async function executeGitHubReadFile(input, config) {
|
|
2395
|
+
try {
|
|
2396
|
+
const { owner, repo } = parseGitHubUrl(input.github);
|
|
2397
|
+
const { content: raw, branch } = await fetchRawGitHubFile(
|
|
2398
|
+
owner,
|
|
2399
|
+
repo,
|
|
2400
|
+
input.path,
|
|
2401
|
+
input.branch,
|
|
2402
|
+
config?.timeout
|
|
2403
|
+
);
|
|
2404
|
+
const allLines = raw.split("\n");
|
|
2405
|
+
const totalLines = allLines.length;
|
|
2406
|
+
const start = Math.max(1, input.startLine ?? 1);
|
|
2407
|
+
const end = Math.min(totalLines, input.endLine ?? totalLines);
|
|
2408
|
+
const selected = allLines.slice(start - 1, end);
|
|
2409
|
+
const padWidth = String(end).length;
|
|
2410
|
+
const numbered = selected.map((line, i) => `${String(start + i).padStart(padWidth)}|${line}`).join("\n");
|
|
2411
|
+
return {
|
|
2412
|
+
success: true,
|
|
2413
|
+
content: numbered,
|
|
2414
|
+
path: input.path,
|
|
2415
|
+
github: `${owner}/${repo}`,
|
|
2416
|
+
branch,
|
|
2417
|
+
lineRange: [start, end],
|
|
2418
|
+
totalLines
|
|
2419
|
+
};
|
|
2420
|
+
} catch (error) {
|
|
2421
|
+
return {
|
|
2422
|
+
success: false,
|
|
2423
|
+
error: error instanceof Error ? error.message : String(error)
|
|
2424
|
+
};
|
|
2425
|
+
}
|
|
2426
|
+
}
|
|
2427
|
+
function formatGitHubReadFileResult(result) {
|
|
2428
|
+
if (!result.success) {
|
|
2429
|
+
return `Failed to read file: ${result.error}`;
|
|
2430
|
+
}
|
|
2431
|
+
const rangeStr = result.lineRange ? ` (lines ${result.lineRange[0]}-${result.lineRange[1]} of ${result.totalLines})` : "";
|
|
2432
|
+
return `File: ${result.github}/${result.path}${rangeStr}
|
|
2433
|
+
|
|
2434
|
+
${result.content}`;
|
|
2435
|
+
}
|
|
2359
2436
|
function formatResult(result) {
|
|
2360
2437
|
if (!result.success) {
|
|
2361
2438
|
return `Search failed: ${result.error}`;
|
|
@@ -2384,17 +2461,33 @@ function formatResult(result) {
|
|
|
2384
2461
|
// tools/warp_grep/prompts.ts
|
|
2385
2462
|
var WARP_GREP_TOOL_NAME = "warpgrep_codebase_search";
|
|
2386
2463
|
var WARP_GREP_DESCRIPTION = 'IMPORTANT: If you need to explore the codebase to gather context, and the task does not involve a single file or function which is provided by name, you should ALWAYS use the warpgrep codebase search tool first instead of running search commands. When the task requires exploration beyond a single known file, invoke warpgrep first with a natural-language query describing the target functionality, bug, or architectural concern. Warp Grep is a fast and accurate tool that can search for all relevant context in a codebase. Keep queries action-oriented (e.g., "Find where billing invoices are generated and emailed"), and after reviewing the summarized results, you may verify important findings with other search tools or direct file reads to ensure completeness. Warp Grep can be used for query types like: find function responsible for <small feature>; find code that does <description>; find code path for <big feature>; Where does <minimal error message> come from?; or any query of that type. When a task requires exploration beyond a single known file, ALWAYS default to warpgrep codebase search before other search mechanisms.';
|
|
2387
|
-
var
|
|
2388
|
-
var
|
|
2389
|
-
var
|
|
2464
|
+
var GITHUB_WARP_GREP_SEARCH_TOOL_NAME = "warpgrep_github_search";
|
|
2465
|
+
var GITHUB_WARP_GREP_SEARCH_DESCRIPTION = 'IMPORTANT: If you need to explore the codebase of a public GitHub repository (not your local workspace), use warpgrep_github_search instead of warpgrep_codebase_search. When the task requires understanding code in an external repo, invoke warpgrep_github_search with a GitHub URL or owner/repo shorthand (e.g., vercel/next.js) and a natural-language query describing the target functionality, bug, or architectural concern. WarpGrep searches GitHub repos the same way it searches local codebases: fast and accurate. Keep queries action-oriented (e.g., "Find where how the new use workflow directive works"), and after reviewing the results, you may verify important findings with other tools or direct file reads. WarpGrep can be used for query types like: find function responsible for <small feature>; find code that does <description>; find code path for <big feature>; Where does <minimal error message> come from?; or any query of that type. When a task involves exploring code in an external public repo, ALWAYS use warpgrep_github_search.';
|
|
2466
|
+
var GITHUB_WARP_GREP_SEARCH_INPUT_SCHEMA = {
|
|
2390
2467
|
type: "object",
|
|
2391
2468
|
properties: {
|
|
2392
2469
|
query: { type: "string", description: "Natural language search query describing what to find in the repository" },
|
|
2393
|
-
github: { type: "string", description: '
|
|
2470
|
+
github: { type: "string", description: 'owner/repo shorthand (ex: "vercel/next.js" for "https://github.com/vercel/next.js")' },
|
|
2394
2471
|
branch: { type: "string", description: "Branch to search (defaults to the repository default branch)" }
|
|
2395
2472
|
},
|
|
2396
2473
|
required: ["query", "github"]
|
|
2397
2474
|
};
|
|
2475
|
+
var GITHUB_SEARCH_TOOL_NAME = GITHUB_WARP_GREP_SEARCH_TOOL_NAME;
|
|
2476
|
+
var GITHUB_SEARCH_DESCRIPTION = GITHUB_WARP_GREP_SEARCH_DESCRIPTION;
|
|
2477
|
+
var GITHUB_SEARCH_INPUT_SCHEMA = GITHUB_WARP_GREP_SEARCH_INPUT_SCHEMA;
|
|
2478
|
+
var GITHUB_READ_FILE_TOOL_NAME = "readfile_github_search";
|
|
2479
|
+
var GITHUB_READ_FILE_DESCRIPTION = "Read a single file (or a line range) from a public GitHub repository. Use this when you already know the exact file path you want to read, for example after finding it via warpgrep_github_search results. Takes owner/repo shorthand and the file path within the repo. Optionally specify startLine and endLine (1-based) to read a specific range. Returns the file content with line numbers.";
|
|
2480
|
+
var GITHUB_READ_FILE_INPUT_SCHEMA = {
|
|
2481
|
+
type: "object",
|
|
2482
|
+
properties: {
|
|
2483
|
+
github: { type: "string", description: 'owner/repo shorthand (e.g., "vercel/next.js")' },
|
|
2484
|
+
path: { type: "string", description: 'File path within the repository (e.g., "src/server/index.ts")' },
|
|
2485
|
+
startLine: { type: "number", description: "Start line number (1-based). Omit to start from beginning." },
|
|
2486
|
+
endLine: { type: "number", description: "End line number (1-based, inclusive). Omit to read to the end." },
|
|
2487
|
+
branch: { type: "string", description: "Branch to read from (defaults to the repository default branch)" }
|
|
2488
|
+
},
|
|
2489
|
+
required: ["github", "path"]
|
|
2490
|
+
};
|
|
2398
2491
|
|
|
2399
2492
|
// tools/warp_grep/anthropic.ts
|
|
2400
2493
|
var INPUT_SCHEMA = {
|
|
@@ -2449,8 +2542,24 @@ function createGitHubSearchTool(config) {
|
|
|
2449
2542
|
}
|
|
2450
2543
|
});
|
|
2451
2544
|
}
|
|
2545
|
+
function createGitHubReadFileTool(config) {
|
|
2546
|
+
const tool = {
|
|
2547
|
+
name: GITHUB_READ_FILE_TOOL_NAME,
|
|
2548
|
+
description: GITHUB_READ_FILE_DESCRIPTION,
|
|
2549
|
+
input_schema: GITHUB_READ_FILE_INPUT_SCHEMA
|
|
2550
|
+
};
|
|
2551
|
+
return Object.assign(tool, {
|
|
2552
|
+
execute: async (input) => {
|
|
2553
|
+
return executeGitHubReadFile(input, config);
|
|
2554
|
+
},
|
|
2555
|
+
formatResult: (result) => {
|
|
2556
|
+
return formatGitHubReadFileResult(result);
|
|
2557
|
+
}
|
|
2558
|
+
});
|
|
2559
|
+
}
|
|
2452
2560
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2453
2561
|
0 && (module.exports = {
|
|
2562
|
+
createGitHubReadFileTool,
|
|
2454
2563
|
createGitHubSearchTool,
|
|
2455
2564
|
createWarpGrepTool,
|
|
2456
2565
|
execute,
|