codex-review-mcp 2.3.8 → 2.4.0
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/mcp-server.js
CHANGED
@@ -86,11 +86,11 @@ server.registerTool('perform_code_review', {
|
|
86
86
|
maxTokens: input.maxTokens,
|
87
87
|
};
|
88
88
|
const onProgress = async (message, progress, total) => {
|
89
|
-
// Only send progress notifications if we have
|
90
|
-
//
|
89
|
+
// Only send progress notifications if we have a valid string token (like toolu_xxx)
|
90
|
+
// Numeric tokens cause "unknown token" errors in the MCP client
|
91
91
|
const progressToken = extra?._meta?.progressToken;
|
92
|
-
if (progressToken
|
93
|
-
// Skip progress notifications if no
|
92
|
+
if (!progressToken || typeof progressToken !== 'string') {
|
93
|
+
// Skip progress notifications if no valid string token
|
94
94
|
return;
|
95
95
|
}
|
96
96
|
await server.server.notification({
|
package/dist/mcp-server.test.js
CHANGED
@@ -50,11 +50,11 @@ describe('MCP Server Integration Tests', () => {
|
|
50
50
|
},
|
51
51
|
}, async (input, extra) => {
|
52
52
|
const onProgress = async (message, progress, total) => {
|
53
|
-
// Only send progress notifications if we have
|
54
|
-
//
|
53
|
+
// Only send progress notifications if we have a valid string token (like toolu_xxx)
|
54
|
+
// Numeric tokens cause "unknown token" errors in the MCP client
|
55
55
|
const progressToken = extra?._meta?.progressToken;
|
56
|
-
if (progressToken
|
57
|
-
// Skip progress notifications if no
|
56
|
+
if (!progressToken || typeof progressToken !== 'string') {
|
57
|
+
// Skip progress notifications if no valid string token
|
58
58
|
return;
|
59
59
|
}
|
60
60
|
await server.server.notification({
|
@@ -37,16 +37,20 @@ export async function performCodeReview(input, onProgress) {
|
|
37
37
|
: shouldSkip
|
38
38
|
? ''
|
39
39
|
: await gatherContext(input.workspaceDir);
|
40
|
-
//
|
41
|
-
console.error(`[codex-review-mcp] Context gathered: ${context.length} chars`);
|
40
|
+
// Log context gathering results (informational, not errors!)
|
42
41
|
const hasCursorRules = context.includes('.cursor/rules');
|
43
|
-
console.error(`[codex-review-mcp] Contains .cursor/rules: ${hasCursorRules}`);
|
44
42
|
if (hasCursorRules) {
|
45
43
|
const cursorFiles = (context.match(/<!-- \.cursor\/rules\/[^>]+ -->/g) || []);
|
46
|
-
console.error(`[codex-review-mcp]
|
44
|
+
console.error(`[codex-review-mcp] Context: ${context.length} chars with .cursor/rules → ${cursorFiles.map(f => f.replace('<!-- ', '').replace(' -->', '')).join(', ')}`);
|
45
|
+
}
|
46
|
+
else if (context.length > 0) {
|
47
|
+
console.error(`[codex-review-mcp] Context: ${context.length} chars from package.json, tsconfig.json, etc. (no .cursor/rules in repo)`);
|
48
|
+
}
|
49
|
+
else {
|
50
|
+
console.error(`[codex-review-mcp] No project context found (generic review mode)`);
|
47
51
|
}
|
48
52
|
// Also use debugLog for persistent logging
|
49
|
-
await debugLog(`Context
|
53
|
+
await debugLog(`Context: ${context.length} chars, .cursor/rules: ${hasCursorRules}`);
|
50
54
|
// Build expert prompt
|
51
55
|
await onProgress?.('Building expert prompt…', 50, 100);
|
52
56
|
const isStaticReview = input.contentType === 'code';
|