@magic-ingredients/tiny-brain-local 0.14.19 → 0.15.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.
@@ -44,6 +44,7 @@ export interface AnalyseResult {
44
44
  recommendations?: AgentRecommendations | null;
45
45
  prdInitialized?: boolean;
46
46
  adrInitialized?: boolean;
47
+ qualityInitialized?: boolean;
47
48
  gitHooksInstalled?: boolean;
48
49
  contextBlockVersion?: string;
49
50
  contextBlockUpdated?: boolean;
@@ -114,6 +115,11 @@ export declare class AnalyseService {
114
115
  * @returns true if skill was installed or updated
115
116
  */
116
117
  private initializeADRSkill;
118
+ /**
119
+ * Initialize Quality skill in .claude/skills/
120
+ * @returns true if skill was installed or updated
121
+ */
122
+ private initializeQualitySkill;
117
123
  /**
118
124
  * Initialize git hooks for TDD workflow
119
125
  * Copies hook templates to .git/hooks/ if not already present
@@ -1 +1 @@
1
- {"version":3,"file":"analyse-service.d.ts","sourceRoot":"","sources":["../../src/services/analyse-service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAEL,KAAK,YAAY,EAEjB,KAAK,aAAa,EAInB,MAAM,oCAAoC,CAAC;AAW5C,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,MAAM,CAA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AsChC;;OAEG;YACW,2BAA2B;IAyDzC;;OAEG;IACH,oBAAoB,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM;IA8JnD;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAsC7B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAW5B;;;OAGG;IACH,iBAAiB,CAAC,gBAAgB,EAAE,YAAY,GAAG,IAAI,EAAE,eAAe,EAAE,YAAY,GAAG,aAAa;IA8BtG;;;OAGG;IACG,kBAAkB,CACtB,eAAe,EAAE,oBAAoB,EACrC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,KAAK,OAAO,CAAC,MAAM,CAAC,GACnG,OAAO,CAAC,cAAc,CAAC;IA0E1B;;;;;OAKG;IACH,OAAO,CAAC,oBAAoB;IAY5B;;;;;OAKG;IACH,OAAO,CAAC,eAAe;CAWxB"}
@@ -42,6 +42,8 @@ export class AnalyseService {
42
42
  const prdInitialized = await this.initializeSDDSkills();
43
43
  // Initialize ADR skill if enabled
44
44
  const adrInitialized = await this.initializeADRSkill();
45
+ // Initialize Quality skill if enabled
46
+ const qualityInitialized = await this.initializeQualitySkill();
45
47
  // Initialize git hooks for TDD workflow
46
48
  const gitHooksInstalled = await this.initializeGitHooks();
47
49
  // Check if repository is already initialized by reading existing context
@@ -72,6 +74,7 @@ export class AnalyseService {
72
74
  recommendations,
73
75
  prdInitialized,
74
76
  adrInitialized,
77
+ qualityInitialized,
75
78
  gitHooksInstalled,
76
79
  contextBlockVersion,
77
80
  contextBlockUpdated
@@ -92,6 +95,7 @@ export class AnalyseService {
92
95
  recommendations,
93
96
  prdInitialized,
94
97
  adrInitialized,
98
+ qualityInitialized,
95
99
  gitHooksInstalled,
96
100
  contextBlockVersion,
97
101
  contextBlockUpdated
@@ -112,6 +116,7 @@ export class AnalyseService {
112
116
  recommendations,
113
117
  prdInitialized,
114
118
  adrInitialized,
119
+ qualityInitialized,
115
120
  gitHooksInstalled,
116
121
  contextBlockVersion,
117
122
  contextBlockUpdated
@@ -129,6 +134,7 @@ export class AnalyseService {
129
134
  recommendations,
130
135
  prdInitialized,
131
136
  adrInitialized,
137
+ qualityInitialized,
132
138
  gitHooksInstalled,
133
139
  contextBlockVersion,
134
140
  contextBlockUpdated,
@@ -319,6 +325,41 @@ export class AnalyseService {
319
325
  return false;
320
326
  }
321
327
  }
328
+ /**
329
+ * Initialize Quality skill in .claude/skills/
330
+ * @returns true if skill was installed or updated
331
+ */
332
+ async initializeQualitySkill() {
333
+ try {
334
+ // Check if Quality is enabled
335
+ const enableQuality = await this.configService.isQualityEnabled();
336
+ if (!enableQuality) {
337
+ this.context.logger.debug('Quality disabled, skipping Quality skill initialization');
338
+ return false;
339
+ }
340
+ const repoRoot = process.cwd();
341
+ const skillsDir = join(repoRoot, '.claude', 'skills');
342
+ // Find the source directories in the installed package
343
+ const __filename = fileURLToPath(import.meta.url);
344
+ const __dirname = dirname(__filename);
345
+ const srcSkillsDir = join(__dirname, '..', '..', 'skills');
346
+ // Verify source directories exist
347
+ if (!existsSync(srcSkillsDir)) {
348
+ this.context.logger.warn(`Skills source not found at ${srcSkillsDir}, skipping Quality skill initialization`);
349
+ return false;
350
+ }
351
+ // Quality skill has multiple templates
352
+ const installed = await this.installSkill('quality', ['quality_criteria.md', 'quality_process.md', 'template.md'], skillsDir, srcSkillsDir, join(srcSkillsDir, 'quality', 'templates'));
353
+ if (installed) {
354
+ this.context.logger.info('āœ… Quality skill initialized at .claude/skills/quality/');
355
+ }
356
+ return installed;
357
+ }
358
+ catch (error) {
359
+ this.context.logger.warn(`Failed to initialize Quality skill: ${error instanceof Error ? error.message : 'Unknown error'}`);
360
+ return false;
361
+ }
362
+ }
322
363
  /**
323
364
  * Initialize git hooks for TDD workflow
324
365
  * Copies hook templates to .git/hooks/ if not already present
@@ -529,6 +570,11 @@ export class AnalyseService {
529
570
  lines.push('\nšŸ“ ADR Structure: Initialized');
530
571
  lines.push(' Created docs/adr/ with templates, example, and README');
531
572
  }
573
+ // Show Quality initialization status
574
+ if (result.qualityInitialized) {
575
+ lines.push('\nšŸ“Š Quality Analysis: Initialized');
576
+ lines.push(' Created .claude/skills/quality/ with criteria and process templates');
577
+ }
532
578
  // Show git hooks initialization status
533
579
  if (result.gitHooksInstalled) {
534
580
  lines.push('\nšŸŖ Git Hooks: Installed');
@@ -1 +1 @@
1
- {"version":3,"file":"repo-service.d.ts","sourceRoot":"","sources":["../../src/services/repo-service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAA0B,KAAK,aAAa,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAC/G,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAGlE,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,SAAS;IACxB,WAAW,EAAE,YAAY,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,QAAS,SAAQ,YAAY;IAC5C,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE;QACN,CAAC,QAAQ,EAAE,MAAM,GAAG;YAClB,MAAM,EAAE,MAAM,EA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AqB;IAwB7B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAkB3B;;;OAGG;YACW,wBAAwB;IAqLtC;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAKxB;;OAEG;IACH,OAAO,CAAC,6BAA6B;CA2CtC"}
@@ -1221,6 +1221,19 @@ export class RepoService {
1221
1221
  section += `- Location: \`docs/adr/NNNN-decision-title.md\`\n`;
1222
1222
  section += `- Use \`/adr\` skill to create ADRs\n`;
1223
1223
  section += `- Skill and template at \`.claude/skills/adr/\`\n\n`;
1224
+ }
1225
+ // Check if Quality is enabled before showing Quality-related content
1226
+ const enableQuality = await this.configService.isQualityEnabled();
1227
+ if (enableQuality) {
1228
+ section += '**Code Quality Analysis:**\n';
1229
+ section += `- Use \`/quality\` skill to run comprehensive quality analysis\n`;
1230
+ section += `- Runs parallel analysis across 8 quality categories\n`;
1231
+ section += `- Categories: Security (15pts), Reliability (10pts), Performance (10pts), Maintainability (5pts), Testing (5pts), Architecture (5pts), Documentation (3pts), Operations (3pts)\n`;
1232
+ section += `- Grades: A (90-100), B (80-89), C (70-79), D (60-69), F (<60)\n`;
1233
+ section += `- Run history stored in \`docs/quality/runs/\`\n`;
1234
+ section += `- Skill and templates at \`.claude/skills/quality/\`\n\n`;
1235
+ }
1236
+ if (hasADR && enableADR) {
1224
1237
  section += '**PRD Commit Workflow:**\n\n';
1225
1238
  section += 'After committing PRD-tracked code, ALWAYS check for ADR suggestions:\n\n';
1226
1239
  section += '1. After successful git commit (via Bash tool)\n';
@@ -0,0 +1,20 @@
1
+ /**
2
+ * QualityTool - MCP interface for quality analysis persistence
3
+ *
4
+ * Provides save, history, and details operations for quality runs.
5
+ * Analysis is performed by agents; this tool only handles persistence.
6
+ */
7
+ import { type ToolResult } from '../index.js';
8
+ import type { RequestContext } from '../../types/request-context.js';
9
+ import { Tool as MCPTool } from '@modelcontextprotocol/sdk/types.js';
10
+ /**
11
+ * MCP Tool for quality analysis persistence
12
+ */
13
+ export declare class QualityTool {
14
+ static getToolDefinition(): MCPTool;
15
+ static execute(args: Record<string, unknown>, context: RequestContext): Promise<ToolResult>;
16
+ private static handleSave;
17
+ private static handleHistory;
18
+ private static handleDetails;
19
+ }
20
+ //# sourceMappingURL=quality.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quality.tool.d.ts","sourceRoot":"","sources":["../../../src/tools/quality/quality.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAA0C,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AACtF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAiCrE;;GAEG;AACH,qBAAa,WAAW;IACtB,MAAM,CAAC,iBAAiB,IAAI,OAAO;WA4EtB,OAAO,CAClB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,UAAU,CAAC;mBAgCD,UAAU;mBAqCV,aAAa;mBA2Bb,aAAa;CA0EnC"}
@@ -0,0 +1,246 @@
1
+ /**
2
+ * QualityTool - MCP interface for quality analysis persistence
3
+ *
4
+ * Provides save, history, and details operations for quality runs.
5
+ * Analysis is performed by agents; this tool only handles persistence.
6
+ */
7
+ import { z } from 'zod';
8
+ import { createSuccessResult, createErrorResult } from '../index.js';
9
+ import { QualityService, QualityIssueSchema, SaveQualityRunInputSchema, } from '@magic-ingredients/tiny-brain-core';
10
+ /**
11
+ * Zod schema for QualityTool arguments
12
+ */
13
+ const QualityArgsSchema = z.object({
14
+ operation: z.enum(['save', 'history', 'details']),
15
+ // For 'save' operation
16
+ score: z.number().min(0).max(100).optional(),
17
+ grade: z.enum(['A', 'B', 'C', 'D', 'F']).optional(),
18
+ issues: z.array(QualityIssueSchema).optional(),
19
+ recommendations: z.array(z.string()).optional(),
20
+ context: z
21
+ .object({
22
+ languages: z.array(z.string()).optional(),
23
+ frameworks: z.array(z.string()).optional(),
24
+ projectType: z.string().optional(),
25
+ })
26
+ .optional(),
27
+ // For 'history' operation
28
+ limit: z.number().min(1).optional(),
29
+ // For 'details' operation
30
+ runId: z.string().optional(),
31
+ });
32
+ /**
33
+ * MCP Tool for quality analysis persistence
34
+ */
35
+ export class QualityTool {
36
+ static getToolDefinition() {
37
+ return {
38
+ name: 'quality',
39
+ description: `šŸ“Š QUALITY ANALYSIS PERSISTENCE šŸ“Š
40
+
41
+ Persists and retrieves quality analysis results. Analysis is performed by agents; this tool handles storage only.
42
+
43
+ āœ… OPERATIONS:
44
+ • save: Persist a quality run to docs/quality/runs/
45
+ • history: List previous quality runs with summary data
46
+ • details: Get full details for a specific run by ID
47
+
48
+ šŸ’” WORKFLOW:
49
+ 1. Quality-coordinator agent performs analysis
50
+ 2. Agent calls quality save with score, grade, issues, recommendations
51
+ 3. Results stored as markdown in docs/quality/runs/YYYY-MM-DD-quality.md
52
+ 4. Use history/details to retrieve past runs`,
53
+ inputSchema: {
54
+ type: 'object',
55
+ properties: {
56
+ operation: {
57
+ type: 'string',
58
+ enum: ['save', 'history', 'details'],
59
+ description: 'The quality operation to perform',
60
+ },
61
+ // For 'save' operation
62
+ score: {
63
+ type: 'number',
64
+ description: 'Quality score from 0-100 (required for save)',
65
+ },
66
+ grade: {
67
+ type: 'string',
68
+ enum: ['A', 'B', 'C', 'D', 'F'],
69
+ description: 'Quality grade A-F (required for save)',
70
+ },
71
+ issues: {
72
+ type: 'array',
73
+ description: 'Array of quality issues found (required for save)',
74
+ items: {
75
+ type: 'object',
76
+ properties: {
77
+ category: { type: 'string' },
78
+ severity: { type: 'string' },
79
+ file: { type: 'string' },
80
+ line: { type: 'number' },
81
+ message: { type: 'string' },
82
+ suggestion: { type: 'string' },
83
+ },
84
+ required: ['category', 'severity', 'file', 'message'],
85
+ },
86
+ },
87
+ recommendations: {
88
+ type: 'array',
89
+ description: 'Array of improvement recommendations',
90
+ items: { type: 'string' },
91
+ },
92
+ context: {
93
+ type: 'object',
94
+ description: 'Repository context (languages, frameworks, etc.)',
95
+ },
96
+ // For 'history' operation
97
+ limit: {
98
+ type: 'number',
99
+ description: 'Maximum number of runs to return (optional for history)',
100
+ },
101
+ // For 'details' operation
102
+ runId: {
103
+ type: 'string',
104
+ description: 'Run ID to get details for (required for details)',
105
+ },
106
+ },
107
+ required: ['operation'],
108
+ },
109
+ };
110
+ }
111
+ static async execute(args, context) {
112
+ try {
113
+ const validatedArgs = QualityArgsSchema.parse(args);
114
+ // Require repository root for all operations
115
+ if (!context.repositoryRoot) {
116
+ return createErrorResult('Repository root not found. Quality tool requires a git repository context.');
117
+ }
118
+ const service = new QualityService(context.repositoryRoot);
119
+ switch (validatedArgs.operation) {
120
+ case 'save':
121
+ return await QualityTool.handleSave(validatedArgs, service);
122
+ case 'history':
123
+ return await QualityTool.handleHistory(validatedArgs, service);
124
+ case 'details':
125
+ return await QualityTool.handleDetails(validatedArgs, service);
126
+ default:
127
+ return createErrorResult(`Unknown operation: ${validatedArgs.operation}`);
128
+ }
129
+ }
130
+ catch (error) {
131
+ if (error instanceof z.ZodError) {
132
+ const fieldErrors = error.errors.map((e) => `${e.path.join('.')}: ${e.message}`);
133
+ return createErrorResult(`Invalid arguments: ${fieldErrors.join(', ')}`);
134
+ }
135
+ return createErrorResult(error instanceof Error ? error.message : 'Unknown error occurred');
136
+ }
137
+ }
138
+ static async handleSave(args, service) {
139
+ // Validate required fields for save
140
+ if (args.score === undefined) {
141
+ return createErrorResult('score is required for save operation');
142
+ }
143
+ if (!args.grade) {
144
+ return createErrorResult('grade is required for save operation');
145
+ }
146
+ // Build the save input
147
+ const saveInput = SaveQualityRunInputSchema.parse({
148
+ score: args.score,
149
+ grade: args.grade,
150
+ issues: args.issues || [],
151
+ recommendations: args.recommendations || [],
152
+ context: args.context,
153
+ });
154
+ const result = await service.saveRunResult(saveInput);
155
+ const response = [
156
+ 'āœ… Quality run saved successfully!',
157
+ '',
158
+ `šŸ“Š Run ID: ${result.runId}`,
159
+ `šŸ“ File: ${result.filePath}`,
160
+ `šŸ“ˆ Score: ${args.score}/100 (Grade: ${args.grade})`,
161
+ `šŸ” Issues: ${args.issues?.length || 0}`,
162
+ '',
163
+ 'Use "quality history" to see all runs.',
164
+ ].join('\n');
165
+ return createSuccessResult(response);
166
+ }
167
+ static async handleHistory(args, service) {
168
+ const runs = await service.getPreviousRuns(args.limit);
169
+ if (runs.length === 0) {
170
+ return createSuccessResult('No quality runs found.\n\nRun a quality analysis first to create history.');
171
+ }
172
+ const lines = ['šŸ“Š Quality Run History', ''];
173
+ for (const run of runs) {
174
+ const gradeEmoji = run.grade === 'A' ? '🌟' : run.grade === 'F' ? 'āŒ' : 'šŸ“‹';
175
+ lines.push(`${gradeEmoji} **${run.date}** - Score: ${run.score}/100 (${run.grade})`);
176
+ lines.push(` Run ID: ${run.runId}`);
177
+ lines.push(` Issues: ${run.issueCount}`);
178
+ lines.push('');
179
+ }
180
+ lines.push('Use "quality details runId=<id>" to see full details.');
181
+ return createSuccessResult(lines.join('\n'));
182
+ }
183
+ static async handleDetails(args, service) {
184
+ if (!args.runId) {
185
+ return createErrorResult('runId is required for details operation');
186
+ }
187
+ const run = await service.getRunDetails(args.runId);
188
+ if (!run) {
189
+ return createErrorResult(`Quality run not found: ${args.runId}`);
190
+ }
191
+ const lines = [
192
+ `šŸ“Š Quality Run Details: ${run.runId}`,
193
+ '',
194
+ '## Summary',
195
+ `**Date:** ${run.date}`,
196
+ `**Score:** ${run.score}/100`,
197
+ `**Grade:** ${run.grade}`,
198
+ `**Issues:** ${run.issues.length}`,
199
+ '',
200
+ ];
201
+ // Issues by category
202
+ if (run.issues.length > 0) {
203
+ lines.push('## Issues by Category');
204
+ for (const [category, count] of Object.entries(run.issuesByCategory)) {
205
+ if (count > 0) {
206
+ lines.push(`- ${category}: ${count}`);
207
+ }
208
+ }
209
+ lines.push('');
210
+ // Issue details
211
+ lines.push('## Issue Details');
212
+ for (const issue of run.issues) {
213
+ const location = issue.line ? `${issue.file}:${issue.line}` : issue.file;
214
+ lines.push(`- **[${issue.severity}]** ${issue.message}`);
215
+ lines.push(` - Category: ${issue.category}`);
216
+ lines.push(` - Location: \`${location}\``);
217
+ if (issue.suggestion) {
218
+ lines.push(` - Suggestion: ${issue.suggestion}`);
219
+ }
220
+ }
221
+ lines.push('');
222
+ }
223
+ // Recommendations
224
+ if (run.recommendations.length > 0) {
225
+ lines.push('## Recommendations');
226
+ for (const rec of run.recommendations) {
227
+ lines.push(`- ${rec}`);
228
+ }
229
+ lines.push('');
230
+ }
231
+ // Context
232
+ if (run.context) {
233
+ lines.push('## Repository Context');
234
+ if (run.context.languages?.length) {
235
+ lines.push(`- Languages: ${run.context.languages.join(', ')}`);
236
+ }
237
+ if (run.context.frameworks?.length) {
238
+ lines.push(`- Frameworks: ${run.context.frameworks.join(', ')}`);
239
+ }
240
+ if (run.context.projectType) {
241
+ lines.push(`- Project Type: ${run.context.projectType}`);
242
+ }
243
+ }
244
+ return createSuccessResult(lines.join('\n'));
245
+ }
246
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"tool-registry.d.ts","sourceRoot":"","sources":["../../src/tools/tool-registry.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAYH,OAAO,KAAK,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,qBAAa,YAAY;IACvB;;OAEG;IACH,MAAM,CAAC,QAAQ,IAAI,OAAO,EAAE;IA8B5B;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;CAiB9D;AAGD,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,8BAAqC,CAAC;AAChF,eAAO,MAAM,eAAe,gBAAyD,CAAC"}
1
+ {"version":3,"file":"tool-registry.d.ts","sourceRoot":"","sources":["../../src/tools/tool-registry.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAaH,OAAO,KAAK,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,qBAAa,YAAY;IACvB;;OAEG;IACH,MAAM,CAAC,QAAQ,IAAI,OAAO,EAAE;IAiC5B;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;CAkB9D;AAGD,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,8BAAqC,CAAC;AAChF,eAAO,MAAM,eAAe,gBAAyD,CAAC"}
@@ -13,6 +13,7 @@ import { UpdateTool } from './update/update.tool.js';
13
13
  import { ThinkingTool } from './thinking/thinking.tool.js';
14
14
  import { StrategyTool } from './strategy/strategy.tool.js';
15
15
  import { AnalyseTool } from './analyse.tool.js';
16
+ import { QualityTool } from './quality/quality.tool.js';
16
17
  export class ToolRegistry {
17
18
  /**
18
19
  * Get all available tool definitions from all tools
@@ -30,6 +31,8 @@ export class ToolRegistry {
30
31
  // ThinkingTool.getToolDefinition(),
31
32
  // Analyse tool
32
33
  AnalyseTool.getToolDefinition(),
34
+ // Quality tool
35
+ QualityTool.getToolDefinition(),
33
36
  // Response tools (disabled for later release)
34
37
  // AnalyseRequestTool.getToolDefinition(),
35
38
  // ValidateResponseTool.getToolDefinition(),
@@ -55,6 +58,7 @@ export class ToolRegistry {
55
58
  validate_response: ValidateResponseTool,
56
59
  strategy: StrategyTool,
57
60
  update: UpdateTool,
61
+ quality: QualityTool,
58
62
  };
59
63
  return toolMap[name];
60
64
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magic-ingredients/tiny-brain-local",
3
- "version": "0.14.19",
3
+ "version": "0.15.0",
4
4
  "description": "MCP server for Tiny Brain AI assistant",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -31,7 +31,7 @@
31
31
  "dxt:init": "cd dxt && dxt init"
32
32
  },
33
33
  "dependencies": {
34
- "@magic-ingredients/tiny-brain-core": "^0.14.19",
34
+ "@magic-ingredients/tiny-brain-core": "^0.15.0",
35
35
  "@magic-ingredients/tiny-brain-dashboard": "file:../tiny-brain-dashboard",
36
36
  "@modelcontextprotocol/sdk": "^1.0.6",
37
37
  "chalk": "^5.3.0",