add agents to support route image

This commit is contained in:
musistudio
2025-09-01 17:19:43 +08:00
parent 9a5ea191f8
commit 19522f496b
10 changed files with 558 additions and 29 deletions

19
src/agents/type.ts Normal file
View File

@@ -0,0 +1,19 @@
export interface ITool {
name: string;
description: string;
input_schema: any;
handler: (args: any, context: any) => Promise<string>;
}
export interface IAgent {
name: string;
tools: Map<string, ITool>;
shouldHandle: (req: any, config: any) => boolean;
reqHandler: (req: any, config: any) => void;
resHandler?: (payload: any, config: any) => void;
}