UNPKG

ai-ip-plugin

Version:

AI-IP Plugin for MCP Workflow Management with SSE streaming and event handling

122 lines 3.03 kB
/** * Workflow related type definitions */ export type LT = "zh" | "zh-Hant" | "en" | "es" | "fr" | "de" | "ja" | "ru" | "it" | "pl" | "th" | "hi" | "id" | "pt" | "ko" | "vi"; /** Tool Function Call */ export interface ToolFunctionCall { index: number; id: string; function: { arguments: string; name: string; }; type: string; } /** Tool Call */ export interface ToolCall { name: string; args: Record<string, any>; id: string; type: string; } /** MCP Event Types */ export type MCPEvent = "workflow_created" | "start_of_agent" | "tool_call" | "tool_call_result" | "message" | "end_of_agent" | "end_of_workflow" | "error" | "workflow_restarted" | "workflow_resumed" | "workflow_interrupted"; /** Message Item */ export interface MessageItem { content: string; additional_kwargs: { tool_calls?: ToolFunctionCall[]; [key: string]: any; }; response_metadata: { finish_reason?: string; model_name?: string; system_fingerprint?: string; [key: string]: any; }; type: "human" | "ai" | "tool"; name: string; agent_type: string; id: string; example: boolean; tool_calls?: ToolCall[]; invalid_tool_calls?: any[]; usage_metadata?: Record<string, any> | null; tool_call_id?: string; artifact?: any; status?: string; uuid: string; event: MCPEvent; task_id?: number; reasoning?: string; finished: boolean; session_id: string; tool_content?: any[]; writing?: string; last?: boolean; message?: string; } /** Workflow Start Parameters */ export interface MCPStartProps { /** User input */ userInput: string; /** User ID */ pid: number; /** Language */ language: string; /** Readability */ readability?: number; /** Script length */ scriptLength?: number; /** Style */ style?: string; isRag?: boolean; isPersona?: boolean; isWebsearch?: boolean; } /** Workflow Interrupt Parameters */ export interface MCPInterruptParams { taskId: string; pid: number; interruptReason: string; interruptType: number; interruptData: { userMessage: string; }; } /** Workflow Continue Parameters */ export interface MCPContinueProps { taskId: string; userMessage: string; pid: number; } /** Workflow Resume Parameters */ export interface MCPResumeParams { taskId: string; pid: number; action: string; data: { [key: string]: any; }; } /** Stream Controller */ export interface StreamController { controller: AbortController; reader: ReadableStreamDefaultReader<Uint8Array> | null; } /** Oral Text Information */ export interface OralTextInfo { label: string; reasoning: string; writing: string; id: number; uuid: string; } /** Sentence Information */ export interface SentenceInfo { speed: number; sentence: any; audioUrl: string; voiceId: string; } //# sourceMappingURL=workflow.d.ts.map