初次提交
This commit is contained in:
124
source/types/index.ts
Normal file
124
source/types/index.ts
Normal file
@@ -0,0 +1,124 @@
|
||||
export interface MCPServerSettings {
|
||||
port: number;
|
||||
autoStart: boolean;
|
||||
enableDebugLog: boolean;
|
||||
allowedOrigins: string[];
|
||||
maxConnections: number;
|
||||
}
|
||||
|
||||
export interface ServerStatus {
|
||||
running: boolean;
|
||||
port: number;
|
||||
clients: number;
|
||||
}
|
||||
|
||||
export interface ToolDefinition {
|
||||
name: string;
|
||||
description: string;
|
||||
inputSchema: any;
|
||||
}
|
||||
|
||||
export interface ToolResponse {
|
||||
success: boolean;
|
||||
data?: any;
|
||||
message?: string;
|
||||
error?: string;
|
||||
instruction?: string;
|
||||
}
|
||||
|
||||
export interface NodeInfo {
|
||||
uuid: string;
|
||||
name: string;
|
||||
active: boolean;
|
||||
position?: { x: number; y: number; z: number };
|
||||
rotation?: { x: number; y: number; z: number };
|
||||
scale?: { x: number; y: number; z: number };
|
||||
parent?: string;
|
||||
children?: string[];
|
||||
components?: ComponentInfo[];
|
||||
layer?: number;
|
||||
mobility?: number;
|
||||
}
|
||||
|
||||
export interface ComponentInfo {
|
||||
type: string;
|
||||
enabled: boolean;
|
||||
properties?: Record<string, any>;
|
||||
}
|
||||
|
||||
export interface SceneInfo {
|
||||
name: string;
|
||||
uuid: string;
|
||||
path: string;
|
||||
}
|
||||
|
||||
export interface PrefabInfo {
|
||||
name: string;
|
||||
uuid: string;
|
||||
path: string;
|
||||
folder: string;
|
||||
createTime?: string;
|
||||
modifyTime?: string;
|
||||
dependencies?: string[];
|
||||
}
|
||||
|
||||
export interface AssetInfo {
|
||||
name: string;
|
||||
uuid: string;
|
||||
path: string;
|
||||
type: string;
|
||||
size?: number;
|
||||
isDirectory: boolean;
|
||||
meta?: {
|
||||
ver: string;
|
||||
importer: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ProjectInfo {
|
||||
name: string;
|
||||
path: string;
|
||||
uuid: string;
|
||||
version: string;
|
||||
cocosVersion: string;
|
||||
}
|
||||
|
||||
export interface ConsoleMessage {
|
||||
timestamp: string;
|
||||
type: 'log' | 'warn' | 'error' | 'info';
|
||||
message: string;
|
||||
stack?: string;
|
||||
}
|
||||
|
||||
export interface PerformanceStats {
|
||||
nodeCount: number;
|
||||
componentCount: number;
|
||||
drawCalls: number;
|
||||
triangles: number;
|
||||
memory: Record<string, any>;
|
||||
}
|
||||
|
||||
export interface ValidationIssue {
|
||||
type: 'error' | 'warning' | 'info';
|
||||
category: string;
|
||||
message: string;
|
||||
details?: any;
|
||||
suggestion?: string;
|
||||
}
|
||||
|
||||
export interface ValidationResult {
|
||||
valid: boolean;
|
||||
issueCount: number;
|
||||
issues: ValidationIssue[];
|
||||
}
|
||||
|
||||
export interface MCPClient {
|
||||
id: string;
|
||||
lastActivity: Date;
|
||||
userAgent?: string;
|
||||
}
|
||||
|
||||
export interface ToolExecutor {
|
||||
getTools(): ToolDefinition[];
|
||||
execute(toolName: string, args: any): Promise<ToolResponse>;
|
||||
}
|
||||
Reference in New Issue
Block a user