/** * AdminService - HTTP service for managing agents and file system operations * * Base URL: http://localhost:11370 * * Endpoints: * * 1. Agent Operations * ------------------ * GET /api/v1/agents/{agentIdOrName} * Serializes an agent scaffold back into its original configuration * Returns: AgentGeneratorInput object * Example: GET /api/v1/agents/myAgent * * 2. File System Operations * ------------------------ * All FS operations return: { success: boolean, data?: string | string[] | boolean, error?: string } * * GET /api/v1/fs/{agentIdOrName}/read/{path} * Reads file content * Returns: { success: true, data: "file content" } * Example: GET /api/v1/fs/myAgent/read/path/to/file.txt * * POST /api/v1/fs/{agentIdOrName}/write/{path} * Writes content to file * Body: { "content": "file content" } * Returns: { success: true } * Example: POST /api/v1/fs/myAgent/write/path/to/file.txt * * PUT /api/v1/fs/{agentIdOrName}/create/{path} * Creates file or directory * Query params: ?recursive=true (optional, for directories) * Returns: { success: true } * Example: PUT /api/v1/fs/myAgent/create/path/to/dir?recursive=true * * DELETE /api/v1/fs/{agentIdOrName}/remove/{path} * Removes file or directory * Query params: ?recursive=true (optional, for directories) * Returns: { success: true } * Example: DELETE /api/v1/fs/myAgent/remove/path/to/file.txt * * GET /api/v1/fs/{agentIdOrName}/exists/{path} * Checks if path exists * Returns: { success: true, data: true|false } * Example: GET /api/v1/fs/myAgent/exists/path/to/check * * GET /api/v1/fs/{agentIdOrName}/list/{path} * Lists directory contents * Returns: { success: true, data: string[] } * Example: GET /api/v1/fs/myAgent/list/path/to/dir * * CORS: * - All endpoints support CORS with '*' origin * - Supported methods: GET, POST, PUT, DELETE, OPTIONS * - Content-Type: application/json */ export declare class AdminService { private server?; private port; private host; private agentsDir; private runningAgents; private manifestManager; constructor(port: number | undefined, host: string | undefined, agentsDir: string); /** * Resolves an agent directory using either agent ID or name. * Prioritizes ID lookup, falls back to name lookup for backward compatibility. */ private resolveAgentDirectory; startAgent(agentIdOrName: string): Promise; stopAgent(agentIdOrName: string): Promise; start(): Promise; stop(): Promise; }