@j0hanz/code-review-analyst-mcp 1.6.1 → 1.6.2

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.
@@ -39,6 +39,7 @@ export function getDiff(key = process.cwd()) {
39
39
  const age = Date.now() - new Date(slot.generatedAt).getTime();
40
40
  if (age > diffCacheTtlMs.get()) {
41
41
  diffSlots.delete(key);
42
+ notifyDiffUpdated();
42
43
  return undefined;
43
44
  }
44
45
  return slot;
@@ -121,7 +121,7 @@ export declare const CodeQualityOutputSchema: z.ZodObject<{
121
121
  }, z.core.$strict>>;
122
122
  testsNeeded: z.ZodArray<z.ZodString>;
123
123
  contextualInsights: z.ZodArray<z.ZodString>;
124
- }, z.core.$strip>;
124
+ }, z.core.$strict>;
125
125
  export declare const SearchReplaceBlockSchema: z.ZodObject<{
126
126
  file: z.ZodString;
127
127
  search: z.ZodString;
@@ -151,7 +151,7 @@ export const ReviewSummaryResultSchema = z.strictObject({
151
151
  export const CodeQualityResultSchema = z.strictObject({
152
152
  ...CODE_QUALITY_SHARED_FIELDS,
153
153
  });
154
- export const CodeQualityOutputSchema = z.object({
154
+ export const CodeQualityOutputSchema = z.strictObject({
155
155
  ...CODE_QUALITY_SHARED_FIELDS,
156
156
  totalFindings: z
157
157
  .number()
@@ -6,6 +6,7 @@ import { computeDiffStatsFromFiles, parseDiffFiles, } from '../lib/diff-parser.j
6
6
  import { DIFF_RESOURCE_URI, storeDiff } from '../lib/diff-store.js';
7
7
  import { wrapToolHandler } from '../lib/tool-factory.js';
8
8
  import { createErrorToolResponse, createToolResponse, } from '../lib/tool-response.js';
9
+ import { DefaultOutputSchema } from '../schemas/outputs.js';
9
10
  const GIT_TIMEOUT_MS = 30_000;
10
11
  const GIT_MAX_BUFFER = 10 * 1024 * 1024; // 10 MB
11
12
  const execFileAsync = promisify(execFile);
@@ -35,11 +36,12 @@ export function registerGenerateDiffTool(server) {
35
36
  server.registerTool('generate_diff', {
36
37
  title: 'Generate Diff',
37
38
  description: 'Generate a diff of the current branch working changes and cache it for all review tools. You MUST call this tool before calling any other review tool. Use "unstaged" for working-tree changes not yet staged, or "staged" for changes already added with git add.',
38
- inputSchema: {
39
+ inputSchema: z.strictObject({
39
40
  mode: z
40
41
  .enum(['unstaged', 'staged'])
41
42
  .describe('"unstaged": working-tree changes not yet staged. "staged": changes added to the index with git add.'),
42
- },
43
+ }),
44
+ outputSchema: DefaultOutputSchema,
43
45
  annotations: {
44
46
  readOnlyHint: false,
45
47
  idempotentHint: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@j0hanz/code-review-analyst-mcp",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "mcpName": "io.github.j0hanz/code-review-analyst",
5
5
  "description": "Gemini-powered MCP server for code review analysis.",
6
6
  "type": "module",