cc-reviewer 1.0.2 → 1.0.4

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/cli/codex.js CHANGED
@@ -8,7 +8,7 @@ import { spawn } from 'child_process';
8
8
  import { existsSync } from 'fs';
9
9
  import { build7SectionPrompt, buildDeveloperInstructions, buildRetryPrompt, isValidFeedbackOutput } from '../prompt.js';
10
10
  import { createTimeoutError, createCliNotFoundError, getSuggestion } from '../errors.js';
11
- const TIMEOUT_MS = 180000; // 3 minutes (Codex can be slow)
11
+ const TIMEOUT_MS = 600000; // 10 minutes (xhigh reasoning can be slow)
12
12
  const MAX_RETRIES = 2;
13
13
  const MAX_BUFFER_SIZE = 1024 * 1024; // 1MB max buffer to prevent memory issues
14
14
  /**
@@ -45,7 +45,7 @@ async function runWithRetry(request, attempt, previousError, previousOutput) {
45
45
  // Codex exec doesn't have a separate system instruction flag
46
46
  const fullPrompt = `${developerInstructions}\n\n---\n\n${basePrompt}`;
47
47
  // Run the CLI
48
- const result = await runCodexCli(fullPrompt, request.workingDir);
48
+ const result = await runCodexCli(fullPrompt, request.workingDir, request.reasoningEffort || 'high');
49
49
  // Check for CLI errors
50
50
  if (result.exitCode !== 0) {
51
51
  // Check for specific error patterns in stderr
@@ -160,17 +160,17 @@ async function runWithRetry(request, attempt, previousError, previousOutput) {
160
160
  /**
161
161
  * Execute the Codex CLI in non-interactive mode
162
162
  *
163
- * Uses: codex exec -m gpt-5.2-codex -c model_reasoning_effort="xhigh" \
163
+ * Uses: codex exec -m gpt-5.2-codex -c model_reasoning_effort="high|xhigh" \
164
164
  * -c model_reasoning_summary_format=experimental \
165
165
  * --dangerously-bypass-approvals-and-sandbox "<prompt>"
166
166
  */
167
- function runCodexCli(prompt, workingDir) {
167
+ function runCodexCli(prompt, workingDir, reasoningEffort = 'high') {
168
168
  return new Promise((resolve, reject) => {
169
169
  // Build CLI arguments for non-interactive execution
170
170
  const args = [
171
171
  'exec',
172
172
  '-m', 'gpt-5.2-codex',
173
- '-c', 'model_reasoning_effort=xhigh',
173
+ '-c', `model_reasoning_effort=${reasoningEffort}`,
174
174
  '-c', 'model_reasoning_summary_format=experimental',
175
175
  '--dangerously-bypass-approvals-and-sandbox',
176
176
  '--skip-git-repo-check',
@@ -9,7 +9,7 @@ import { spawn } from 'child_process';
9
9
  import { existsSync } from 'fs';
10
10
  import { build7SectionPrompt, buildDeveloperInstructions, buildRetryPrompt, isValidFeedbackOutput } from '../prompt.js';
11
11
  import { createTimeoutError, createCliNotFoundError, getSuggestion } from '../errors.js';
12
- const TIMEOUT_MS = 180000; // 3 minutes
12
+ const TIMEOUT_MS = 600000; // 10 minutes
13
13
  const MAX_RETRIES = 2;
14
14
  const MAX_BUFFER_SIZE = 1024 * 1024; // 1MB max buffer to prevent memory issues
15
15
  /**
@@ -163,14 +163,16 @@ async function runWithRetry(request, attempt, previousError, previousOutput) {
163
163
  /**
164
164
  * Execute the Gemini CLI in non-interactive mode
165
165
  *
166
- * Uses: gemini -p "<prompt>" --include-directories <workingDir>
166
+ * Uses: gemini --yolo --include-directories <workingDir> "<prompt>"
167
167
  */
168
168
  function runGeminiCli(prompt, workingDir) {
169
169
  return new Promise((resolve, reject) => {
170
170
  // Build CLI arguments for non-interactive execution
171
+ // Use positional prompt (not deprecated -p flag) and --yolo for auto-approval
171
172
  const args = [
172
- '-p', prompt,
173
- '--include-directories', workingDir
173
+ '--yolo',
174
+ '--include-directories', workingDir,
175
+ prompt
174
176
  ];
175
177
  const proc = spawn('gemini', args, {
176
178
  cwd: workingDir,
@@ -9,6 +9,7 @@ export declare const FeedbackInputSchema: z.ZodObject<{
9
9
  analyzedFiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
10
10
  focusAreas: z.ZodOptional<z.ZodArray<z.ZodEnum<["security", "performance", "architecture", "correctness", "maintainability", "scalability", "testing", "documentation"]>, "many">>;
11
11
  customPrompt: z.ZodOptional<z.ZodString>;
12
+ reasoningEffort: z.ZodOptional<z.ZodEnum<["high", "xhigh"]>>;
12
13
  }, "strip", z.ZodTypeAny, {
13
14
  workingDir: string;
14
15
  ccOutput: string;
@@ -16,6 +17,7 @@ export declare const FeedbackInputSchema: z.ZodObject<{
16
17
  analyzedFiles?: string[] | undefined;
17
18
  focusAreas?: ("security" | "performance" | "architecture" | "correctness" | "maintainability" | "scalability" | "testing" | "documentation")[] | undefined;
18
19
  customPrompt?: string | undefined;
20
+ reasoningEffort?: "high" | "xhigh" | undefined;
19
21
  }, {
20
22
  workingDir: string;
21
23
  ccOutput: string;
@@ -23,6 +25,7 @@ export declare const FeedbackInputSchema: z.ZodObject<{
23
25
  analyzedFiles?: string[] | undefined;
24
26
  focusAreas?: ("security" | "performance" | "architecture" | "correctness" | "maintainability" | "scalability" | "testing" | "documentation")[] | undefined;
25
27
  customPrompt?: string | undefined;
28
+ reasoningEffort?: "high" | "xhigh" | undefined;
26
29
  }>;
27
30
  export type FeedbackInput = z.infer<typeof FeedbackInputSchema>;
28
31
  /**
@@ -16,7 +16,8 @@ export const FeedbackInputSchema = z.object({
16
16
  'security', 'performance', 'architecture', 'correctness',
17
17
  'maintainability', 'scalability', 'testing', 'documentation'
18
18
  ])).optional().describe('Areas to focus the review on'),
19
- customPrompt: z.string().optional().describe('Custom instructions for the reviewer')
19
+ customPrompt: z.string().optional().describe('Custom instructions for the reviewer'),
20
+ reasoningEffort: z.enum(['high', 'xhigh']).optional().describe('Codex reasoning effort level (default: high, use xhigh for deeper analysis)')
20
21
  });
21
22
  /**
22
23
  * Convert tool input to FeedbackRequest
@@ -28,7 +29,8 @@ function toFeedbackRequest(input) {
28
29
  outputType: input.outputType,
29
30
  analyzedFiles: input.analyzedFiles,
30
31
  focusAreas: input.focusAreas,
31
- customPrompt: input.customPrompt
32
+ customPrompt: input.customPrompt,
33
+ reasoningEffort: input.reasoningEffort
32
34
  };
33
35
  }
34
36
  /**
package/dist/types.d.ts CHANGED
@@ -4,6 +4,7 @@
4
4
  export type OutputType = 'plan' | 'findings' | 'analysis' | 'proposal';
5
5
  export type FocusArea = 'security' | 'performance' | 'architecture' | 'correctness' | 'maintainability' | 'scalability' | 'testing' | 'documentation';
6
6
  export type CliType = 'codex' | 'gemini';
7
+ export type ReasoningEffort = 'high' | 'xhigh';
7
8
  export interface FeedbackRequest {
8
9
  workingDir: string;
9
10
  ccOutput: string;
@@ -11,6 +12,7 @@ export interface FeedbackRequest {
11
12
  analyzedFiles?: string[];
12
13
  focusAreas?: FocusArea[];
13
14
  customPrompt?: string;
15
+ reasoningEffort?: ReasoningEffort;
14
16
  }
15
17
  export interface FeedbackSuccess {
16
18
  success: true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-reviewer",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "MCP server for Claude Code - Get second-opinion feedback from Codex/Gemini CLIs",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",