cc-reviewer 1.8.5 → 1.9.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/commands/ask-codex.md +2 -1
- package/commands/ask-multi.md +2 -1
- package/commands/codex-xhigh.md +1 -0
- package/commands/codex.md +7 -1
- package/commands/multi.md +7 -1
- package/dist/adapters/base.d.ts +5 -1
- package/dist/adapters/codex.js +9 -4
- package/dist/schema.d.ts +6 -6
- package/dist/tools/feedback.d.ts +13 -0
- package/dist/tools/feedback.js +13 -1
- package/dist/tools/peer.d.ts +11 -0
- package/dist/tools/peer.js +11 -0
- package/dist/types.d.ts +2 -0
- package/package.json +1 -1
package/commands/ask-codex.md
CHANGED
|
@@ -20,7 +20,8 @@ Call `ask_codex` with:
|
|
|
20
20
|
"prompt": "<your question or request from $ARGUMENTS>",
|
|
21
21
|
"taskType": "<infer from request: plan|debug|explain|question|fix|explore|general>",
|
|
22
22
|
"relevantFiles": ["<files related to the question>"],
|
|
23
|
-
"context": "<any error messages or prior analysis>"
|
|
23
|
+
"context": "<any error messages or prior analysis>",
|
|
24
|
+
"serviceTier": "<if user says 'fast mode'/'fast'/'priority' → 'priority'; if 'flex'/'cheap'/'budget' → 'flex'; otherwise omit>"
|
|
24
25
|
}
|
|
25
26
|
```
|
|
26
27
|
|
package/commands/ask-multi.md
CHANGED
|
@@ -19,7 +19,8 @@ Call `ask_multi` with:
|
|
|
19
19
|
"prompt": "<your question or request from $ARGUMENTS>",
|
|
20
20
|
"taskType": "<infer from request: plan|debug|explain|question|fix|explore|general>",
|
|
21
21
|
"relevantFiles": ["<files related to the question>"],
|
|
22
|
-
"context": "<any error messages or prior analysis>"
|
|
22
|
+
"context": "<any error messages or prior analysis>",
|
|
23
|
+
"serviceTier": "<if user says 'fast mode'/'fast'/'priority' → 'priority'; if 'flex'/'cheap'/'budget' → 'flex'; otherwise omit. Applies to Codex only.>"
|
|
23
24
|
}
|
|
24
25
|
```
|
|
25
26
|
|
package/commands/codex-xhigh.md
CHANGED
|
@@ -18,6 +18,7 @@ Use the `codex_review` MCP tool with `reasoningEffort: "xhigh"` for deeper analy
|
|
|
18
18
|
- `workingDir`: current working directory
|
|
19
19
|
- `ccOutput`: brief summary of recent changes or context
|
|
20
20
|
- `reasoningEffort`: "xhigh" (this is the key difference from /codex)
|
|
21
|
+
- `serviceTier`: if user says "fast mode"/"fast"/"priority" → "priority"; if "flex"/"cheap"/"budget" → "flex"; otherwise omit
|
|
21
22
|
- `focus`: extracted from $ARGUMENTS if it's a known focus area
|
|
22
23
|
- `customInstructions`: $ARGUMENTS if it's custom text
|
|
23
24
|
|
package/commands/codex.md
CHANGED
|
@@ -43,10 +43,16 @@ Call `codex_review` with:
|
|
|
43
43
|
"ccOutput": "<structured handoff - see below>",
|
|
44
44
|
"outputType": "analysis",
|
|
45
45
|
"focusAreas": ["<from $ARGUMENTS>"],
|
|
46
|
-
"reasoningEffort": "high"
|
|
46
|
+
"reasoningEffort": "high",
|
|
47
|
+
"serviceTier": "<see below>"
|
|
47
48
|
}
|
|
48
49
|
```
|
|
49
50
|
|
|
51
|
+
### Service Tier (from $ARGUMENTS)
|
|
52
|
+
- If user says "fast mode", "fast", or "priority" → set `serviceTier: "priority"` (faster, ~2x cost)
|
|
53
|
+
- If user says "flex", "cheap", or "budget" → set `serviceTier: "flex"` (50% cheaper, slower)
|
|
54
|
+
- Otherwise → omit `serviceTier` (uses default tier)
|
|
55
|
+
|
|
50
56
|
### Structure your ccOutput:
|
|
51
57
|
|
|
52
58
|
```
|
package/commands/multi.md
CHANGED
|
@@ -41,10 +41,16 @@ Call `multi_review` with:
|
|
|
41
41
|
"workingDir": "<current directory>",
|
|
42
42
|
"ccOutput": "<structured handoff>",
|
|
43
43
|
"outputType": "analysis",
|
|
44
|
-
"focusAreas": ["<from $ARGUMENTS>"]
|
|
44
|
+
"focusAreas": ["<from $ARGUMENTS>"],
|
|
45
|
+
"serviceTier": "<see below>"
|
|
45
46
|
}
|
|
46
47
|
```
|
|
47
48
|
|
|
49
|
+
### Service Tier (from $ARGUMENTS, applies to Codex only)
|
|
50
|
+
- If user says "fast mode", "fast", or "priority" → set `serviceTier: "priority"`
|
|
51
|
+
- If user says "flex", "cheap", or "budget" → set `serviceTier: "flex"`
|
|
52
|
+
- Otherwise → omit `serviceTier`
|
|
53
|
+
|
|
48
54
|
### Structure your ccOutput:
|
|
49
55
|
|
|
50
56
|
```
|
package/dist/adapters/base.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* changing the core orchestration logic.
|
|
7
7
|
*/
|
|
8
8
|
import { ReviewOutput, PeerOutput } from '../schema.js';
|
|
9
|
-
import { FocusArea, OutputType, ReasoningEffort, TaskType } from '../types.js';
|
|
9
|
+
import { FocusArea, OutputType, ReasoningEffort, ServiceTier, TaskType } from '../types.js';
|
|
10
10
|
export interface ReviewerCapabilities {
|
|
11
11
|
/** Display name for this reviewer */
|
|
12
12
|
name: string;
|
|
@@ -40,6 +40,8 @@ export interface ReviewRequest {
|
|
|
40
40
|
customPrompt?: string;
|
|
41
41
|
/** Reasoning effort level (for models that support it) */
|
|
42
42
|
reasoningEffort?: ReasoningEffort;
|
|
43
|
+
/** Service tier (for models that support it: priority = fast, flex = cheap) */
|
|
44
|
+
serviceTier?: ServiceTier;
|
|
43
45
|
/** Expert role configuration (optional override) */
|
|
44
46
|
expertRole?: ExpertRole;
|
|
45
47
|
}
|
|
@@ -60,6 +62,8 @@ export interface PeerRequest {
|
|
|
60
62
|
customPrompt?: string;
|
|
61
63
|
/** Reasoning effort level (for models that support it) */
|
|
62
64
|
reasoningEffort?: ReasoningEffort;
|
|
65
|
+
/** Service tier (for models that support it: priority = fast, flex = cheap) */
|
|
66
|
+
serviceTier?: ServiceTier;
|
|
63
67
|
}
|
|
64
68
|
export interface ExpertRole {
|
|
65
69
|
name: string;
|
package/dist/adapters/codex.js
CHANGED
|
@@ -90,7 +90,7 @@ export class CodexAdapter {
|
|
|
90
90
|
(previousOutput ? `\nPrevious output (for reference):\n${previousOutput.slice(0, 500)}...` : '');
|
|
91
91
|
}
|
|
92
92
|
// Run the CLI
|
|
93
|
-
const result = await this.runCli(prompt, request.workingDir, request.reasoningEffort || 'high', getReviewOutputJsonSchema);
|
|
93
|
+
const result = await this.runCli(prompt, request.workingDir, request.reasoningEffort || 'high', getReviewOutputJsonSchema, request.serviceTier);
|
|
94
94
|
// Handle CLI errors
|
|
95
95
|
if (result.exitCode !== 0) {
|
|
96
96
|
const error = this.categorizeError(result.stderr);
|
|
@@ -254,7 +254,7 @@ export class CodexAdapter {
|
|
|
254
254
|
`Please fix these issues and provide valid JSON output.\n` +
|
|
255
255
|
(previousOutput ? `\nPrevious output (for reference):\n${previousOutput.slice(0, 500)}...` : '');
|
|
256
256
|
}
|
|
257
|
-
const result = await this.runCli(prompt, request.workingDir, request.reasoningEffort || 'high', getPeerOutputJsonSchema);
|
|
257
|
+
const result = await this.runCli(prompt, request.workingDir, request.reasoningEffort || 'high', getPeerOutputJsonSchema, request.serviceTier);
|
|
258
258
|
if (result.exitCode !== 0) {
|
|
259
259
|
const error = this.categorizeError(result.stderr);
|
|
260
260
|
return {
|
|
@@ -312,7 +312,7 @@ export class CodexAdapter {
|
|
|
312
312
|
executionTimeMs: Date.now() - startTime };
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
|
-
runCli(prompt, workingDir, reasoningEffort, schemaGetter) {
|
|
315
|
+
runCli(prompt, workingDir, reasoningEffort, schemaGetter, serviceTier) {
|
|
316
316
|
return new Promise((resolve, reject) => {
|
|
317
317
|
// Create temp schema file for structured output
|
|
318
318
|
let schemaFile = null;
|
|
@@ -335,6 +335,10 @@ export class CodexAdapter {
|
|
|
335
335
|
'--skip-git-repo-check',
|
|
336
336
|
'-C', workingDir,
|
|
337
337
|
];
|
|
338
|
+
// Add service tier if specified (priority = fast mode, flex = cheap mode)
|
|
339
|
+
if (serviceTier && serviceTier !== 'default') {
|
|
340
|
+
args.push('-c', `service_tier=${serviceTier}`);
|
|
341
|
+
}
|
|
338
342
|
// Add schema enforcement if available
|
|
339
343
|
if (schemaFile) {
|
|
340
344
|
args.push('--output-schema', schemaFile);
|
|
@@ -363,7 +367,8 @@ export class CodexAdapter {
|
|
|
363
367
|
let lastProgressTime = cliStartTime;
|
|
364
368
|
let dataChunks = 0;
|
|
365
369
|
// Show initial progress message
|
|
366
|
-
|
|
370
|
+
const tierLabel = serviceTier && serviceTier !== 'default' ? ` [${serviceTier}]` : '';
|
|
371
|
+
console.error(`[codex] Running review with ${reasoningEffort} reasoning${tierLabel}...`);
|
|
367
372
|
const maxTimer = setTimeout(() => {
|
|
368
373
|
proc.kill('SIGTERM');
|
|
369
374
|
reject(new Error('MAX_TIMEOUT'));
|
package/dist/schema.d.ts
CHANGED
|
@@ -651,13 +651,13 @@ export declare const SuggestedAction: z.ZodObject<{
|
|
|
651
651
|
rationale: z.ZodString;
|
|
652
652
|
}, "strip", z.ZodTypeAny, {
|
|
653
653
|
rationale: string;
|
|
654
|
-
action: string;
|
|
655
654
|
priority: "high" | "medium" | "low";
|
|
655
|
+
action: string;
|
|
656
656
|
file?: string | null | undefined;
|
|
657
657
|
}, {
|
|
658
658
|
rationale: string;
|
|
659
|
-
action: string;
|
|
660
659
|
priority: "high" | "medium" | "low";
|
|
660
|
+
action: string;
|
|
661
661
|
file?: string | null | undefined;
|
|
662
662
|
}>;
|
|
663
663
|
export type SuggestedAction = z.infer<typeof SuggestedAction>;
|
|
@@ -688,13 +688,13 @@ export declare const PeerOutput: z.ZodObject<{
|
|
|
688
688
|
rationale: z.ZodString;
|
|
689
689
|
}, "strip", z.ZodTypeAny, {
|
|
690
690
|
rationale: string;
|
|
691
|
-
action: string;
|
|
692
691
|
priority: "high" | "medium" | "low";
|
|
692
|
+
action: string;
|
|
693
693
|
file?: string | null | undefined;
|
|
694
694
|
}, {
|
|
695
695
|
rationale: string;
|
|
696
|
-
action: string;
|
|
697
696
|
priority: "high" | "medium" | "low";
|
|
697
|
+
action: string;
|
|
698
698
|
file?: string | null | undefined;
|
|
699
699
|
}>, "many">;
|
|
700
700
|
file_references: z.ZodArray<z.ZodObject<{
|
|
@@ -752,8 +752,8 @@ export declare const PeerOutput: z.ZodObject<{
|
|
|
752
752
|
key_points: string[];
|
|
753
753
|
suggested_actions: {
|
|
754
754
|
rationale: string;
|
|
755
|
-
action: string;
|
|
756
755
|
priority: "high" | "medium" | "low";
|
|
756
|
+
action: string;
|
|
757
757
|
file?: string | null | undefined;
|
|
758
758
|
}[];
|
|
759
759
|
file_references: {
|
|
@@ -780,8 +780,8 @@ export declare const PeerOutput: z.ZodObject<{
|
|
|
780
780
|
key_points: string[];
|
|
781
781
|
suggested_actions: {
|
|
782
782
|
rationale: string;
|
|
783
|
-
action: string;
|
|
784
783
|
priority: "high" | "medium" | "low";
|
|
784
|
+
action: string;
|
|
785
785
|
file?: string | null | undefined;
|
|
786
786
|
}[];
|
|
787
787
|
file_references: {
|
package/dist/tools/feedback.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export declare const ReviewInputSchema: z.ZodObject<{
|
|
|
14
14
|
focusAreas: z.ZodOptional<z.ZodArray<z.ZodEnum<["security", "performance", "architecture", "correctness", "maintainability", "scalability", "testing", "documentation"]>, "many">>;
|
|
15
15
|
customPrompt: z.ZodOptional<z.ZodString>;
|
|
16
16
|
reasoningEffort: z.ZodOptional<z.ZodEnum<["high", "xhigh"]>>;
|
|
17
|
+
serviceTier: z.ZodOptional<z.ZodEnum<["default", "priority", "flex"]>>;
|
|
17
18
|
}, "strip", z.ZodTypeAny, {
|
|
18
19
|
workingDir: string;
|
|
19
20
|
ccOutput: string;
|
|
@@ -22,6 +23,7 @@ export declare const ReviewInputSchema: z.ZodObject<{
|
|
|
22
23
|
customPrompt?: string | undefined;
|
|
23
24
|
analyzedFiles?: string[] | undefined;
|
|
24
25
|
reasoningEffort?: "high" | "xhigh" | undefined;
|
|
26
|
+
serviceTier?: "default" | "priority" | "flex" | undefined;
|
|
25
27
|
}, {
|
|
26
28
|
workingDir: string;
|
|
27
29
|
ccOutput: string;
|
|
@@ -30,6 +32,7 @@ export declare const ReviewInputSchema: z.ZodObject<{
|
|
|
30
32
|
customPrompt?: string | undefined;
|
|
31
33
|
analyzedFiles?: string[] | undefined;
|
|
32
34
|
reasoningEffort?: "high" | "xhigh" | undefined;
|
|
35
|
+
serviceTier?: "default" | "priority" | "flex" | undefined;
|
|
33
36
|
}>;
|
|
34
37
|
export type ReviewInput = z.infer<typeof ReviewInputSchema>;
|
|
35
38
|
export declare function handleCodexReview(input: ReviewInput): Promise<{
|
|
@@ -94,6 +97,11 @@ export declare const TOOL_DEFINITIONS: {
|
|
|
94
97
|
enum: string[];
|
|
95
98
|
description: string;
|
|
96
99
|
};
|
|
100
|
+
serviceTier: {
|
|
101
|
+
type: string;
|
|
102
|
+
enum: string[];
|
|
103
|
+
description: string;
|
|
104
|
+
};
|
|
97
105
|
};
|
|
98
106
|
required: string[];
|
|
99
107
|
};
|
|
@@ -178,6 +186,11 @@ export declare const TOOL_DEFINITIONS: {
|
|
|
178
186
|
type: string;
|
|
179
187
|
description: string;
|
|
180
188
|
};
|
|
189
|
+
serviceTier: {
|
|
190
|
+
type: string;
|
|
191
|
+
enum: string[];
|
|
192
|
+
description: string;
|
|
193
|
+
};
|
|
181
194
|
};
|
|
182
195
|
required: string[];
|
|
183
196
|
};
|
package/dist/tools/feedback.js
CHANGED
|
@@ -20,7 +20,8 @@ export const ReviewInputSchema = z.object({
|
|
|
20
20
|
'maintainability', 'scalability', 'testing', 'documentation'
|
|
21
21
|
])).optional().describe('Areas to focus the review on'),
|
|
22
22
|
customPrompt: z.string().optional().describe('Custom instructions for the reviewer'),
|
|
23
|
-
reasoningEffort: z.enum(['high', 'xhigh']).optional().describe('Codex reasoning effort level (default: high, use xhigh for deeper analysis)')
|
|
23
|
+
reasoningEffort: z.enum(['high', 'xhigh']).optional().describe('Codex reasoning effort level (default: high, use xhigh for deeper analysis)'),
|
|
24
|
+
serviceTier: z.enum(['default', 'priority', 'flex']).optional().describe('Codex service tier (default: default, priority = fast mode, flex = cheaper/slower)')
|
|
24
25
|
});
|
|
25
26
|
// =============================================================================
|
|
26
27
|
// HELPER FUNCTIONS
|
|
@@ -34,6 +35,7 @@ function toReviewRequest(input) {
|
|
|
34
35
|
focusAreas: input.focusAreas,
|
|
35
36
|
customPrompt: input.customPrompt,
|
|
36
37
|
reasoningEffort: input.reasoningEffort,
|
|
38
|
+
serviceTier: input.serviceTier,
|
|
37
39
|
};
|
|
38
40
|
}
|
|
39
41
|
function formatSingleReviewResponse(result, modelName) {
|
|
@@ -338,6 +340,11 @@ export const TOOL_DEFINITIONS = {
|
|
|
338
340
|
type: 'string',
|
|
339
341
|
enum: ['high', 'xhigh'],
|
|
340
342
|
description: 'Codex reasoning effort (default: high, use xhigh for deeper analysis)'
|
|
343
|
+
},
|
|
344
|
+
serviceTier: {
|
|
345
|
+
type: 'string',
|
|
346
|
+
enum: ['default', 'priority', 'flex'],
|
|
347
|
+
description: 'Codex service tier (priority = fast mode, flex = cheaper/slower)'
|
|
341
348
|
}
|
|
342
349
|
},
|
|
343
350
|
required: ['workingDir', 'ccOutput', 'outputType']
|
|
@@ -418,6 +425,11 @@ export const TOOL_DEFINITIONS = {
|
|
|
418
425
|
customPrompt: {
|
|
419
426
|
type: 'string',
|
|
420
427
|
description: 'Custom instructions for the reviewer'
|
|
428
|
+
},
|
|
429
|
+
serviceTier: {
|
|
430
|
+
type: 'string',
|
|
431
|
+
enum: ['default', 'priority', 'flex'],
|
|
432
|
+
description: 'Codex service tier (priority = fast mode, flex = cheaper/slower). Only applies to Codex.'
|
|
421
433
|
}
|
|
422
434
|
},
|
|
423
435
|
required: ['workingDir', 'ccOutput', 'outputType']
|
package/dist/tools/peer.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export type PeerInput = {
|
|
|
16
16
|
focusAreas?: string[];
|
|
17
17
|
customPrompt?: string;
|
|
18
18
|
reasoningEffort?: 'high' | 'xhigh';
|
|
19
|
+
serviceTier?: 'default' | 'priority' | 'flex';
|
|
19
20
|
};
|
|
20
21
|
export declare function formatPeerResponse(result: PeerResult, modelName: string): string;
|
|
21
22
|
export declare function handleAskCodex(input: PeerInput): Promise<{
|
|
@@ -84,6 +85,11 @@ export declare const PEER_TOOL_DEFINITIONS: {
|
|
|
84
85
|
enum: string[];
|
|
85
86
|
description: string;
|
|
86
87
|
};
|
|
88
|
+
serviceTier: {
|
|
89
|
+
type: string;
|
|
90
|
+
enum: string[];
|
|
91
|
+
description: string;
|
|
92
|
+
};
|
|
87
93
|
};
|
|
88
94
|
required: string[];
|
|
89
95
|
};
|
|
@@ -176,6 +182,11 @@ export declare const PEER_TOOL_DEFINITIONS: {
|
|
|
176
182
|
type: string;
|
|
177
183
|
description: string;
|
|
178
184
|
};
|
|
185
|
+
serviceTier: {
|
|
186
|
+
type: string;
|
|
187
|
+
enum: string[];
|
|
188
|
+
description: string;
|
|
189
|
+
};
|
|
179
190
|
};
|
|
180
191
|
required: string[];
|
|
181
192
|
};
|
package/dist/tools/peer.js
CHANGED
|
@@ -20,6 +20,7 @@ function toPeerRequest(input) {
|
|
|
20
20
|
focusAreas: input.focusAreas,
|
|
21
21
|
customPrompt: input.customPrompt,
|
|
22
22
|
reasoningEffort: input.reasoningEffort,
|
|
23
|
+
serviceTier: input.serviceTier,
|
|
23
24
|
};
|
|
24
25
|
}
|
|
25
26
|
export function formatPeerResponse(result, modelName) {
|
|
@@ -241,6 +242,11 @@ export const PEER_TOOL_DEFINITIONS = {
|
|
|
241
242
|
enum: ['high', 'xhigh'],
|
|
242
243
|
description: 'Codex reasoning effort (default: high)',
|
|
243
244
|
},
|
|
245
|
+
serviceTier: {
|
|
246
|
+
type: 'string',
|
|
247
|
+
enum: ['default', 'priority', 'flex'],
|
|
248
|
+
description: 'Codex service tier (priority = fast mode, flex = cheaper/slower)',
|
|
249
|
+
},
|
|
244
250
|
},
|
|
245
251
|
required: ['workingDir', 'prompt'],
|
|
246
252
|
},
|
|
@@ -329,6 +335,11 @@ export const PEER_TOOL_DEFINITIONS = {
|
|
|
329
335
|
type: 'string',
|
|
330
336
|
description: 'Additional instructions for the peer',
|
|
331
337
|
},
|
|
338
|
+
serviceTier: {
|
|
339
|
+
type: 'string',
|
|
340
|
+
enum: ['default', 'priority', 'flex'],
|
|
341
|
+
description: 'Codex service tier (priority = fast mode, flex = cheaper/slower). Only applies to Codex.',
|
|
342
|
+
},
|
|
332
343
|
},
|
|
333
344
|
required: ['workingDir', 'prompt'],
|
|
334
345
|
},
|
package/dist/types.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ 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
7
|
export type ReasoningEffort = 'high' | 'xhigh';
|
|
8
|
+
export type ServiceTier = 'default' | 'priority' | 'flex';
|
|
8
9
|
export type TaskType = 'plan' | 'debug' | 'explain' | 'question' | 'fix' | 'explore' | 'general';
|
|
9
10
|
export interface FeedbackRequest {
|
|
10
11
|
workingDir: string;
|
|
@@ -14,6 +15,7 @@ export interface FeedbackRequest {
|
|
|
14
15
|
focusAreas?: FocusArea[];
|
|
15
16
|
customPrompt?: string;
|
|
16
17
|
reasoningEffort?: ReasoningEffort;
|
|
18
|
+
serviceTier?: ServiceTier;
|
|
17
19
|
}
|
|
18
20
|
export interface FeedbackSuccess {
|
|
19
21
|
success: true;
|