@morphllm/morphsdk 0.2.83 → 0.2.85
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-HRK53IKL.js → chunk-37SJ3IOY.js} +63 -42
- package/dist/chunk-37SJ3IOY.js.map +1 -0
- package/dist/{chunk-S27A4NQM.js → chunk-5X7IJXKA.js} +2 -2
- package/dist/{chunk-RL4JBZ3T.js → chunk-AJEE5RRB.js} +2 -2
- package/dist/{chunk-QOYI77CN.js → chunk-HJOMBO2A.js} +154 -3
- package/dist/chunk-HJOMBO2A.js.map +1 -0
- package/dist/{chunk-LXG37353.js → chunk-IXNX4HMC.js} +2 -2
- package/dist/{chunk-P2O5JKE5.js → chunk-KRDIR7GG.js} +17 -8
- package/dist/chunk-KRDIR7GG.js.map +1 -0
- package/dist/{chunk-FY32COVL.js → chunk-L5C6E32T.js} +1 -1
- package/dist/{chunk-FY32COVL.js.map → chunk-L5C6E32T.js.map} +1 -1
- package/dist/{chunk-HPR6BJA7.js → chunk-SQF3OG24.js} +5 -5
- package/dist/{client-CsO9LifG.d.ts → client-Drz3OGq-.d.ts} +1 -1
- package/dist/client.cjs +220 -44
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.ts +3 -2
- package/dist/client.js +7 -7
- package/dist/index.cjs +220 -44
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +8 -8
- package/dist/tools/warp_grep/agent/runner.cjs +170 -9
- package/dist/tools/warp_grep/agent/runner.cjs.map +1 -1
- package/dist/tools/warp_grep/agent/runner.d.ts +9 -2
- package/dist/tools/warp_grep/agent/runner.js +6 -4
- package/dist/tools/warp_grep/agent/types.cjs.map +1 -1
- package/dist/tools/warp_grep/agent/types.d.ts +12 -1
- package/dist/tools/warp_grep/anthropic.cjs +16 -7
- package/dist/tools/warp_grep/anthropic.cjs.map +1 -1
- package/dist/tools/warp_grep/anthropic.d.ts +3 -2
- package/dist/tools/warp_grep/anthropic.js +4 -4
- package/dist/tools/warp_grep/client.cjs +225 -46
- package/dist/tools/warp_grep/client.cjs.map +1 -1
- package/dist/tools/warp_grep/client.d.ts +39 -6
- package/dist/tools/warp_grep/client.js +3 -3
- package/dist/tools/warp_grep/gemini.cjs +16 -7
- package/dist/tools/warp_grep/gemini.cjs.map +1 -1
- package/dist/tools/warp_grep/gemini.d.ts +3 -2
- package/dist/tools/warp_grep/gemini.js +3 -3
- package/dist/tools/warp_grep/harness.cjs +16 -7
- 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 +227 -46
- package/dist/tools/warp_grep/index.cjs.map +1 -1
- package/dist/tools/warp_grep/index.d.ts +3 -3
- package/dist/tools/warp_grep/index.js +7 -5
- package/dist/tools/warp_grep/openai.cjs +16 -7
- package/dist/tools/warp_grep/openai.cjs.map +1 -1
- package/dist/tools/warp_grep/openai.d.ts +3 -2
- package/dist/tools/warp_grep/openai.js +4 -4
- package/dist/tools/warp_grep/providers/remote.d.ts +1 -1
- package/dist/tools/warp_grep/vercel.cjs +16 -7
- package/dist/tools/warp_grep/vercel.cjs.map +1 -1
- package/dist/tools/warp_grep/vercel.d.ts +2 -1
- package/dist/tools/warp_grep/vercel.js +4 -4
- package/dist/{types-Cv4LpqVl.d.ts → types-BMowL9iZ.d.ts} +5 -0
- package/package.json +1 -1
- package/dist/chunk-HRK53IKL.js.map +0 -1
- package/dist/chunk-P2O5JKE5.js.map +0 -1
- package/dist/chunk-QOYI77CN.js.map +0 -1
- /package/dist/{chunk-S27A4NQM.js.map → chunk-5X7IJXKA.js.map} +0 -0
- /package/dist/{chunk-RL4JBZ3T.js.map → chunk-AJEE5RRB.js.map} +0 -0
- /package/dist/{chunk-LXG37353.js.map → chunk-IXNX4HMC.js.map} +0 -0
- /package/dist/{chunk-HPR6BJA7.js.map → chunk-SQF3OG24.js.map} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export { WarpGrepClient, executeToolCall, executeWarpGrep, formatResult } from './client.js';
|
|
3
|
-
export { R as RemoteCommands, W as WarpGrepClientConfig, c as WarpGrepContext, a as WarpGrepInput, b as WarpGrepResult, d as WarpGrepToolConfig } from '../../types-
|
|
3
|
+
export { R as RemoteCommands, W as WarpGrepClientConfig, c as WarpGrepContext, a as WarpGrepInput, b as WarpGrepResult, d as WarpGrepToolConfig } from '../../types-BMowL9iZ.js';
|
|
4
4
|
export { GrepResult, ListDirectoryEntry, ReadResult, WarpGrepProvider } from './providers/types.js';
|
|
5
5
|
export { LocalRipgrepProvider } from './providers/local.js';
|
|
6
6
|
export { RemoteCommandsProvider } from './providers/remote.js';
|
|
7
7
|
export { fixPathRepetition } from './utils/paths.js';
|
|
8
|
-
export { runWarpGrep } from './agent/runner.js';
|
|
9
|
-
export { AgentRunResult, ChatMessage, SessionConfig } from './agent/types.js';
|
|
8
|
+
export { runWarpGrep, runWarpGrepStreaming } from './agent/runner.js';
|
|
9
|
+
export { AgentRunResult, ChatMessage, SessionConfig, WarpGrepStep } from './agent/types.js';
|
|
10
10
|
export { SYSTEM_PROMPT as WARP_GREP_SYSTEM_PROMPT, getSystemPrompt } from './agent/prompt.js';
|
|
11
11
|
export { n as normalizeFinishFiles, r as readFinishFiles, t as toolGrep, b as toolListDirectory, a as toolRead } from '../../finish-pPJfB0uO.js';
|
|
12
12
|
import '../utils/resilience.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
warpGrepInputSchema
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-L5C6E32T.js";
|
|
4
4
|
import {
|
|
5
5
|
WARP_GREP_DESCRIPTION,
|
|
6
6
|
WARP_GREP_TOOL_NAME
|
|
@@ -10,10 +10,11 @@ import {
|
|
|
10
10
|
executeToolCall,
|
|
11
11
|
executeWarpGrep,
|
|
12
12
|
formatResult
|
|
13
|
-
} from "../../chunk-
|
|
13
|
+
} from "../../chunk-37SJ3IOY.js";
|
|
14
14
|
import {
|
|
15
|
-
runWarpGrep
|
|
16
|
-
|
|
15
|
+
runWarpGrep,
|
|
16
|
+
runWarpGrepStreaming
|
|
17
|
+
} from "../../chunk-HJOMBO2A.js";
|
|
17
18
|
import {
|
|
18
19
|
RemoteCommandsProvider
|
|
19
20
|
} from "../../chunk-PUGSTXLO.js";
|
|
@@ -23,7 +24,7 @@ import {
|
|
|
23
24
|
toolGrep,
|
|
24
25
|
toolListDirectory,
|
|
25
26
|
toolRead
|
|
26
|
-
} from "../../chunk-
|
|
27
|
+
} from "../../chunk-KRDIR7GG.js";
|
|
27
28
|
import "../../chunk-APP75CBN.js";
|
|
28
29
|
import "../../chunk-5QRN3JNB.js";
|
|
29
30
|
import {
|
|
@@ -56,6 +57,7 @@ export {
|
|
|
56
57
|
normalizeFinishFiles,
|
|
57
58
|
readFinishFiles,
|
|
58
59
|
runWarpGrep,
|
|
60
|
+
runWarpGrepStreaming,
|
|
59
61
|
toolGrep,
|
|
60
62
|
toolListDirectory,
|
|
61
63
|
toolRead,
|
|
@@ -650,14 +650,23 @@ async function toolRead(provider, args) {
|
|
|
650
650
|
|
|
651
651
|
// tools/warp_grep/agent/tools/list_directory.ts
|
|
652
652
|
async function toolListDirectory(provider, args) {
|
|
653
|
-
const
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
653
|
+
const maxResults = args.maxResults ?? AGENT_CONFIG.MAX_OUTPUT_LINES;
|
|
654
|
+
const initialDepth = args.maxDepth ?? AGENT_CONFIG.MAX_LIST_DEPTH;
|
|
655
|
+
async function getListRecursive(currentDepth) {
|
|
656
|
+
const entries = await provider.listDirectory({
|
|
657
|
+
path: args.path,
|
|
658
|
+
pattern: args.pattern ?? null,
|
|
659
|
+
maxResults,
|
|
660
|
+
maxDepth: currentDepth
|
|
661
|
+
});
|
|
662
|
+
if (entries.length >= maxResults && currentDepth > 0) {
|
|
663
|
+
return getListRecursive(currentDepth - 1);
|
|
664
|
+
}
|
|
665
|
+
return { entries };
|
|
666
|
+
}
|
|
667
|
+
const { entries: list } = await getListRecursive(initialDepth);
|
|
659
668
|
if (!list.length) return "empty";
|
|
660
|
-
if (list.length >=
|
|
669
|
+
if (list.length >= maxResults) {
|
|
661
670
|
return "query not specific enough, tool called tried to return too much context and failed";
|
|
662
671
|
}
|
|
663
672
|
return list.map((e) => {
|