autosnippet
Version:
Extract code patterns into a knowledge base for AI coding assistants
43 lines (42 loc) • 1.14 kB
TypeScript
/**
* MCP Handlers — 系统类
* health
*/
import type { KnowledgeBaseStats, McpContext } from './types.js';
export declare function health(ctx: McpContext): Promise<{
success: boolean;
errorCode: string | null;
message: string;
data: {
actionHints?: string[] | undefined;
issues?: string[] | undefined;
session?: {
id: string;
intentPhase: "active" | "idle" | "ended";
toolCallCount: number;
toolsUsed: string[];
durationMs: number;
} | undefined;
status: string;
version: string | null;
uptime: number;
projectRoot: string;
ai: {
provider: string;
hasKey: boolean;
};
checks: {
database: boolean;
gateway: boolean;
vectorStore: boolean;
};
services: string[];
knowledgeBase: KnowledgeBaseStats | null;
} | null;
meta: {
source?: string | undefined;
responseTimeMs?: number | undefined;
version: string;
tool?: string | undefined;
};
}>;