import { Plugin, PluginContext } from "../../plugins/types";
import { Command } from "commander";
import { IAgent } from "../../agents/interface";
import { Tool } from "../../clients/types";
import { Config } from "../../types";
import { GenericClient } from "../../clients/types";
import { AgentService } from "../AgentService";
import { EmbeddingsService } from "../EmbeddingsService";
import { PluginService } from "../../plugins/plugins";
import { AIClient } from "../../clients";
import { ToolsService } from "../Tools";
import { MediaProcessorService } from "../MediaProcessorService";
import { TunnelHandler } from "@tyvm/knowhow-tunnel";
import { EventService } from "../EventService";
export interface ModuleChatCommand {
    name: string;
    description: string;
    handler: (ctx: any) => void;
}
export interface ModuleTool {
    name: string;
    handler: (...args: any[]) => any;
    definition: Tool;
}
export type ModuleAgent = IAgent;
export type PluginConstructor = new (context: PluginContext) => Plugin;
export type ModulePlugin = {
    name: string;
    plugin: PluginConstructor;
};
export type ModuleClient = {
    client: GenericClient;
    provider: string;
    models: string[];
};
export type InitParams = {
    config: Config;
    cwd: string;
    context?: ModuleContext;
};
export interface ModuleContext {
    Agents: AgentService;
    Embeddings: EmbeddingsService;
    Plugins: PluginService;
    Clients: AIClient;
    Tools: ToolsService;
    Events: EventService;
    MediaProcessor?: MediaProcessorService;
    Tunnel?: TunnelHandler;
    Program?: Command;
}
export interface KnowhowModule {
    init: (params: InitParams) => Promise<void>;
    commands: ModuleChatCommand[];
    tools: ModuleTool[];
    agents: ModuleAgent[];
    plugins: ModulePlugin[];
    clients: ModuleClient[];
}
