@morphllm/morphsdk 0.2.55 → 0.2.56

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.
Files changed (36) hide show
  1. package/dist/{chunk-ZWY434TS.js → chunk-4ZHDBKBY.js} +3 -3
  2. package/dist/chunk-7OQOOB3R.js +1 -0
  3. package/dist/{chunk-BSHJGJ25.js → chunk-GJURLQ3L.js} +3 -3
  4. package/dist/{chunk-KO6JQFRE.js → chunk-QVRXBAMM.js} +2 -2
  5. package/dist/{chunk-37SRI4GW.js → chunk-SALJ2K6S.js} +4 -4
  6. package/dist/{chunk-X5HNQ7SB.js → chunk-UIRJE422.js} +3 -3
  7. package/dist/{chunk-C6QQL6FX.js → chunk-WSSSSBWU.js} +5 -5
  8. package/dist/client.js +7 -7
  9. package/dist/index.cjs +0 -67
  10. package/dist/index.cjs.map +1 -1
  11. package/dist/index.d.ts +0 -1
  12. package/dist/index.js +8 -12
  13. package/dist/tools/warp_grep/agent/runner.js +2 -2
  14. package/dist/tools/warp_grep/anthropic.js +4 -4
  15. package/dist/tools/warp_grep/index.cjs +0 -67
  16. package/dist/tools/warp_grep/index.cjs.map +1 -1
  17. package/dist/tools/warp_grep/index.d.ts +0 -1
  18. package/dist/tools/warp_grep/index.js +7 -11
  19. package/dist/tools/warp_grep/openai.js +4 -4
  20. package/dist/tools/warp_grep/vercel.js +4 -4
  21. package/package.json +2 -2
  22. package/dist/chunk-JYBVRF72.js +0 -1
  23. package/dist/chunk-P2XKFWFD.js +0 -73
  24. package/dist/chunk-P2XKFWFD.js.map +0 -1
  25. package/dist/tools/warp_grep/providers/command.cjs +0 -177
  26. package/dist/tools/warp_grep/providers/command.cjs.map +0 -1
  27. package/dist/tools/warp_grep/providers/command.d.ts +0 -48
  28. package/dist/tools/warp_grep/providers/command.js +0 -9
  29. package/dist/tools/warp_grep/providers/command.js.map +0 -1
  30. /package/dist/{chunk-ZWY434TS.js.map → chunk-4ZHDBKBY.js.map} +0 -0
  31. /package/dist/{chunk-JYBVRF72.js.map → chunk-7OQOOB3R.js.map} +0 -0
  32. /package/dist/{chunk-BSHJGJ25.js.map → chunk-GJURLQ3L.js.map} +0 -0
  33. /package/dist/{chunk-KO6JQFRE.js.map → chunk-QVRXBAMM.js.map} +0 -0
  34. /package/dist/{chunk-37SRI4GW.js.map → chunk-SALJ2K6S.js.map} +0 -0
  35. /package/dist/{chunk-X5HNQ7SB.js.map → chunk-UIRJE422.js.map} +0 -0
  36. /package/dist/{chunk-C6QQL6FX.js.map → chunk-WSSSSBWU.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -6,7 +6,6 @@ export { BrowserClient } from './tools/browser/core.js';
6
6
  export { MorphGit } from './git/client.js';
7
7
  export { MorphGitConfig } from './git/types.js';
8
8
  export { LocalRipgrepProvider } from './tools/warp_grep/providers/local.js';
9
- export { CommandExecProvider } from './tools/warp_grep/providers/command.js';
10
9
  export { AgentRunResult, ChatMessage, SessionConfig } from './tools/warp_grep/agent/types.js';
11
10
  export { AnalyseEntry, GrepResult, ReadResult, WarpGrepProvider } from './tools/warp_grep/providers/types.js';
12
11
  export { AnthropicRouter, GeminiRouter, OpenAIRouter, RawRouter } from './modelrouter/core.js';
package/dist/index.js CHANGED
@@ -1,21 +1,17 @@
1
- import "./chunk-JYBVRF72.js";
2
- import {
3
- CommandExecProvider
4
- } from "./chunk-P2XKFWFD.js";
1
+ import "./chunk-7OQOOB3R.js";
5
2
  import {
6
3
  AnthropicToolFactory,
7
4
  MorphClient,
8
5
  OpenAIToolFactory,
9
6
  VercelToolFactory
10
- } from "./chunk-C6QQL6FX.js";
11
- import "./chunk-BSHJGJ25.js";
12
- import "./chunk-ZWY434TS.js";
13
- import "./chunk-X5HNQ7SB.js";
7
+ } from "./chunk-WSSSSBWU.js";
8
+ import "./chunk-GJURLQ3L.js";
9
+ import "./chunk-4ZHDBKBY.js";
10
+ import "./chunk-UIRJE422.js";
14
11
  import {
15
12
  WarpGrepClient
16
- } from "./chunk-KO6JQFRE.js";
17
- import "./chunk-37SRI4GW.js";
18
- import "./chunk-EK7OQPWD.js";
13
+ } from "./chunk-QVRXBAMM.js";
14
+ import "./chunk-SALJ2K6S.js";
19
15
  import "./chunk-HQO45BAJ.js";
20
16
  import "./chunk-LVPVVLTI.js";
21
17
  import "./chunk-WETRQJGU.js";
@@ -26,6 +22,7 @@ import "./chunk-G2RSY56Q.js";
26
22
  import "./chunk-SMGZ6A64.js";
27
23
  import "./chunk-TPP2UGQP.js";
28
24
  import "./chunk-73RQWOQC.js";
25
+ import "./chunk-EK7OQPWD.js";
29
26
  import "./chunk-TJIUA27P.js";
30
27
  import "./chunk-TICMYDII.js";
31
28
  import "./chunk-NDZO5IPV.js";
@@ -65,7 +62,6 @@ export {
65
62
  AnthropicToolFactory,
66
63
  BrowserClient,
67
64
  CodebaseSearchClient,
68
- CommandExecProvider,
69
65
  FastApplyClient,
70
66
  GeminiRouter,
71
67
  LocalRipgrepProvider,
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  runWarpGrep
3
- } from "../../../chunk-37SRI4GW.js";
4
- import "../../../chunk-EK7OQPWD.js";
3
+ } from "../../../chunk-SALJ2K6S.js";
5
4
  import "../../../chunk-HQO45BAJ.js";
6
5
  import "../../../chunk-LVPVVLTI.js";
7
6
  import "../../../chunk-WETRQJGU.js";
8
7
  import "../../../chunk-73RQWOQC.js";
8
+ import "../../../chunk-EK7OQPWD.js";
9
9
  import "../../../chunk-TJIUA27P.js";
10
10
  import "../../../chunk-TICMYDII.js";
11
11
  import "../../../chunk-NDZO5IPV.js";
@@ -3,12 +3,11 @@ import {
3
3
  createMorphWarpGrepTool,
4
4
  execute,
5
5
  warpGrepTool
6
- } from "../../chunk-BSHJGJ25.js";
6
+ } from "../../chunk-GJURLQ3L.js";
7
7
  import {
8
8
  formatResult
9
- } from "../../chunk-KO6JQFRE.js";
10
- import "../../chunk-37SRI4GW.js";
11
- import "../../chunk-EK7OQPWD.js";
9
+ } from "../../chunk-QVRXBAMM.js";
10
+ import "../../chunk-SALJ2K6S.js";
12
11
  import "../../chunk-HQO45BAJ.js";
13
12
  import "../../chunk-LVPVVLTI.js";
14
13
  import {
@@ -19,6 +18,7 @@ import "../../chunk-G2RSY56Q.js";
19
18
  import "../../chunk-SMGZ6A64.js";
20
19
  import "../../chunk-TPP2UGQP.js";
21
20
  import "../../chunk-73RQWOQC.js";
21
+ import "../../chunk-EK7OQPWD.js";
22
22
  import "../../chunk-TJIUA27P.js";
23
23
  import "../../chunk-TICMYDII.js";
24
24
  import "../../chunk-NDZO5IPV.js";
@@ -30,7 +30,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // tools/warp_grep/index.ts
31
31
  var warp_grep_exports = {};
32
32
  __export(warp_grep_exports, {
33
- CommandExecProvider: () => CommandExecProvider,
34
33
  LocalRipgrepProvider: () => LocalRipgrepProvider,
35
34
  WARP_GREP_DESCRIPTION: () => WARP_GREP_DESCRIPTION,
36
35
  WARP_GREP_SYSTEM_PROMPT: () => SYSTEM_PROMPT,
@@ -1311,71 +1310,6 @@ function formatResult(result) {
1311
1310
  var WARP_GREP_TOOL_NAME = "warpgrep_codebase_search";
1312
1311
  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.';
1313
1312
 
1314
- // tools/warp_grep/providers/command.ts
1315
- var CommandExecProvider = class {
1316
- constructor(opts) {
1317
- this.opts = opts;
1318
- }
1319
- map(path4) {
1320
- return this.opts.pathMap ? this.opts.pathMap(path4) : path4;
1321
- }
1322
- async grep(params) {
1323
- const remotePath = this.map(params.path);
1324
- const args = [
1325
- "--no-config",
1326
- "--no-heading",
1327
- "--with-filename",
1328
- "--line-number",
1329
- "--color=never",
1330
- "--trim",
1331
- "--max-columns=400",
1332
- ...(this.opts.excludes ?? DEFAULT_EXCLUDES).flatMap((e) => ["-g", `!${e}`]),
1333
- params.pattern,
1334
- remotePath || "."
1335
- ];
1336
- const res = await this.opts.run("rg", args, { cwd: this.opts.cwd, env: this.opts.env });
1337
- if (res.exitCode === -1) throw new Error(res.stderr || "ripgrep execution failed");
1338
- if (res.exitCode !== 0 && res.exitCode !== 1) throw new Error(res.stderr || `ripgrep failed (${res.exitCode})`);
1339
- const lines = (res.stdout || "").trim().split(/\r?\n/).filter((l) => l.length > 0);
1340
- return { lines };
1341
- }
1342
- async glob(params) {
1343
- const remotePath = this.map(params.path);
1344
- const args = [
1345
- "--no-config",
1346
- "--files",
1347
- "-g",
1348
- params.pattern,
1349
- ...(this.opts.excludes ?? DEFAULT_EXCLUDES).flatMap((e) => ["-g", `!${e}`]),
1350
- remotePath || "."
1351
- ];
1352
- const res = await this.opts.run("rg", args, { cwd: this.opts.cwd, env: this.opts.env });
1353
- if (res.exitCode === -1) throw new Error(res.stderr || "ripgrep execution failed");
1354
- const files = (res.stdout || "").trim().split(/\r?\n/).filter((l) => l.length > 0);
1355
- return { files };
1356
- }
1357
- async read(params) {
1358
- const remotePath = this.map(params.path);
1359
- const rc = this.opts.readCommand ? this.opts.readCommand(remotePath, params.start, params.end) : { cmd: "sed", args: ["-n", `${params.start ?? 1},${params.end ?? 1e6}p`, remotePath] };
1360
- const res = await this.opts.run(rc.cmd, rc.args, { cwd: this.opts.cwd, env: this.opts.env });
1361
- if (res.exitCode !== 0) throw new Error(res.stderr || `read failed (${res.exitCode})`);
1362
- const text = res.stdout || "";
1363
- const lines = text.split(/\r?\n/).map((line, idx) => `${(params.start ?? 1) + idx}|${line}`);
1364
- return { lines: lines.filter((l) => l !== `${(params.start ?? 1) + (lines.length - 1)}|`) };
1365
- }
1366
- async analyse(params) {
1367
- const target = this.map(params.path);
1368
- const pattern = params.pattern ?? "*";
1369
- const files = await this.glob({ pattern, path: target }).catch(() => ({ files: [] }));
1370
- return files.files.slice(0, params.maxResults ?? 100).map((f) => ({
1371
- name: f.split("/").pop() || f,
1372
- path: f,
1373
- type: f.endsWith("/") ? "dir" : "file",
1374
- depth: 0
1375
- }));
1376
- }
1377
- };
1378
-
1379
1313
  // tools/warp_grep/openai.ts
1380
1314
  var TOOL_PARAMETERS = {
1381
1315
  type: "object",
@@ -1512,7 +1446,6 @@ function createMorphWarpGrepTool3(config) {
1512
1446
  }
1513
1447
  // Annotate the CommonJS export names for ESM import in node:
1514
1448
  0 && (module.exports = {
1515
- CommandExecProvider,
1516
1449
  LocalRipgrepProvider,
1517
1450
  WARP_GREP_DESCRIPTION,
1518
1451
  WARP_GREP_SYSTEM_PROMPT,