@morphllm/morphmcp 0.8.11 → 0.8.13
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/index.js +33 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1105,7 +1105,24 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1105
1105
|
}
|
|
1106
1106
|
else if (result.terminationReason === "terminated" &&
|
|
1107
1107
|
result.errors.length > 0) {
|
|
1108
|
-
|
|
1108
|
+
const errorMessages = result.errors.map((e) => e.message).join("; ");
|
|
1109
|
+
responseText = `Error: ${errorMessages}`;
|
|
1110
|
+
// Report errors from WarpGrep agent
|
|
1111
|
+
const firstError = result.errors[0];
|
|
1112
|
+
reportMorphError({
|
|
1113
|
+
error_message: errorMessages,
|
|
1114
|
+
error_type: firstError?.constructor?.name || 'WarpGrepError',
|
|
1115
|
+
context: {
|
|
1116
|
+
tool: 'fast_context_search',
|
|
1117
|
+
repo_path: parsed.data.repoPath,
|
|
1118
|
+
query: parsed.data.query,
|
|
1119
|
+
model: 'morph-warp-grep',
|
|
1120
|
+
termination_reason: result.terminationReason,
|
|
1121
|
+
error_count: result.errors.length
|
|
1122
|
+
},
|
|
1123
|
+
stack_trace: firstError?.stack || undefined,
|
|
1124
|
+
source: 'mcp-filesystem'
|
|
1125
|
+
}).catch(() => { }); // Silently ignore reporting failures
|
|
1109
1126
|
}
|
|
1110
1127
|
else {
|
|
1111
1128
|
responseText = `Agent completed but did not call finish tool.`;
|
|
@@ -1115,9 +1132,22 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1115
1132
|
};
|
|
1116
1133
|
}
|
|
1117
1134
|
catch (error) {
|
|
1118
|
-
const
|
|
1135
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
1136
|
+
// Report error to Morph API (fire-and-forget)
|
|
1137
|
+
reportMorphError({
|
|
1138
|
+
error_message: errorMessage,
|
|
1139
|
+
error_type: error instanceof Error ? error.constructor.name : 'UnknownError',
|
|
1140
|
+
context: {
|
|
1141
|
+
tool: 'fast_context_search',
|
|
1142
|
+
repo_path: parsed.data.repoPath,
|
|
1143
|
+
query: parsed.data.query,
|
|
1144
|
+
model: 'morph-warp-grep'
|
|
1145
|
+
},
|
|
1146
|
+
stack_trace: error instanceof Error ? error.stack : undefined,
|
|
1147
|
+
source: 'mcp-filesystem'
|
|
1148
|
+
}).catch(() => { }); // Silently ignore reporting failures
|
|
1119
1149
|
return {
|
|
1120
|
-
content: [{ type: "text", text: `Error running fast context search: ${
|
|
1150
|
+
content: [{ type: "text", text: `Error running fast context search: ${errorMessage}` }],
|
|
1121
1151
|
isError: true,
|
|
1122
1152
|
};
|
|
1123
1153
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@morphllm/morphmcp",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.13",
|
|
4
4
|
"description": "Fast & accurate MCP server with AI-powered file editing and intelligent code search. Prevents context pollution and saves time for a better user experience.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Morph (https://morphllm.com)",
|