@morphllm/morphsdk 0.2.148 → 0.2.150
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-IL7OLRJP.js → chunk-23EB2N66.js} +2 -2
- package/dist/{chunk-H6TH3F4V.js → chunk-3UL7BVDI.js} +2 -2
- package/dist/{chunk-EGUJNHMV.js → chunk-4RYUAMA5.js} +2 -2
- package/dist/{chunk-F6OUFO25.js → chunk-4WZPGIRU.js} +2 -2
- package/dist/{chunk-6MVJ5J6H.js → chunk-63GEUXAG.js} +17 -17
- package/dist/{chunk-7PZKCKIH.js → chunk-6TUOW6R4.js} +3 -3
- package/dist/{chunk-4FLNLA2D.js → chunk-72Q3QRXJ.js} +2 -2
- package/dist/{chunk-OBXWT7NJ.js → chunk-7EQOAK6V.js} +4 -4
- package/dist/chunk-7EQOAK6V.js.map +1 -0
- package/dist/{chunk-4K36ATXI.js → chunk-FFBKJYME.js} +2 -2
- package/dist/{chunk-DMYFFSLS.js → chunk-FVMQTLGC.js} +2 -2
- package/dist/{chunk-YWJHOYEM.js → chunk-GAPZBV4P.js} +2 -2
- package/dist/{chunk-OHYA6SUF.js → chunk-GINC6ZQJ.js} +2 -2
- package/dist/{chunk-4ZA4INTU.js → chunk-HFTF2NON.js} +2 -2
- package/dist/{chunk-RH2JB76E.js → chunk-HSR3SQNH.js} +2 -2
- package/dist/{chunk-ELU34VFH.js → chunk-HXTGDRE4.js} +2 -2
- package/dist/{chunk-TSUTRT4Q.js → chunk-K2ATEMGS.js} +2 -2
- package/dist/{chunk-44WJK4MN.js → chunk-KCDIVAVA.js} +2 -2
- package/dist/{chunk-44WJK4MN.js.map → chunk-KCDIVAVA.js.map} +1 -1
- package/dist/{chunk-N67TYW2Z.js → chunk-KYTJEG7F.js} +6 -7
- package/dist/chunk-KYTJEG7F.js.map +1 -0
- package/dist/{chunk-E5K4VHMA.js → chunk-LJX5QBDP.js} +2 -2
- package/dist/{chunk-5R5FVUAL.js → chunk-MUWQA4QI.js} +1 -1
- package/dist/{chunk-SID7EXWK.js → chunk-NFK7BUMT.js} +2 -2
- package/dist/{chunk-TVUYMM4J.js → chunk-O3DGRBQ3.js} +2 -2
- package/dist/{chunk-LJM3R7UZ.js → chunk-T4SKN6IN.js} +2 -2
- package/dist/{chunk-T7HF2TDQ.js → chunk-VNAGVCSP.js} +3 -3
- package/dist/chunk-VNAGVCSP.js.map +1 -0
- package/dist/{chunk-33CVSDM6.js → chunk-X6OZX6KV.js} +2 -2
- package/dist/{chunk-XT7JQAXV.js → chunk-ZKQI7KGZ.js} +2 -2
- package/dist/client.cjs +8 -9
- package/dist/client.cjs.map +1 -1
- package/dist/client.js +23 -23
- package/dist/edge.cjs +1 -1
- package/dist/edge.cjs.map +1 -1
- package/dist/edge.js +4 -4
- package/dist/index.cjs +8 -9
- package/dist/index.cjs.map +1 -1
- 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/subagents/anthropic.cjs +8 -9
- package/dist/subagents/anthropic.cjs.map +1 -1
- package/dist/subagents/anthropic.js +5 -5
- package/dist/subagents/vercel.cjs +8 -9
- package/dist/subagents/vercel.cjs.map +1 -1
- package/dist/subagents/vercel.js +5 -5
- 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 +3 -3
- package/dist/tools/warp_grep/anthropic.cjs +8 -9
- package/dist/tools/warp_grep/anthropic.cjs.map +1 -1
- package/dist/tools/warp_grep/anthropic.js +5 -5
- package/dist/tools/warp_grep/client.cjs +8 -9
- package/dist/tools/warp_grep/client.cjs.map +1 -1
- package/dist/tools/warp_grep/client.js +4 -4
- package/dist/tools/warp_grep/gemini.cjs +8 -9
- package/dist/tools/warp_grep/gemini.cjs.map +1 -1
- package/dist/tools/warp_grep/gemini.js +4 -4
- package/dist/tools/warp_grep/harness.cjs +2 -2
- package/dist/tools/warp_grep/harness.cjs.map +1 -1
- package/dist/tools/warp_grep/harness.js +1 -1
- package/dist/tools/warp_grep/index.cjs +8 -9
- package/dist/tools/warp_grep/index.cjs.map +1 -1
- package/dist/tools/warp_grep/index.js +4 -4
- package/dist/tools/warp_grep/openai.cjs +8 -9
- package/dist/tools/warp_grep/openai.cjs.map +1 -1
- package/dist/tools/warp_grep/openai.js +5 -5
- package/dist/tools/warp_grep/vercel.cjs +8 -9
- package/dist/tools/warp_grep/vercel.cjs.map +1 -1
- package/dist/tools/warp_grep/vercel.js +5 -5
- 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-N67TYW2Z.js.map +0 -1
- package/dist/chunk-OBXWT7NJ.js.map +0 -1
- package/dist/chunk-T7HF2TDQ.js.map +0 -1
- /package/dist/{chunk-IL7OLRJP.js.map → chunk-23EB2N66.js.map} +0 -0
- /package/dist/{chunk-H6TH3F4V.js.map → chunk-3UL7BVDI.js.map} +0 -0
- /package/dist/{chunk-EGUJNHMV.js.map → chunk-4RYUAMA5.js.map} +0 -0
- /package/dist/{chunk-F6OUFO25.js.map → chunk-4WZPGIRU.js.map} +0 -0
- /package/dist/{chunk-6MVJ5J6H.js.map → chunk-63GEUXAG.js.map} +0 -0
- /package/dist/{chunk-7PZKCKIH.js.map → chunk-6TUOW6R4.js.map} +0 -0
- /package/dist/{chunk-4FLNLA2D.js.map → chunk-72Q3QRXJ.js.map} +0 -0
- /package/dist/{chunk-4K36ATXI.js.map → chunk-FFBKJYME.js.map} +0 -0
- /package/dist/{chunk-DMYFFSLS.js.map → chunk-FVMQTLGC.js.map} +0 -0
- /package/dist/{chunk-YWJHOYEM.js.map → chunk-GAPZBV4P.js.map} +0 -0
- /package/dist/{chunk-OHYA6SUF.js.map → chunk-GINC6ZQJ.js.map} +0 -0
- /package/dist/{chunk-4ZA4INTU.js.map → chunk-HFTF2NON.js.map} +0 -0
- /package/dist/{chunk-RH2JB76E.js.map → chunk-HSR3SQNH.js.map} +0 -0
- /package/dist/{chunk-ELU34VFH.js.map → chunk-HXTGDRE4.js.map} +0 -0
- /package/dist/{chunk-TSUTRT4Q.js.map → chunk-K2ATEMGS.js.map} +0 -0
- /package/dist/{chunk-E5K4VHMA.js.map → chunk-LJX5QBDP.js.map} +0 -0
- /package/dist/{chunk-5R5FVUAL.js.map → chunk-MUWQA4QI.js.map} +0 -0
- /package/dist/{chunk-SID7EXWK.js.map → chunk-NFK7BUMT.js.map} +0 -0
- /package/dist/{chunk-TVUYMM4J.js.map → chunk-O3DGRBQ3.js.map} +0 -0
- /package/dist/{chunk-LJM3R7UZ.js.map → chunk-T4SKN6IN.js.map} +0 -0
- /package/dist/{chunk-33CVSDM6.js.map → chunk-X6OZX6KV.js.map} +0 -0
- /package/dist/{chunk-XT7JQAXV.js.map → chunk-ZKQI7KGZ.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetchWithRetry,
|
|
3
3
|
withTimeout
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LJX5QBDP.js";
|
|
5
5
|
|
|
6
6
|
// modelrouter/core.ts
|
|
7
7
|
var DEFAULT_CONFIG = {
|
|
@@ -209,4 +209,4 @@ export {
|
|
|
209
209
|
GeminiRouter,
|
|
210
210
|
RawRouter
|
|
211
211
|
};
|
|
212
|
-
//# sourceMappingURL=chunk-
|
|
212
|
+
//# sourceMappingURL=chunk-NFK7BUMT.js.map
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
executeToolCall,
|
|
15
15
|
formatGitHubReadFileResult,
|
|
16
16
|
formatResult
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KYTJEG7F.js";
|
|
18
18
|
|
|
19
19
|
// tools/warp_grep/anthropic.ts
|
|
20
20
|
var INPUT_SCHEMA = {
|
|
@@ -90,4 +90,4 @@ export {
|
|
|
90
90
|
createGitHubSearchTool,
|
|
91
91
|
createGitHubReadFileTool
|
|
92
92
|
};
|
|
93
|
-
//# sourceMappingURL=chunk-
|
|
93
|
+
//# sourceMappingURL=chunk-O3DGRBQ3.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
executeCodebaseSearch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HSR3SQNH.js";
|
|
4
4
|
import {
|
|
5
5
|
CODEBASE_SEARCH_DESCRIPTION,
|
|
6
6
|
CODEBASE_SEARCH_SYSTEM_PROMPT
|
|
@@ -80,4 +80,4 @@ function formatResult(result) {
|
|
|
80
80
|
export {
|
|
81
81
|
createCodebaseSearchTool
|
|
82
82
|
};
|
|
83
|
-
//# sourceMappingURL=chunk-
|
|
83
|
+
//# sourceMappingURL=chunk-T4SKN6IN.js.map
|
|
@@ -62,7 +62,7 @@ async function toolListDirectory(provider, args, repoRoot) {
|
|
|
62
62
|
});
|
|
63
63
|
if (!entries.length) return "empty";
|
|
64
64
|
if (repoRoot) {
|
|
65
|
-
const absRoot =
|
|
65
|
+
const absRoot = repoRoot;
|
|
66
66
|
const lines = entries.map((e) => path.join(absRoot, e.path));
|
|
67
67
|
return lines.join("\n");
|
|
68
68
|
}
|
|
@@ -189,7 +189,7 @@ async function buildInitialState(repoRoot, searchTerm, provider, options) {
|
|
|
189
189
|
const budget = calculateContextBudget([]);
|
|
190
190
|
const turnTag = `You have used 0 turns and have ${AGENT_CONFIG.MAX_TURNS} remaining`;
|
|
191
191
|
const treeDepth = options?.search_type === "node_modules" ? 1 : 2;
|
|
192
|
-
const absRoot =
|
|
192
|
+
const absRoot = repoRoot;
|
|
193
193
|
try {
|
|
194
194
|
const entries = await provider.listDirectory({
|
|
195
195
|
path: ".",
|
|
@@ -275,4 +275,4 @@ export {
|
|
|
275
275
|
formatListDirectoryTree,
|
|
276
276
|
enforceContextLimit
|
|
277
277
|
};
|
|
278
|
-
//# sourceMappingURL=chunk-
|
|
278
|
+
//# sourceMappingURL=chunk-VNAGVCSP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../tools/warp_grep/agent/tools/grep.ts","../tools/warp_grep/agent/tools/read.ts","../tools/warp_grep/agent/tools/list_directory.ts","../tools/warp_grep/agent/tools/glob.ts","../tools/warp_grep/agent/tools/finish.ts","../tools/warp_grep/agent/helpers.ts"],"sourcesContent":["import type { WarpGrepProvider } from '../../providers/types.js';\n\nexport async function toolGrep(\n provider: WarpGrepProvider,\n args: { pattern: string; path: string; glob?: string; context_lines?: number; case_sensitive?: boolean }\n): Promise<{ output: string }> {\n const res = await provider.grep(args);\n \n // Return errors as output - let the model see and handle them\n if (res.error) {\n return { output: res.error };\n }\n \n if (!res.lines.length) {\n return { output: 'no matches' };\n }\n \n return { output: res.lines.join('\\n') };\n}\n\n","import type { WarpGrepProvider } from '../../providers/types.js';\n\nfunction isValidRange(start: unknown, end: unknown): boolean {\n return (\n typeof start === 'number' &&\n typeof end === 'number' &&\n Number.isFinite(start) &&\n Number.isFinite(end) &&\n start > 0 &&\n end >= start\n );\n}\n\nexport async function toolRead(\n provider: WarpGrepProvider,\n args: { path: string; start?: number; end?: number; lines?: Array<[number, number]> }\n): Promise<string> {\n if (args.lines && Array.isArray(args.lines) && args.lines.length > 0) {\n const validRanges: Array<[number, number]> = [];\n for (const range of args.lines) {\n if (Array.isArray(range) && range.length >= 2 && isValidRange(range[0], range[1])) {\n validRanges.push([range[0], range[1]]);\n }\n }\n \n if (validRanges.length === 0) {\n const res = await provider.read({ path: args.path });\n if (res.error) return res.error;\n if (!res.lines.length) return '(empty file)';\n return res.lines.join('\\n');\n }\n \n const chunks: string[] = [];\n for (const [start, end] of validRanges) {\n const res = await provider.read({ path: args.path, start, end });\n if (res.error) return res.error;\n chunks.push(res.lines.join('\\n'));\n }\n if (chunks.every(c => c === '')) return '(empty file)';\n return chunks.join('\\n...\\n');\n }\n\n const res = await provider.read({ path: args.path, start: args.start, end: args.end });\n if (res.error) {\n return res.error;\n }\n if (!res.lines.length) return '(empty file)';\n return res.lines.join('\\n');\n}\n\n","import type { WarpGrepProvider } from '../../providers/types.js';\nimport { AGENT_CONFIG } from '../config.js';\nimport path from 'path';\n\nexport async function toolListDirectory(\n provider: WarpGrepProvider,\n args: { path: string; pattern?: string | null; maxResults?: number; maxDepth?: number },\n repoRoot?: string,\n): Promise<string> {\n\n const maxResults = args.maxResults ?? AGENT_CONFIG.MAX_LIST_RESULTS;\n const maxDepth = args.maxDepth ?? AGENT_CONFIG.MAX_LIST_DEPTH;\n\n const entries = await provider.listDirectory({\n path: args.path,\n pattern: args.pattern ?? null,\n maxResults,\n maxDepth,\n });\n\n if (!entries.length) return 'empty';\n\n // Flat absolute paths (matches training format)\n // If repoRoot is available, convert relative paths to absolute\n if (repoRoot) {\n const absRoot = repoRoot;\n const lines = entries.map(e => path.join(absRoot, e.path));\n return lines.join('\\n');\n }\n\n // Fallback: return relative paths if repoRoot not available\n return entries.map(e => e.path).join('\\n');\n}\n","import type { WarpGrepProvider } from '../../providers/types.js';\n\nexport async function toolGlob(\n provider: WarpGrepProvider,\n args: { pattern: string; path?: string }\n): Promise<string> {\n const res = await provider.glob(args);\n\n if (res.error) {\n return res.error;\n }\n\n if (!res.files.length) {\n return 'no matches';\n }\n\n // Match training output format exactly\n const header = `Found ${res.totalFound} file(s) matching \"${args.pattern}\" within ${res.searchDir}, sorted by modification time (newest first):`;\n const body = res.files.join('\\n');\n const truncated = res.totalFound > res.files.length\n ? `\\n[${res.totalFound - res.files.length} files truncated]`\n : '';\n return `${header}\\n---\\n${body}\\n---${truncated}`;\n}\n","import type { FinishFileSpec } from '../types.js';\n\nfunction isValidRange(range: unknown): range is [number, number] {\n return (\n Array.isArray(range) &&\n range.length >= 2 &&\n typeof range[0] === 'number' &&\n typeof range[1] === 'number' &&\n Number.isFinite(range[0]) &&\n Number.isFinite(range[1]) &&\n range[0] > 0 &&\n range[1] >= range[0]\n );\n}\n\nfunction extractValidRanges(lines: unknown): Array<[number, number]> | null {\n if (!Array.isArray(lines)) return null;\n const valid: Array<[number, number]> = [];\n for (const range of lines) {\n if (isValidRange(range)) {\n valid.push([range[0], range[1]]);\n }\n }\n return valid.length > 0 ? valid : null;\n}\n\nexport function normalizeFinishFiles(files: FinishFileSpec[]): FinishFileSpec[] {\n return files.map((f) => {\n if (f.lines === '*') return { path: f.path, lines: '*' };\n const validRanges = extractValidRanges(f.lines);\n if (!validRanges) return { path: f.path, lines: '*' };\n return { path: f.path, lines: mergeRanges(validRanges) };\n });\n}\n\nexport async function readFinishFiles(\n repoRoot: string,\n files: FinishFileSpec[],\n reader: (path: string, start?: number, end?: number) => Promise<string[]>\n): Promise<{ path: string; ranges: '*' | Array<[number, number]>; content: string }[]> {\n const out: { path: string; ranges: '*' | Array<[number, number]>; content: string }[] = [];\n for (const f of files) {\n const validRanges = f.lines === '*' ? null : extractValidRanges(f.lines);\n if (f.lines === '*' || !validRanges) {\n const lines = await reader(f.path);\n out.push({ path: f.path, ranges: '*', content: lines.join('\\n') });\n } else {\n const ranges = mergeRanges(validRanges);\n const chunks: string[] = [];\n for (let i = 0; i < ranges.length; i++) {\n const [s, e] = ranges[i];\n if (i === 0 && s > 1) {\n chunks.push(`// ... existing code, block starting at line ${s} ...`);\n } else if (i > 0) {\n chunks.push(`// ... existing code, block starting at line ${s} ...`);\n }\n const lines = await reader(f.path, s, e);\n chunks.push(lines.join('\\n'));\n }\n out.push({ path: f.path, ranges, content: chunks.join('\\n') });\n }\n }\n return out;\n}\n\nfunction mergeRanges(ranges: Array<[number, number]>): Array<[number, number]> {\n if (!ranges.length) return [];\n const sorted = [...ranges].sort((a, b) => a[0] - b[0]);\n const merged: Array<[number, number]> = [];\n let [cs, ce] = sorted[0];\n for (let i = 1; i < sorted.length; i++) {\n const [s, e] = sorted[i];\n if (s <= ce + 1) {\n ce = Math.max(ce, e);\n } else {\n merged.push([cs, ce]);\n cs = s;\n ce = e;\n }\n }\n merged.push([cs, ce]);\n return merged;\n}\n\n","/**\n * Shared helper functions for warp-grep agent loop.\n * Used by both the internal runner and exported for harness users.\n */\n\nimport path from 'path';\nimport { AGENT_CONFIG } from './config.js';\nimport type { ChatMessage } from './types.js';\nimport type { WarpGrepProvider, ListDirectoryEntry } from '../providers/types.js';\n\nconst TRUNCATED_MARKER = '[truncated for context limit]';\n\n/**\n * Get the character size of a ChatMessage (handles all message types).\n */\nfunction getMessageSize(m: ChatMessage): number {\n if (m.role === 'tool') return m.content.length;\n if (m.role === 'assistant') {\n let size = typeof m.content === 'string' ? m.content.length : 0;\n if (m.tool_calls) {\n size += m.tool_calls.reduce((s, tc) => s + tc.function.name.length + tc.function.arguments.length, 0);\n }\n return size;\n }\n // system or user\n return (m as { content: string }).content.length;\n}\n\n/**\n * Format the turn counter message shown to the model.\n */\nexport function formatTurnMessage(turnsUsed: number, maxTurns: number): string {\n const turnsRemaining = maxTurns - turnsUsed;\n if (turnsRemaining === 1) {\n return `\\nYou have used ${turnsUsed} turns, you only have 1 turn remaining. You have run out of turns to explore the code base and MUST call the finish tool now`;\n }\n return `\\nYou have used ${turnsUsed} turn${turnsUsed === 1 ? '' : 's'} and have ${turnsRemaining} remaining`;\n}\n\n/**\n * Calculate and format the context budget indicator.\n */\nexport function calculateContextBudget(messages: ChatMessage[]): string {\n const totalChars = messages.reduce((sum, m) => sum + getMessageSize(m), 0);\n const maxChars = AGENT_CONFIG.MAX_CONTEXT_CHARS;\n const percent = Math.floor((totalChars / maxChars) * 100);\n const usedK = Math.floor(totalChars / 1000);\n const maxK = Math.floor(maxChars / 1000);\n return `<context_budget>${percent}% (${usedK}K/${maxK}K chars)</context_budget>`;\n}\n\n/**\n * Build the initial state message containing repo structure and search term.\n */\nexport async function buildInitialState(\n repoRoot: string,\n searchTerm: string,\n provider: WarpGrepProvider,\n options?: { search_type?: string },\n): Promise<string> {\n const budget = calculateContextBudget([]);\n const turnTag = `You have used 0 turns and have ${AGENT_CONFIG.MAX_TURNS} remaining`;\n const treeDepth = options?.search_type === 'node_modules' ? 1 : 2;\n\n const absRoot = repoRoot;\n\n try {\n const entries = await provider.listDirectory({\n path: '.',\n maxResults: AGENT_CONFIG.MAX_OUTPUT_LINES,\n maxDepth: treeDepth,\n });\n\n // Flat list of absolute paths (matches training format)\n // First line is the repo root, then one absolute path per entry\n const lines = [absRoot];\n for (const e of entries) {\n lines.push(path.join(absRoot, e.path));\n }\n\n return `<repo_structure>\\n${lines.join('\\n')}\\n</repo_structure>\\n\\n<search_string>\\n${searchTerm}\\n</search_string>\\n${budget}\\n${turnTag}`;\n } catch {\n return `<repo_structure>\\n${absRoot}\\n</repo_structure>\\n\\n<search_string>\\n${searchTerm}\\n</search_string>\\n${budget}\\n${turnTag}`;\n }\n}\n\n/**\n * Format directory entries as an indented tree string.\n */\nexport function formatListDirectoryTree(entries: ListDirectoryEntry[]): string {\n if (!entries.length) return 'empty';\n return entries\n .map((e) => {\n const indent = ' '.repeat(e.depth);\n const name = e.type === 'dir' ? `${e.name}/` : e.name;\n return `${indent}${name}`;\n })\n .join('\\n');\n}\n\n/**\n * Enforce hard context limit by truncating tool result messages.\n * Preserves the first user message (initial query) and all assistant messages.\n * Truncates tool/user messages from oldest to newest until under the threshold.\n *\n * @param messages - The conversation messages array (mutated in place)\n * @param maxChars - Maximum total character count (defaults to AGENT_CONFIG.MAX_CONTEXT_CHARS)\n * @returns The same messages array, truncated if necessary\n */\nexport function enforceContextLimit(\n messages: ChatMessage[],\n maxChars: number = AGENT_CONFIG.MAX_CONTEXT_CHARS\n): ChatMessage[] {\n const getTotalChars = () => messages.reduce((sum, m) => sum + getMessageSize(m), 0);\n\n if (getTotalChars() <= maxChars) {\n return messages;\n }\n\n // Find indices of truncatable messages (tool results and non-first user messages)\n const truncatableIndices: number[] = [];\n let firstUserSkipped = false;\n for (let i = 0; i < messages.length; i++) {\n const m = messages[i];\n if (m.role === 'tool') {\n truncatableIndices.push(i);\n } else if (m.role === 'user') {\n if (!firstUserSkipped) {\n firstUserSkipped = true;\n continue; // Skip first user message (contains the search query)\n }\n truncatableIndices.push(i);\n }\n }\n\n // Truncate from oldest to newest until under limit\n for (const idx of truncatableIndices) {\n if (getTotalChars() <= maxChars) {\n break;\n }\n const m = messages[idx];\n if (m.role === 'tool' && m.content !== TRUNCATED_MARKER) {\n messages[idx] = { role: 'tool', tool_call_id: m.tool_call_id, content: TRUNCATED_MARKER };\n } else if (m.role === 'user' && (m as { content: string }).content !== TRUNCATED_MARKER) {\n messages[idx] = { role: 'user', content: TRUNCATED_MARKER };\n }\n }\n\n return messages;\n}\n"],"mappings":";;;;;AAEA,eAAsB,SACpB,UACA,MAC6B;AAC7B,QAAM,MAAM,MAAM,SAAS,KAAK,IAAI;AAGpC,MAAI,IAAI,OAAO;AACb,WAAO,EAAE,QAAQ,IAAI,MAAM;AAAA,EA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,SAAS,GAAG;AACtB,QAAI,EAAE,SAAS,UAAU,EAAE,YAAY,kBAAkB;AACvD,eAAS,GAAG,IAAI,EAAE,MAAM,QAAQ,cAAc,EAAE,cAAc,SAAS,iBAAiB;AAAA,IAC1F,WAAW,EAAE,SAAS,UAAW,EAA0B,YAAY,kBAAkB;AACvF,eAAS,GAAG,IAAI,EAAE,MAAM,QAAQ,SAAS,iBAAiB;AAAA,IAC5D;AAAA,EACF;AAEA,SAAO;AACT;","names":["res","isValidRange","path","path"]}
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
executeGitHubReadFile,
|
|
9
9
|
executeToolCall,
|
|
10
10
|
executeToolCallStreaming
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-KYTJEG7F.js";
|
|
12
12
|
|
|
13
13
|
// tools/warp_grep/vercel.ts
|
|
14
14
|
import { tool } from "ai";
|
|
@@ -115,4 +115,4 @@ export {
|
|
|
115
115
|
createGitHubReadFileTool,
|
|
116
116
|
vercel_default
|
|
117
117
|
};
|
|
118
|
-
//# sourceMappingURL=chunk-
|
|
118
|
+
//# sourceMappingURL=chunk-X6OZX6KV.js.map
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
executeToolCall,
|
|
15
15
|
formatGitHubReadFileResult,
|
|
16
16
|
formatResult
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KYTJEG7F.js";
|
|
18
18
|
|
|
19
19
|
// tools/warp_grep/openai.ts
|
|
20
20
|
var TOOL_PARAMETERS = {
|
|
@@ -104,4 +104,4 @@ export {
|
|
|
104
104
|
createGitHubReadFileTool,
|
|
105
105
|
openai_default
|
|
106
106
|
};
|
|
107
|
-
//# sourceMappingURL=chunk-
|
|
107
|
+
//# sourceMappingURL=chunk-ZKQI7KGZ.js.map
|
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.150",
|
|
40
40
|
description: "TypeScript SDK and CLI for Morph Fast Apply integration",
|
|
41
41
|
type: "module",
|
|
42
42
|
main: "./dist/index.cjs",
|
|
@@ -2648,7 +2648,7 @@ async function toolListDirectory(provider, args, repoRoot) {
|
|
|
2648
2648
|
});
|
|
2649
2649
|
if (!entries.length) return "empty";
|
|
2650
2650
|
if (repoRoot) {
|
|
2651
|
-
const absRoot =
|
|
2651
|
+
const absRoot = repoRoot;
|
|
2652
2652
|
const lines = entries.map((e) => import_path2.default.join(absRoot, e.path));
|
|
2653
2653
|
return lines.join("\n");
|
|
2654
2654
|
}
|
|
@@ -2768,7 +2768,7 @@ async function buildInitialState(repoRoot, searchTerm, provider, options) {
|
|
|
2768
2768
|
const budget = calculateContextBudget([]);
|
|
2769
2769
|
const turnTag = `You have used 0 turns and have ${AGENT_CONFIG.MAX_TURNS} remaining`;
|
|
2770
2770
|
const treeDepth = options?.search_type === "node_modules" ? 1 : 2;
|
|
2771
|
-
const absRoot =
|
|
2771
|
+
const absRoot = repoRoot;
|
|
2772
2772
|
try {
|
|
2773
2773
|
const entries = await provider.listDirectory({
|
|
2774
2774
|
path: ".",
|
|
@@ -3059,7 +3059,7 @@ async function* runWarpGrepStreaming(config) {
|
|
|
3059
3059
|
const totalStart = Date.now();
|
|
3060
3060
|
const timeoutMs = config.timeout ?? AGENT_CONFIG.TIMEOUT_MS;
|
|
3061
3061
|
const timings = { turns: [], timeout_ms: timeoutMs };
|
|
3062
|
-
const repoRoot =
|
|
3062
|
+
const repoRoot = config.repoRoot || process.cwd();
|
|
3063
3063
|
const model = config.model || DEFAULT_MODEL;
|
|
3064
3064
|
const messages = [];
|
|
3065
3065
|
const maxTurns = AGENT_CONFIG.MAX_TURNS;
|
|
@@ -3533,10 +3533,10 @@ var WarpGrepClient = class {
|
|
|
3533
3533
|
}
|
|
3534
3534
|
async _searchGitHubAsync(input) {
|
|
3535
3535
|
try {
|
|
3536
|
-
const {
|
|
3536
|
+
const { remoteCommands } = await this._resolveGitHubRepo(input);
|
|
3537
3537
|
return this.execute({
|
|
3538
3538
|
searchTerm: input.searchTerm,
|
|
3539
|
-
repoRoot:
|
|
3539
|
+
repoRoot: ".",
|
|
3540
3540
|
remoteCommands
|
|
3541
3541
|
});
|
|
3542
3542
|
} catch (error) {
|
|
@@ -3544,16 +3544,15 @@ var WarpGrepClient = class {
|
|
|
3544
3544
|
}
|
|
3545
3545
|
}
|
|
3546
3546
|
async *_searchGitHubStreaming(input) {
|
|
3547
|
-
let repo;
|
|
3548
3547
|
let remoteCommands;
|
|
3549
3548
|
try {
|
|
3550
|
-
({
|
|
3549
|
+
({ remoteCommands } = await this._resolveGitHubRepo(input));
|
|
3551
3550
|
} catch (error) {
|
|
3552
3551
|
return { success: false, error: error instanceof Error ? error.message : String(error) };
|
|
3553
3552
|
}
|
|
3554
3553
|
const generator = this.execute({
|
|
3555
3554
|
searchTerm: input.searchTerm,
|
|
3556
|
-
repoRoot:
|
|
3555
|
+
repoRoot: ".",
|
|
3557
3556
|
remoteCommands,
|
|
3558
3557
|
streamSteps: true
|
|
3559
3558
|
});
|