@morphllm/morphsdk 0.2.59 → 0.2.62

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 (120) hide show
  1. package/dist/{anthropic-CaFUHxBW.d.ts → anthropic-BC-AMEIN.d.ts} +1 -1
  2. package/dist/{chunk-YV75OQTE.js → chunk-3M4DOG6N.js} +2 -26
  3. package/dist/chunk-3M4DOG6N.js.map +1 -0
  4. package/dist/{chunk-ILJ3J5IA.js → chunk-44GS4GJJ.js} +3 -3
  5. package/dist/{chunk-TPP2UGQP.js → chunk-563RLKFC.js} +21 -7
  6. package/dist/chunk-563RLKFC.js.map +1 -0
  7. package/dist/chunk-5FUTL2UF.js +22 -0
  8. package/dist/{chunk-IUG2FHNN.js → chunk-BHNJEBQJ.js} +2 -2
  9. package/dist/{chunk-6N6ZYZYD.js → chunk-GZ7TJ7UB.js} +3 -3
  10. package/dist/{chunk-QZNGKOCZ.js → chunk-IXNSTNS7.js} +2 -2
  11. package/dist/{chunk-ZO4PPFCZ.js → chunk-JNOZPU44.js} +2 -2
  12. package/dist/{chunk-4VGOBA2J.js → chunk-LHKFRPUO.js} +3 -3
  13. package/dist/{chunk-5QIWYEHJ.js → chunk-PKPJWARB.js} +2 -2
  14. package/dist/{chunk-374N3GIA.js → chunk-S3RCM32V.js} +3 -3
  15. package/dist/{chunk-FN4EP3WY.js → chunk-XWSKUQVQ.js} +8 -8
  16. package/dist/{chunk-2CASO3ZO.js → chunk-Y7CPJGLU.js} +2 -2
  17. package/dist/{chunk-3IQIT6MC.js → chunk-Z75HCPIE.js} +3 -3
  18. package/dist/{client-CextMMm9.d.ts → client-CSINf0lQ.d.ts} +1 -1
  19. package/dist/client.cjs +33 -31
  20. package/dist/client.cjs.map +1 -1
  21. package/dist/client.d.ts +2 -2
  22. package/dist/client.js +13 -13
  23. package/dist/{gemini-CE80Pbdy.d.ts → gemini-DPFWWG3k.d.ts} +1 -1
  24. package/dist/git/client.js +1 -1
  25. package/dist/git/config.js +1 -1
  26. package/dist/git/index.js +1 -1
  27. package/dist/index.cjs +33 -31
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.d.ts +2 -2
  30. package/dist/index.js +14 -14
  31. package/dist/lib-GEPX5Y3T.js +14 -0
  32. package/dist/lib-GEPX5Y3T.js.map +1 -0
  33. package/dist/modelrouter/core.js +1 -1
  34. package/dist/modelrouter/index.js +1 -1
  35. package/dist/{openai-Fvpqln7F.d.ts → openai-Beb9escY.d.ts} +1 -1
  36. package/dist/tools/browser/anthropic.js +1 -1
  37. package/dist/tools/browser/core.js +1 -1
  38. package/dist/tools/browser/index.js +1 -1
  39. package/dist/tools/browser/live.js +1 -1
  40. package/dist/tools/browser/openai.js +1 -1
  41. package/dist/tools/browser/prompts.js +1 -1
  42. package/dist/tools/browser/vercel.js +1 -1
  43. package/dist/tools/codebase_search/anthropic.js +1 -1
  44. package/dist/tools/codebase_search/core.js +1 -1
  45. package/dist/tools/codebase_search/index.js +1 -1
  46. package/dist/tools/codebase_search/openai.js +1 -1
  47. package/dist/tools/codebase_search/prompts.js +1 -1
  48. package/dist/tools/codebase_search/vercel.js +1 -1
  49. package/dist/tools/fastapply/anthropic.js +2 -2
  50. package/dist/tools/fastapply/core.js +1 -1
  51. package/dist/tools/fastapply/index.js +4 -4
  52. package/dist/tools/fastapply/openai.js +2 -2
  53. package/dist/tools/fastapply/prompts.js +1 -1
  54. package/dist/tools/fastapply/vercel.js +2 -2
  55. package/dist/tools/index.js +4 -4
  56. package/dist/tools/utils/resilience.js +1 -1
  57. package/dist/tools/warp_grep/agent/config.js +1 -1
  58. package/dist/tools/warp_grep/agent/formatter.js +1 -1
  59. package/dist/tools/warp_grep/agent/parser.cjs +1 -25
  60. package/dist/tools/warp_grep/agent/parser.cjs.map +1 -1
  61. package/dist/tools/warp_grep/agent/parser.js +2 -2
  62. package/dist/tools/warp_grep/agent/prompt.js +1 -1
  63. package/dist/tools/warp_grep/agent/runner.cjs +1 -25
  64. package/dist/tools/warp_grep/agent/runner.cjs.map +1 -1
  65. package/dist/tools/warp_grep/agent/runner.js +3 -3
  66. package/dist/tools/warp_grep/anthropic.cjs +33 -31
  67. package/dist/tools/warp_grep/anthropic.cjs.map +1 -1
  68. package/dist/tools/warp_grep/anthropic.d.ts +2 -2
  69. package/dist/tools/warp_grep/anthropic.js +7 -7
  70. package/dist/tools/warp_grep/client.cjs +33 -31
  71. package/dist/tools/warp_grep/client.cjs.map +1 -1
  72. package/dist/tools/warp_grep/client.d.ts +1 -1
  73. package/dist/tools/warp_grep/client.js +6 -6
  74. package/dist/tools/warp_grep/gemini.cjs +33 -31
  75. package/dist/tools/warp_grep/gemini.cjs.map +1 -1
  76. package/dist/tools/warp_grep/gemini.d.ts +2 -2
  77. package/dist/tools/warp_grep/gemini.js +7 -7
  78. package/dist/tools/warp_grep/harness.cjs +33 -31
  79. package/dist/tools/warp_grep/harness.cjs.map +1 -1
  80. package/dist/tools/warp_grep/harness.js +4 -4
  81. package/dist/tools/warp_grep/index.cjs +33 -31
  82. package/dist/tools/warp_grep/index.cjs.map +1 -1
  83. package/dist/tools/warp_grep/index.d.ts +5 -5
  84. package/dist/tools/warp_grep/index.js +10 -10
  85. package/dist/tools/warp_grep/openai.cjs +33 -31
  86. package/dist/tools/warp_grep/openai.cjs.map +1 -1
  87. package/dist/tools/warp_grep/openai.d.ts +2 -2
  88. package/dist/tools/warp_grep/openai.js +7 -7
  89. package/dist/tools/warp_grep/providers/local.cjs +32 -6
  90. package/dist/tools/warp_grep/providers/local.cjs.map +1 -1
  91. package/dist/tools/warp_grep/providers/local.js +3 -3
  92. package/dist/tools/warp_grep/providers/remote.d.ts +1 -1
  93. package/dist/tools/warp_grep/providers/remote.js +1 -1
  94. package/dist/tools/warp_grep/utils/files.js +1 -1
  95. package/dist/tools/warp_grep/utils/paths.js +1 -1
  96. package/dist/tools/warp_grep/utils/ripgrep.cjs +42 -6
  97. package/dist/tools/warp_grep/utils/ripgrep.cjs.map +1 -1
  98. package/dist/tools/warp_grep/utils/ripgrep.js +2 -2
  99. package/dist/tools/warp_grep/vercel.cjs +33 -31
  100. package/dist/tools/warp_grep/vercel.cjs.map +1 -1
  101. package/dist/tools/warp_grep/vercel.d.ts +2 -2
  102. package/dist/tools/warp_grep/vercel.js +7 -7
  103. package/dist/{types-a_hxdPI6.d.ts → types-CnvVDM63.d.ts} +8 -9
  104. package/dist/{vercel-3yjvfmVB.d.ts → vercel-Bo84tpBe.d.ts} +1 -1
  105. package/package.json +5 -3
  106. package/dist/chunk-PZ5AY32C.js +0 -10
  107. package/dist/chunk-TPP2UGQP.js.map +0 -1
  108. package/dist/chunk-YV75OQTE.js.map +0 -1
  109. /package/dist/{chunk-ILJ3J5IA.js.map → chunk-44GS4GJJ.js.map} +0 -0
  110. /package/dist/{chunk-PZ5AY32C.js.map → chunk-5FUTL2UF.js.map} +0 -0
  111. /package/dist/{chunk-IUG2FHNN.js.map → chunk-BHNJEBQJ.js.map} +0 -0
  112. /package/dist/{chunk-6N6ZYZYD.js.map → chunk-GZ7TJ7UB.js.map} +0 -0
  113. /package/dist/{chunk-QZNGKOCZ.js.map → chunk-IXNSTNS7.js.map} +0 -0
  114. /package/dist/{chunk-ZO4PPFCZ.js.map → chunk-JNOZPU44.js.map} +0 -0
  115. /package/dist/{chunk-4VGOBA2J.js.map → chunk-LHKFRPUO.js.map} +0 -0
  116. /package/dist/{chunk-5QIWYEHJ.js.map → chunk-PKPJWARB.js.map} +0 -0
  117. /package/dist/{chunk-374N3GIA.js.map → chunk-S3RCM32V.js.map} +0 -0
  118. /package/dist/{chunk-FN4EP3WY.js.map → chunk-XWSKUQVQ.js.map} +0 -0
  119. /package/dist/{chunk-2CASO3ZO.js.map → chunk-Y7CPJGLU.js.map} +0 -0
  120. /package/dist/{chunk-3IQIT6MC.js.map → chunk-Z75HCPIE.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  export { WarpGrepClient, executeToolCall, executeWarpGrep, formatResult } from './client.js';
2
- export { R as RemoteCommands, W as WarpGrepClientConfig, c as WarpGrepContext, a as WarpGrepInput, b as WarpGrepResult, d as WarpGrepToolConfig } from '../../types-a_hxdPI6.js';
2
+ export { R as RemoteCommands, W as WarpGrepClientConfig, c as WarpGrepContext, a as WarpGrepInput, b as WarpGrepResult, d as WarpGrepToolConfig } from '../../types-CnvVDM63.js';
3
3
  export { GrepResult, ListDirectoryEntry, ReadResult, WarpGrepProvider } from './providers/types.js';
4
4
  export { LocalRipgrepProvider } from './providers/local.js';
5
5
  export { RemoteCommandsProvider } from './providers/remote.js';
@@ -7,10 +7,10 @@ export { runWarpGrep } from './agent/runner.js';
7
7
  export { AgentRunResult, ChatMessage, SessionConfig } from './agent/types.js';
8
8
  export { SYSTEM_PROMPT as WARP_GREP_SYSTEM_PROMPT, getSystemPrompt } from './agent/prompt.js';
9
9
  export { n as normalizeFinishFiles, r as readFinishFiles, t as toolGrep, b as toolListDirectory, a as toolRead } from '../../finish-kXAcUJyB.js';
10
- export { a as anthropic } from '../../anthropic-CaFUHxBW.js';
11
- export { o as openai } from '../../openai-Fvpqln7F.js';
12
- export { v as vercel } from '../../vercel-3yjvfmVB.js';
13
- export { g as gemini } from '../../gemini-CE80Pbdy.js';
10
+ export { a as anthropic } from '../../anthropic-BC-AMEIN.js';
11
+ export { o as openai } from '../../openai-Beb9escY.js';
12
+ export { v as vercel } from '../../vercel-Bo84tpBe.js';
13
+ export { g as gemini } from '../../gemini-DPFWWG3k.js';
14
14
  import '../utils/resilience.js';
15
15
  import '@anthropic-ai/sdk/resources/messages';
16
16
  import 'openai/resources/chat/completions';
@@ -1,16 +1,16 @@
1
1
  import "../../chunk-ISWL67SF.js";
2
2
  import {
3
3
  gemini_exports
4
- } from "../../chunk-ILJ3J5IA.js";
4
+ } from "../../chunk-44GS4GJJ.js";
5
5
  import {
6
6
  anthropic_exports
7
- } from "../../chunk-3IQIT6MC.js";
7
+ } from "../../chunk-Z75HCPIE.js";
8
8
  import {
9
9
  openai_exports
10
- } from "../../chunk-6N6ZYZYD.js";
10
+ } from "../../chunk-GZ7TJ7UB.js";
11
11
  import {
12
12
  vercel_exports
13
- } from "../../chunk-4VGOBA2J.js";
13
+ } from "../../chunk-LHKFRPUO.js";
14
14
  import {
15
15
  WARP_GREP_DESCRIPTION,
16
16
  WARP_GREP_TOOL_NAME
@@ -20,10 +20,10 @@ import {
20
20
  executeToolCall,
21
21
  executeWarpGrep,
22
22
  formatResult
23
- } from "../../chunk-374N3GIA.js";
23
+ } from "../../chunk-S3RCM32V.js";
24
24
  import {
25
25
  runWarpGrep
26
- } from "../../chunk-2CASO3ZO.js";
26
+ } from "../../chunk-Y7CPJGLU.js";
27
27
  import {
28
28
  RemoteCommandsProvider
29
29
  } from "../../chunk-527P5X2E.js";
@@ -35,20 +35,20 @@ import {
35
35
  toolRead
36
36
  } from "../../chunk-6Y5JB4JC.js";
37
37
  import "../../chunk-APP75CBN.js";
38
- import "../../chunk-YV75OQTE.js";
38
+ import "../../chunk-3M4DOG6N.js";
39
39
  import {
40
40
  SYSTEM_PROMPT,
41
41
  getSystemPrompt
42
42
  } from "../../chunk-Q5AHGIQO.js";
43
43
  import {
44
44
  LocalRipgrepProvider
45
- } from "../../chunk-ZO4PPFCZ.js";
45
+ } from "../../chunk-JNOZPU44.js";
46
46
  import "../../chunk-G2RSY56Q.js";
47
47
  import "../../chunk-SMGZ6A64.js";
48
- import "../../chunk-TPP2UGQP.js";
48
+ import "../../chunk-563RLKFC.js";
49
49
  import "../../chunk-XT5ZO6ES.js";
50
50
  import "../../chunk-4VWJFZVS.js";
51
- import "../../chunk-PZ5AY32C.js";
51
+ import "../../chunk-5FUTL2UF.js";
52
52
  export {
53
53
  LocalRipgrepProvider,
54
54
  RemoteCommandsProvider,
@@ -5,6 +5,9 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __commonJS = (cb, mod) => function __require() {
9
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
+ };
8
11
  var __export = (target, all) => {
9
12
  for (var name in all)
10
13
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -27,6 +30,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
30
  ));
28
31
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
32
 
33
+ // node_modules/@vscode/ripgrep/lib/index.js
34
+ var require_lib = __commonJS({
35
+ "node_modules/@vscode/ripgrep/lib/index.js"(exports2, module2) {
36
+ "use strict";
37
+ var path5 = require("path");
38
+ module2.exports.rgPath = path5.join(__dirname, `../bin/rg${process.platform === "win32" ? ".exe" : ""}`);
39
+ }
40
+ });
41
+
30
42
  // tools/warp_grep/openai.ts
31
43
  var openai_exports = {};
32
44
  __export(openai_exports, {
@@ -429,33 +441,9 @@ function parseNestedXmlTools(text) {
429
441
  return tools;
430
442
  }
431
443
  function preprocessText(text) {
432
- let processed = text.replace(/<think>[\s\S]*?<\/think>/gi, "");
444
+ const processed = text.replace(/<think>[\s\S]*?<\/think>/gi, "").replace(/<\/?tool_call>/gi, "");
433
445
  const nestedTools = parseNestedXmlTools(processed);
434
- const openingTagRegex = /<tool_call>|<tool>/gi;
435
- const closingTagRegex = /<\/tool_call>|<\/tool>/gi;
436
- const openingMatches = processed.match(openingTagRegex) || [];
437
- const closingMatches = processed.match(closingTagRegex) || [];
438
- if (openingMatches.length > closingMatches.length) {
439
- const lastClosingMatch = /<\/tool_call>|<\/tool>/gi;
440
- let lastClosingIndex = -1;
441
- let match;
442
- while ((match = lastClosingMatch.exec(processed)) !== null) {
443
- lastClosingIndex = match.index + match[0].length;
444
- }
445
- if (lastClosingIndex > 0) {
446
- processed = processed.slice(0, lastClosingIndex);
447
- }
448
- }
449
446
  const toolCallLines = [];
450
- const toolTagRegex = /<tool_call>([\s\S]*?)<\/tool_call>|<tool>([\s\S]*?)<\/tool>/gi;
451
- let tagMatch;
452
- while ((tagMatch = toolTagRegex.exec(processed)) !== null) {
453
- const content = (tagMatch[1] || tagMatch[2] || "").trim();
454
- if (content) {
455
- const lines = content.split(/\r?\n/).map((l) => l.trim()).filter((l) => l);
456
- toolCallLines.push(...lines);
457
- }
458
- }
459
447
  const allLines = processed.split(/\r?\n/).map((l) => l.trim());
460
448
  for (const line of allLines) {
461
449
  if (!line) continue;
@@ -1118,9 +1106,20 @@ var import_path4 = __toESM(require("path"), 1);
1118
1106
 
1119
1107
  // tools/warp_grep/utils/ripgrep.ts
1120
1108
  var import_child_process = require("child_process");
1121
- var import_ripgrep = require("@vscode/ripgrep");
1122
1109
  var resolvedRgPath = null;
1123
1110
  var rgPathChecked = false;
1111
+ var bundledRgPath = null;
1112
+ async function getBundledRgPath() {
1113
+ if (bundledRgPath !== null) return bundledRgPath;
1114
+ try {
1115
+ const module2 = await Promise.resolve().then(() => __toESM(require_lib(), 1));
1116
+ bundledRgPath = module2.rgPath;
1117
+ return bundledRgPath;
1118
+ } catch {
1119
+ bundledRgPath = "";
1120
+ return null;
1121
+ }
1122
+ }
1124
1123
  function spawnRg(rgBinary, args, opts) {
1125
1124
  return new Promise((resolve) => {
1126
1125
  const child = (0, import_child_process.spawn)(rgBinary, args, {
@@ -1151,11 +1150,14 @@ async function runRipgrep(args, opts) {
1151
1150
  return spawnRg(resolvedRgPath, args, opts);
1152
1151
  }
1153
1152
  if (!rgPathChecked) {
1154
- const result = await spawnRg(import_ripgrep.rgPath, args, opts);
1155
- if (!isBinaryFailure(result)) {
1156
- resolvedRgPath = import_ripgrep.rgPath;
1157
- rgPathChecked = true;
1158
- return result;
1153
+ const bundledPath = await getBundledRgPath();
1154
+ if (bundledPath) {
1155
+ const result = await spawnRg(bundledPath, args, opts);
1156
+ if (!isBinaryFailure(result)) {
1157
+ resolvedRgPath = bundledPath;
1158
+ rgPathChecked = true;
1159
+ return result;
1160
+ }
1159
1161
  }
1160
1162
  const fallbackResult = await spawnRg("rg", args, opts);
1161
1163
  if (!isBinaryFailure(fallbackResult)) {