@rigstate/mcp 0.7.4 → 0.7.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rigstate/mcp",
3
- "version": "0.7.4",
3
+ "version": "0.7.5",
4
4
  "description": "Rigstate MCP Server - Model Context Protocol for AI Editors",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -7,10 +7,13 @@ import { z } from 'zod';
7
7
  export const QueryGlobalAntidotesSchema = z.object({
8
8
  categories: z.array(z.string()).optional().describe('Filter by categories (SECURITY, ARCHITECTURE, UX, PERFORMANCE, ACCESSIBILITY, MAINTAINABILITY)'),
9
9
  severities: z.array(z.string()).optional().describe('Filter by severity (CRITICAL, HIGH, MEDIUM, LOW)'),
10
- framework_tags: z.array(z.string()).optional().describe('Filter by framework tags (e.g., ["nextjs", "react", "supabase"])'),
11
- min_trust_score: z.number().optional().describe('Minimum trust score (0-100)'),
10
+ framework_tags: z.preprocess(
11
+ (val) => (typeof val === 'string' ? JSON.parse(val) : val),
12
+ z.array(z.string())
13
+ ).optional().describe('Filter by framework tags (e.g., ["nextjs", "react", "supabase"])'),
14
+ min_trust_score: z.coerce.number().optional().describe('Minimum trust score (0-100)'),
12
15
  search_text: z.string().optional().describe('Search in title and instruction'),
13
- limit: z.number().optional().describe('Max results (default: 20)')
16
+ limit: z.coerce.number().optional().describe('Max results (default: 20)')
14
17
  });
15
18
 
16
19
  export const SubmitSignalSchema = z.object({
@@ -21,7 +24,10 @@ export const SubmitSignalSchema = z.object({
21
24
  severity: z.enum(['CRITICAL', 'HIGH', 'MEDIUM', 'LOW']).describe('Severity level'),
22
25
  example: z.string().optional().describe('Good example demonstrating the instruction'),
23
26
  anti_example: z.string().optional().describe('Bad example showing what NOT to do'),
24
- framework_tags: z.array(z.string()).optional().describe('Relevant framework tags'),
27
+ framework_tags: z.preprocess(
28
+ (val) => (typeof val === 'string' ? [val] : val),
29
+ z.array(z.string())
30
+ ).optional().describe('Relevant framework tags'),
25
31
  reasoning: z.string().optional().describe('Why this signal should be added'),
26
32
  source_type: z.string().optional().describe('Internal source type override (e.g. TEACHER_MODE)')
27
33
  });
@@ -7,8 +7,8 @@ import { z } from 'zod';
7
7
  export const QueryBrainInputSchema = z.object({
8
8
  projectId: z.string().uuid('Invalid project ID'),
9
9
  query: z.string().min(1, 'Query is required'),
10
- limit: z.number().min(1).max(20).optional().default(8),
11
- threshold: z.number().min(0).max(1).optional().default(0.1)
10
+ limit: z.coerce.number().min(1).max(20).optional().default(8),
11
+ threshold: z.coerce.number().min(0).max(1).optional().default(0.1)
12
12
  });
13
13
 
14
14
  export const GetProjectContextInputSchema = z.object({
@@ -17,7 +17,7 @@ export const GetProjectContextInputSchema = z.object({
17
17
 
18
18
  export const GetLatestDecisionsInputSchema = z.object({
19
19
  projectId: z.string().uuid('Invalid project ID'),
20
- limit: z.number().min(1).max(10).optional().default(5)
20
+ limit: z.coerce.number().min(1).max(10).optional().default(5)
21
21
  });
22
22
 
23
23
  export const SaveDecisionInputSchema = z.object({
@@ -26,7 +26,7 @@ export const SaveDecisionInputSchema = z.object({
26
26
  decision: z.string().min(1, 'Decision content is required'),
27
27
  rationale: z.string().optional(),
28
28
  category: z.enum(['decision', 'architecture', 'constraint', 'tech_stack', 'design_rule']).optional().default('decision'),
29
- tags: z.array(z.string()).optional().default([])
29
+ tags: z.preprocess((val) => (typeof val === 'string' ? [val] : val), z.array(z.string())).optional().default([])
30
30
  });
31
31
 
32
32
  export const SubmitIdeaInputSchema = z.object({
@@ -34,7 +34,7 @@ export const SubmitIdeaInputSchema = z.object({
34
34
  title: z.string().min(1, 'Title is required').max(200, 'Title too long'),
35
35
  description: z.string().min(1, 'Description is required'),
36
36
  category: z.enum(['feature', 'improvement', 'experiment', 'pivot']).optional().default('feature'),
37
- tags: z.array(z.string()).optional().default([])
37
+ tags: z.preprocess((val) => (typeof val === 'string' ? [val] : val), z.array(z.string())).optional().default([])
38
38
  });
39
39
 
40
40
  export const UpdateRoadmapInputSchema = z.object({
@@ -104,7 +104,7 @@ export const GenerateProfessionalPDFInputSchema = z.object({
104
104
  export const ArchaeologicalScanInputSchema = z.object({
105
105
  projectId: z.string().uuid('Invalid project ID'),
106
106
  gitLog: z.string().describe('Git log output'),
107
- fileTree: z.array(z.string()).describe('File paths')
107
+ fileTree: z.preprocess((val) => (typeof val === 'string' ? [val] : val), z.array(z.string())).describe('File paths')
108
108
  });
109
109
 
110
110
  export const ImportGhostFeaturesInputSchema = z.object({
@@ -124,7 +124,7 @@ export const AuditSecurityIntegrityInputSchema = z.object({
124
124
  projectId: z.string().uuid(),
125
125
  filePath: z.string().min(1),
126
126
  content: z.string().min(1),
127
- rules: z.array(z.string()).optional()
127
+ rules: z.preprocess((val) => (typeof val === 'string' ? [val] : val), z.array(z.string())).optional()
128
128
  });
129
129
 
130
130
  export const QueryProjectBrainInputSchema = QueryBrainInputSchema;
@@ -138,7 +138,7 @@ export const SaveToProjectBrainInputSchema = z.object({
138
138
  title: z.string().min(1),
139
139
  content: z.string().min(1),
140
140
  category: z.enum(['DECISION', 'ARCHITECTURE', 'NOTE', 'LESSON_LEARNED']).default('NOTE'),
141
- tags: z.array(z.string()).optional().default([])
141
+ tags: z.preprocess((val) => (typeof val === 'string' ? [val] : val), z.array(z.string())).optional().default([])
142
142
  });
143
143
 
144
144
  export const UpdateRoadmapStatusInputSchema = z.object({
@@ -174,12 +174,12 @@ export const GenerateCursorRulesInputSchema = z.object({
174
174
 
175
175
  export const AnalyzeDatabasePerformanceInputSchema = z.object({
176
176
  projectId: z.string().uuid(),
177
- filePaths: z.array(z.string())
177
+ filePaths: z.preprocess((val) => (typeof val === 'string' ? [val] : val), z.array(z.string()))
178
178
  });
179
179
 
180
180
  export const AuditIntegrityGateInputSchema = z.object({
181
181
  projectId: z.string().uuid(),
182
- filePaths: z.array(z.string()).optional().default([])
182
+ filePaths: z.preprocess((val) => (typeof val === 'string' ? [val] : val), z.array(z.string())).optional().default([])
183
183
  });
184
184
 
185
185
  export const CompleteRoadmapTaskInputSchema = z.object({