mcp-chain-of-thought
Version:
Chain of Thought is a tool built for AI Agents, emphasizing chain-of-thought, reflection, and style consistency. It converts natural language into structured dev tasks with dependency tracking and iterative refinement, enabling agent-like developer behavi
401 lines (400 loc) • 12 kB
TypeScript
import { z } from "zod";
import { RelatedFileType } from "../types/index.js";
export declare const planTaskSchema: z.ZodObject<{
description: z.ZodString;
requirements: z.ZodOptional<z.ZodString>;
existingTasksReference: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
}, "strip", z.ZodTypeAny, {
description: string;
existingTasksReference: boolean;
requirements?: string | undefined;
}, {
description: string;
requirements?: string | undefined;
existingTasksReference?: boolean | undefined;
}>;
export declare function planTask({ description, requirements, existingTasksReference, }: z.infer<typeof planTaskSchema>): Promise<{
content: {
type: "text";
text: string;
}[];
}>;
export declare const analyzeTaskSchema: z.ZodObject<{
summary: z.ZodString;
initialConcept: z.ZodString;
previousAnalysis: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
summary: string;
initialConcept: string;
previousAnalysis?: string | undefined;
}, {
summary: string;
initialConcept: string;
previousAnalysis?: string | undefined;
}>;
export declare function analyzeTask({ summary, initialConcept, previousAnalysis, }: z.infer<typeof analyzeTaskSchema>): Promise<{
content: {
type: "text";
text: string;
}[];
}>;
export declare const reflectTaskSchema: z.ZodObject<{
summary: z.ZodString;
analysis: z.ZodString;
}, "strip", z.ZodTypeAny, {
summary: string;
analysis: string;
}, {
summary: string;
analysis: string;
}>;
export declare function reflectTask({ summary, analysis, }: z.infer<typeof reflectTaskSchema>): Promise<{
content: {
type: "text";
text: string;
}[];
}>;
export declare const splitTasksSchema: z.ZodObject<{
updateMode: z.ZodEnum<["append", "overwrite", "selective", "clearAllTasks"]>;
tasks: z.ZodArray<z.ZodObject<{
name: z.ZodString;
description: z.ZodString;
implementationGuide: z.ZodString;
dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
notes: z.ZodOptional<z.ZodString>;
relatedFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
path: z.ZodString;
type: z.ZodNativeEnum<typeof RelatedFileType>;
description: z.ZodString;
lineStart: z.ZodOptional<z.ZodNumber>;
lineEnd: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
description: string;
type: RelatedFileType;
path: string;
lineStart?: number | undefined;
lineEnd?: number | undefined;
}, {
description: string;
type: RelatedFileType;
path: string;
lineStart?: number | undefined;
lineEnd?: number | undefined;
}>, "many">>;
verificationCriteria: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
name: string;
description: string;
implementationGuide: string;
relatedFiles?: {
description: string;
type: RelatedFileType;
path: string;
lineStart?: number | undefined;
lineEnd?: number | undefined;
}[] | undefined;
notes?: string | undefined;
dependencies?: string[] | undefined;
verificationCriteria?: string | undefined;
}, {
name: string;
description: string;
implementationGuide: string;
relatedFiles?: {
description: string;
type: RelatedFileType;
path: string;
lineStart?: number | undefined;
lineEnd?: number | undefined;
}[] | undefined;
notes?: string | undefined;
dependencies?: string[] | undefined;
verificationCriteria?: string | undefined;
}>, "many">;
globalAnalysisResult: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
tasks: {
name: string;
description: string;
implementationGuide: string;
relatedFiles?: {
description: string;
type: RelatedFileType;
path: string;
lineStart?: number | undefined;
lineEnd?: number | undefined;
}[] | undefined;
notes?: string | undefined;
dependencies?: string[] | undefined;
verificationCriteria?: string | undefined;
}[];
updateMode: "append" | "overwrite" | "selective" | "clearAllTasks";
globalAnalysisResult?: string | undefined;
}, {
tasks: {
name: string;
description: string;
implementationGuide: string;
relatedFiles?: {
description: string;
type: RelatedFileType;
path: string;
lineStart?: number | undefined;
lineEnd?: number | undefined;
}[] | undefined;
notes?: string | undefined;
dependencies?: string[] | undefined;
verificationCriteria?: string | undefined;
}[];
updateMode: "append" | "overwrite" | "selective" | "clearAllTasks";
globalAnalysisResult?: string | undefined;
}>;
export declare function splitTasks({ updateMode, tasks, globalAnalysisResult, }: z.infer<typeof splitTasksSchema>): Promise<{
content: {
type: "text";
text: string;
}[];
ephemeral?: undefined;
} | {
content: {
type: "text";
text: string;
}[];
ephemeral: {
taskCreationResult: {
success: boolean;
message: string;
backupFilePath: string | null | undefined;
};
};
}>;
export declare const listTasksSchema: z.ZodObject<{
status: z.ZodEnum<["all", "pending", "in_progress", "completed"]>;
}, "strip", z.ZodTypeAny, {
status: "all" | "pending" | "in_progress" | "completed";
}, {
status: "all" | "pending" | "in_progress" | "completed";
}>;
export declare function listTasks({ status }: z.infer<typeof listTasksSchema>): Promise<{
content: {
type: "text";
text: string;
}[];
}>;
export declare const executeTaskSchema: z.ZodObject<{
taskId: z.ZodString;
}, "strip", z.ZodTypeAny, {
taskId: string;
}, {
taskId: string;
}>;
export declare function executeTask({ taskId, }: z.infer<typeof executeTaskSchema>): Promise<{
content: {
type: "text";
text: string;
}[];
isError?: undefined;
} | {
content: {
type: "text";
text: string;
}[];
isError: boolean;
}>;
export declare const verifyTaskSchema: z.ZodObject<{
taskId: z.ZodString;
}, "strip", z.ZodTypeAny, {
taskId: string;
}, {
taskId: string;
}>;
export declare function verifyTask({ taskId }: z.infer<typeof verifyTaskSchema>): Promise<{
content: {
type: "text";
text: string;
}[];
isError: boolean;
} | {
content: {
type: "text";
text: string;
}[];
isError?: undefined;
}>;
export declare const completeTaskSchema: z.ZodObject<{
taskId: z.ZodString;
summary: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
taskId: string;
summary?: string | undefined;
}, {
taskId: string;
summary?: string | undefined;
}>;
export declare function completeTask({ taskId, summary, }: z.infer<typeof completeTaskSchema>): Promise<{
content: {
type: "text";
text: string;
}[];
isError: boolean;
} | {
content: {
type: "text";
text: string;
}[];
isError?: undefined;
}>;
export declare const deleteTaskSchema: z.ZodObject<{
taskId: z.ZodString;
}, "strip", z.ZodTypeAny, {
taskId: string;
}, {
taskId: string;
}>;
export declare function deleteTask({ taskId }: z.infer<typeof deleteTaskSchema>): Promise<{
content: {
type: "text";
text: string;
}[];
isError: boolean;
}>;
export declare const clearAllTasksSchema: z.ZodObject<{
confirm: z.ZodEffects<z.ZodBoolean, boolean, boolean>;
}, "strip", z.ZodTypeAny, {
confirm: boolean;
}, {
confirm: boolean;
}>;
export declare function clearAllTasks({ confirm, }: z.infer<typeof clearAllTasksSchema>): Promise<{
content: {
type: "text";
text: string;
}[];
isError?: undefined;
} | {
content: {
type: "text";
text: string;
}[];
isError: boolean;
}>;
export declare const updateTaskContentSchema: z.ZodObject<{
taskId: z.ZodString;
name: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
notes: z.ZodOptional<z.ZodString>;
dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
relatedFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
path: z.ZodString;
type: z.ZodNativeEnum<typeof RelatedFileType>;
description: z.ZodOptional<z.ZodString>;
lineStart: z.ZodOptional<z.ZodNumber>;
lineEnd: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
type: RelatedFileType;
path: string;
description?: string | undefined;
lineStart?: number | undefined;
lineEnd?: number | undefined;
}, {
type: RelatedFileType;
path: string;
description?: string | undefined;
lineStart?: number | undefined;
lineEnd?: number | undefined;
}>, "many">>;
implementationGuide: z.ZodOptional<z.ZodString>;
verificationCriteria: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
taskId: string;
relatedFiles?: {
type: RelatedFileType;
path: string;
description?: string | undefined;
lineStart?: number | undefined;
lineEnd?: number | undefined;
}[] | undefined;
name?: string | undefined;
description?: string | undefined;
notes?: string | undefined;
dependencies?: string[] | undefined;
implementationGuide?: string | undefined;
verificationCriteria?: string | undefined;
}, {
taskId: string;
relatedFiles?: {
type: RelatedFileType;
path: string;
description?: string | undefined;
lineStart?: number | undefined;
lineEnd?: number | undefined;
}[] | undefined;
name?: string | undefined;
description?: string | undefined;
notes?: string | undefined;
dependencies?: string[] | undefined;
implementationGuide?: string | undefined;
verificationCriteria?: string | undefined;
}>;
export declare function updateTaskContent({ taskId, name, description, notes, relatedFiles, dependencies, implementationGuide, verificationCriteria, }: z.infer<typeof updateTaskContentSchema>): Promise<{
content: {
type: "text";
text: string;
}[];
isError?: undefined;
} | {
content: {
type: "text";
text: string;
}[];
isError: boolean;
}>;
export declare const queryTaskSchema: z.ZodObject<{
query: z.ZodString;
isId: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
pageSize: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
}, "strip", z.ZodTypeAny, {
query: string;
isId: boolean;
page: number;
pageSize: number;
}, {
query: string;
isId?: boolean | undefined;
page?: number | undefined;
pageSize?: number | undefined;
}>;
export declare function queryTask({ query, isId, page, pageSize, }: z.infer<typeof queryTaskSchema>): Promise<{
content: {
type: "text";
text: string;
}[];
isError?: undefined;
} | {
content: {
type: "text";
text: string;
}[];
isError: boolean;
}>;
export declare const getTaskDetailSchema: z.ZodObject<{
taskId: z.ZodString;
}, "strip", z.ZodTypeAny, {
taskId: string;
}, {
taskId: string;
}>;
export declare function getTaskDetail({ taskId, }: z.infer<typeof getTaskDetailSchema>): Promise<{
content: {
type: "text";
text: string;
}[];
isError: boolean;
} | {
content: {
type: "text";
text: string;
}[];
isError?: undefined;
}>;