mcp-booster
Version:
Servidor MCP com CoConuT (Continuous Chain of Thought) para uso com Cursor IDE - Pacote Global NPM
595 lines • 20.2 kB
TypeScript
/**
* Tipos para o serviço CoConuT_Storage
* Apenas tipos essenciais para operações de armazenamento de conclusões
*/
import { z } from 'zod';
/**
* Informações sobre um arquivo salvo
*/
export interface SavedFileInfo {
filePath: string;
type: string;
timestamp: number;
}
/**
* Informações sobre um pensamento
*/
export interface ThoughtEntry {
thought: string;
thoughtNumber: number;
branchId: string;
timestamp: number;
score?: number;
metadata?: Record<string, any>;
}
/**
* Configurações para o CoConuT
*/
export interface CoConuTConfig {
persistenceEnabled: boolean;
projectPath?: string;
reflectionInterval: number;
cycleDetectionThreshold: number;
similarityAlgorithm: string;
maxBranches: number;
maxHistorySize: number;
autoAnalyze: boolean;
}
/**
* Configurações padrão
*/
export declare const DEFAULT_CONFIG: CoConuTConfig;
/**
* Parâmetros para a ferramenta CoConuT
*/
export interface CoConuTParams {
thought: string;
thoughtNumber: number;
totalThoughts: number;
nextThoughtNeeded: boolean;
isRevision?: boolean;
revisesThought?: number;
branchFromThought?: number;
branchId?: string;
needsMoreThoughts?: boolean;
score: number;
inputType?: string;
problemStatus: string;
options?: string[];
numberArray?: number[];
Call_Booster_Analyser: boolean;
Call_Booster_Steps: boolean;
}
/**
* Resposta da ferramenta CoConuT
*/
export interface CoConuTResponse {
thoughtNumber: number;
totalThoughts: number;
nextThoughtNeeded: boolean;
stepsRecommended?: boolean;
analysis?: {
isOnRightTrack: boolean;
needsMoreUserInfo: boolean;
suggestedTotalThoughts: number;
userInfoNeeded?: string[];
suggestions?: string[];
};
error?: string;
}
/**
* Esquema Zod para validação de parâmetros do CoConuT
*/
export declare const CoConuTParamsSchema: z.ZodObject<{
thought: z.ZodString;
thoughtNumber: z.ZodNumber;
totalThoughts: z.ZodNumber;
nextThoughtNeeded: z.ZodBoolean;
isRevision: z.ZodOptional<z.ZodBoolean>;
revisesThought: z.ZodOptional<z.ZodNumber>;
branchFromThought: z.ZodOptional<z.ZodNumber>;
branchId: z.ZodOptional<z.ZodString>;
needsMoreThoughts: z.ZodOptional<z.ZodBoolean>;
score: z.ZodNumber;
inputType: z.ZodOptional<z.ZodString>;
problemStatus: z.ZodString;
options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
numberArray: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
Call_Booster_Analyser: z.ZodBoolean;
Call_Booster_Steps: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
thought: string;
thoughtNumber: number;
totalThoughts: number;
nextThoughtNeeded: boolean;
score: number;
problemStatus: string;
Call_Booster_Analyser: boolean;
Call_Booster_Steps: boolean;
isRevision?: boolean | undefined;
revisesThought?: number | undefined;
branchFromThought?: number | undefined;
branchId?: string | undefined;
needsMoreThoughts?: boolean | undefined;
inputType?: string | undefined;
options?: string[] | undefined;
numberArray?: number[] | undefined;
}, {
thought: string;
thoughtNumber: number;
totalThoughts: number;
nextThoughtNeeded: boolean;
score: number;
problemStatus: string;
Call_Booster_Analyser: boolean;
Call_Booster_Steps: boolean;
isRevision?: boolean | undefined;
revisesThought?: number | undefined;
branchFromThought?: number | undefined;
branchId?: string | undefined;
needsMoreThoughts?: boolean | undefined;
inputType?: string | undefined;
options?: string[] | undefined;
numberArray?: number[] | undefined;
}>;
/**
* Enumeração de tipos de entrada
*/
export declare enum InputType {
TEXT = "text",
NUMBER_ARRAY = "number_array",
OPTIONS = "options",
BOOLEAN = "boolean"
}
/**
* Parâmetros para a ferramenta CoConuT_Storage
*/
export interface CoConuTStorageParams {
projectPath: string;
WhyChange: string;
WhatChange: string;
category?: string;
subCategories?: string[];
tags?: string[];
impactLevel?: string;
affectedFiles?: string[];
codeSnippets?: Array<{
before: string;
after: string;
file: string;
}>;
relatedConclusions?: string[];
ticketReference?: string;
businessContext?: string;
technicalContext?: string;
alternativesConsidered?: string[];
testingPerformed?: string;
}
/**
* Esquema Zod para validação de parâmetros do CoConuT_Storage
*/
export declare const CoConuTStorageParamsSchema: z.ZodObject<{
projectPath: z.ZodString;
WhyChange: z.ZodString;
WhatChange: z.ZodString;
category: z.ZodOptional<z.ZodString>;
subCategories: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
impactLevel: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
affectedFiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
codeSnippets: z.ZodOptional<z.ZodArray<z.ZodObject<{
before: z.ZodString;
after: z.ZodString;
file: z.ZodString;
}, "strip", z.ZodTypeAny, {
before: string;
after: string;
file: string;
}, {
before: string;
after: string;
file: string;
}>, "many">>;
relatedConclusions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
ticketReference: z.ZodOptional<z.ZodString>;
businessContext: z.ZodOptional<z.ZodString>;
technicalContext: z.ZodOptional<z.ZodString>;
alternativesConsidered: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
testingPerformed: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
projectPath: string;
WhyChange: string;
WhatChange: string;
category?: string | undefined;
subCategories?: string[] | undefined;
tags?: string[] | undefined;
impactLevel?: "low" | "medium" | "high" | undefined;
affectedFiles?: string[] | undefined;
codeSnippets?: {
before: string;
after: string;
file: string;
}[] | undefined;
relatedConclusions?: string[] | undefined;
ticketReference?: string | undefined;
businessContext?: string | undefined;
technicalContext?: string | undefined;
alternativesConsidered?: string[] | undefined;
testingPerformed?: string | undefined;
}, {
projectPath: string;
WhyChange: string;
WhatChange: string;
category?: string | undefined;
subCategories?: string[] | undefined;
tags?: string[] | undefined;
impactLevel?: "low" | "medium" | "high" | undefined;
affectedFiles?: string[] | undefined;
codeSnippets?: {
before: string;
after: string;
file: string;
}[] | undefined;
relatedConclusions?: string[] | undefined;
ticketReference?: string | undefined;
businessContext?: string | undefined;
technicalContext?: string | undefined;
alternativesConsidered?: string[] | undefined;
testingPerformed?: string | undefined;
}>;
/**
* Enumeração de tipos de eventos
*/
export declare enum EventType {
THOUGHT_ADDED = "thought_added",
THOUGHT_REVISED = "thought_revised",
CYCLE_DETECTED = "cycle_detected",
ANALYSIS_PERFORMED = "analysis_performed",
BRANCH_CREATED = "branch_created",
BRANCH_SWITCHED = "branch_switched"
}
/**
* Interface para dados de evento
*/
export interface EventData {
type: EventType;
timestamp: number;
data: any;
}
/**
* Interface para listeners de eventos
*/
export interface EventListener {
handleEvent(event: EventData): void;
}
/**
* Interface para respostas de erro estruturadas
*
* Permite fornecer informações detalhadas sobre erros para melhor processamento pela LLM
*/
export interface ErrorResponse {
code: string;
message: string;
details?: string;
suggestions?: string[];
context?: {
paramName?: string;
methodName?: string;
input?: any;
};
}
/**
* Códigos de erro comuns para padronização
*/
export declare enum ErrorCode {
VALIDATION_ERROR = "VALIDATION_ERROR",
EXECUTION_ERROR = "EXECUTION_ERROR",
NETWORK_ERROR = "NETWORK_ERROR",
AUTHORIZATION_ERROR = "AUTHORIZATION_ERROR",
NOT_FOUND_ERROR = "NOT_FOUND_ERROR",
METHOD_NOT_ALLOWED = "METHOD_NOT_ALLOWED",
INVALID_INPUT = "INVALID_INPUT",
INVALID_STATE = "INVALID_STATE",
INTERNAL_ERROR = "INTERNAL_ERROR"
}
/**
* Parâmetros para a ferramenta Booster_Steps
*/
export interface BoosterStepsParams {
title: string;
taskDescription: string;
projectPath: string;
steps: TaskStep[];
}
/**
* Estrutura de um passo individual (Card Template) - Otimizado para processamento por AIs
*/
export interface TaskStep {
id: string;
title: string;
technicalContext: string;
implementationGoal: string;
targetFiles: string[];
referencePaths: string[];
codePatterns: string[];
technicalRequirements: string[];
shellCommands: string[];
installationSteps: string[];
verificationSteps: string[];
codeDependencies: string[];
serviceDependencies: string[];
userNotes?: string;
aiNotes?: string;
complexity: 'low' | 'medium' | 'high' | 'expert';
estimatedLines?: number;
testingStrategy?: string;
rollbackPlan?: string;
relatedIssues?: string[];
apiEndpoints?: string[];
databaseChanges?: string[];
environmentVars?: string[];
securityConsiderations?: string[];
performanceConsiderations?: string[];
accessibilityNotes?: string[];
monitoringAndLogs?: string[];
}
/**
* Resposta da ferramenta Booster_Steps
*/
export interface BoosterStepsResponse {
taskTitle: string;
totalSteps: number;
steps: TaskStep[];
summary: string;
recommendations?: string[];
riskFactors?: string[];
savedFilePath?: string;
}
/**
* Esquema Zod para validação de um TaskStep - Otimizado para AIs
*/
export declare const TaskStepSchema: z.ZodObject<{
id: z.ZodString;
title: z.ZodString;
technicalContext: z.ZodString;
implementationGoal: z.ZodString;
targetFiles: z.ZodArray<z.ZodString, "many">;
referencePaths: z.ZodArray<z.ZodString, "many">;
codePatterns: z.ZodArray<z.ZodString, "many">;
technicalRequirements: z.ZodArray<z.ZodString, "many">;
shellCommands: z.ZodArray<z.ZodString, "many">;
installationSteps: z.ZodArray<z.ZodString, "many">;
verificationSteps: z.ZodArray<z.ZodString, "many">;
codeDependencies: z.ZodArray<z.ZodString, "many">;
serviceDependencies: z.ZodArray<z.ZodString, "many">;
complexity: z.ZodEnum<["low", "medium", "high", "expert"]>;
userNotes: z.ZodOptional<z.ZodString>;
aiNotes: z.ZodOptional<z.ZodString>;
estimatedLines: z.ZodOptional<z.ZodNumber>;
testingStrategy: z.ZodOptional<z.ZodString>;
rollbackPlan: z.ZodOptional<z.ZodString>;
relatedIssues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
apiEndpoints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
databaseChanges: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
environmentVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
securityConsiderations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
performanceConsiderations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
accessibilityNotes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
monitoringAndLogs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
technicalContext: string;
id: string;
title: string;
implementationGoal: string;
targetFiles: string[];
referencePaths: string[];
codePatterns: string[];
technicalRequirements: string[];
shellCommands: string[];
installationSteps: string[];
verificationSteps: string[];
codeDependencies: string[];
serviceDependencies: string[];
complexity: "low" | "medium" | "high" | "expert";
userNotes?: string | undefined;
aiNotes?: string | undefined;
estimatedLines?: number | undefined;
testingStrategy?: string | undefined;
rollbackPlan?: string | undefined;
relatedIssues?: string[] | undefined;
apiEndpoints?: string[] | undefined;
databaseChanges?: string[] | undefined;
environmentVars?: string[] | undefined;
securityConsiderations?: string[] | undefined;
performanceConsiderations?: string[] | undefined;
accessibilityNotes?: string[] | undefined;
monitoringAndLogs?: string[] | undefined;
}, {
technicalContext: string;
id: string;
title: string;
implementationGoal: string;
targetFiles: string[];
referencePaths: string[];
codePatterns: string[];
technicalRequirements: string[];
shellCommands: string[];
installationSteps: string[];
verificationSteps: string[];
codeDependencies: string[];
serviceDependencies: string[];
complexity: "low" | "medium" | "high" | "expert";
userNotes?: string | undefined;
aiNotes?: string | undefined;
estimatedLines?: number | undefined;
testingStrategy?: string | undefined;
rollbackPlan?: string | undefined;
relatedIssues?: string[] | undefined;
apiEndpoints?: string[] | undefined;
databaseChanges?: string[] | undefined;
environmentVars?: string[] | undefined;
securityConsiderations?: string[] | undefined;
performanceConsiderations?: string[] | undefined;
accessibilityNotes?: string[] | undefined;
monitoringAndLogs?: string[] | undefined;
}>;
/**
* Esquema Zod para validação de parâmetros do Booster_Steps
*/
export declare const BoosterStepsParamsSchema: z.ZodObject<{
title: z.ZodString;
taskDescription: z.ZodString;
projectPath: z.ZodString;
steps: z.ZodArray<z.ZodObject<{
id: z.ZodString;
title: z.ZodString;
technicalContext: z.ZodString;
implementationGoal: z.ZodString;
targetFiles: z.ZodArray<z.ZodString, "many">;
referencePaths: z.ZodArray<z.ZodString, "many">;
codePatterns: z.ZodArray<z.ZodString, "many">;
technicalRequirements: z.ZodArray<z.ZodString, "many">;
shellCommands: z.ZodArray<z.ZodString, "many">;
installationSteps: z.ZodArray<z.ZodString, "many">;
verificationSteps: z.ZodArray<z.ZodString, "many">;
codeDependencies: z.ZodArray<z.ZodString, "many">;
serviceDependencies: z.ZodArray<z.ZodString, "many">;
complexity: z.ZodEnum<["low", "medium", "high", "expert"]>;
userNotes: z.ZodOptional<z.ZodString>;
aiNotes: z.ZodOptional<z.ZodString>;
estimatedLines: z.ZodOptional<z.ZodNumber>;
testingStrategy: z.ZodOptional<z.ZodString>;
rollbackPlan: z.ZodOptional<z.ZodString>;
relatedIssues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
apiEndpoints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
databaseChanges: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
environmentVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
securityConsiderations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
performanceConsiderations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
accessibilityNotes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
monitoringAndLogs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
technicalContext: string;
id: string;
title: string;
implementationGoal: string;
targetFiles: string[];
referencePaths: string[];
codePatterns: string[];
technicalRequirements: string[];
shellCommands: string[];
installationSteps: string[];
verificationSteps: string[];
codeDependencies: string[];
serviceDependencies: string[];
complexity: "low" | "medium" | "high" | "expert";
userNotes?: string | undefined;
aiNotes?: string | undefined;
estimatedLines?: number | undefined;
testingStrategy?: string | undefined;
rollbackPlan?: string | undefined;
relatedIssues?: string[] | undefined;
apiEndpoints?: string[] | undefined;
databaseChanges?: string[] | undefined;
environmentVars?: string[] | undefined;
securityConsiderations?: string[] | undefined;
performanceConsiderations?: string[] | undefined;
accessibilityNotes?: string[] | undefined;
monitoringAndLogs?: string[] | undefined;
}, {
technicalContext: string;
id: string;
title: string;
implementationGoal: string;
targetFiles: string[];
referencePaths: string[];
codePatterns: string[];
technicalRequirements: string[];
shellCommands: string[];
installationSteps: string[];
verificationSteps: string[];
codeDependencies: string[];
serviceDependencies: string[];
complexity: "low" | "medium" | "high" | "expert";
userNotes?: string | undefined;
aiNotes?: string | undefined;
estimatedLines?: number | undefined;
testingStrategy?: string | undefined;
rollbackPlan?: string | undefined;
relatedIssues?: string[] | undefined;
apiEndpoints?: string[] | undefined;
databaseChanges?: string[] | undefined;
environmentVars?: string[] | undefined;
securityConsiderations?: string[] | undefined;
performanceConsiderations?: string[] | undefined;
accessibilityNotes?: string[] | undefined;
monitoringAndLogs?: string[] | undefined;
}>, "many">;
}, "strip", z.ZodTypeAny, {
projectPath: string;
title: string;
taskDescription: string;
steps: {
technicalContext: string;
id: string;
title: string;
implementationGoal: string;
targetFiles: string[];
referencePaths: string[];
codePatterns: string[];
technicalRequirements: string[];
shellCommands: string[];
installationSteps: string[];
verificationSteps: string[];
codeDependencies: string[];
serviceDependencies: string[];
complexity: "low" | "medium" | "high" | "expert";
userNotes?: string | undefined;
aiNotes?: string | undefined;
estimatedLines?: number | undefined;
testingStrategy?: string | undefined;
rollbackPlan?: string | undefined;
relatedIssues?: string[] | undefined;
apiEndpoints?: string[] | undefined;
databaseChanges?: string[] | undefined;
environmentVars?: string[] | undefined;
securityConsiderations?: string[] | undefined;
performanceConsiderations?: string[] | undefined;
accessibilityNotes?: string[] | undefined;
monitoringAndLogs?: string[] | undefined;
}[];
}, {
projectPath: string;
title: string;
taskDescription: string;
steps: {
technicalContext: string;
id: string;
title: string;
implementationGoal: string;
targetFiles: string[];
referencePaths: string[];
codePatterns: string[];
technicalRequirements: string[];
shellCommands: string[];
installationSteps: string[];
verificationSteps: string[];
codeDependencies: string[];
serviceDependencies: string[];
complexity: "low" | "medium" | "high" | "expert";
userNotes?: string | undefined;
aiNotes?: string | undefined;
estimatedLines?: number | undefined;
testingStrategy?: string | undefined;
rollbackPlan?: string | undefined;
relatedIssues?: string[] | undefined;
apiEndpoints?: string[] | undefined;
databaseChanges?: string[] | undefined;
environmentVars?: string[] | undefined;
securityConsiderations?: string[] | undefined;
performanceConsiderations?: string[] | undefined;
accessibilityNotes?: string[] | undefined;
monitoringAndLogs?: string[] | undefined;
}[];
}>;
//# sourceMappingURL=types.d.ts.map