import { AgentProcess } from './src/process/agent_process.js'; import settings from './settings.js'; import yargs from 'yargs'; import { hideBin } from 'yargs/helpers'; import { createMindServer } from './src/server/mind_server.js'; import { mainProxy } from './src/process/main_proxy.js'; import { readFileSync } from 'fs'; function parseArguments() { return yargs(hideBin(process.argv)) .option('profiles', { type: 'array', describe: 'List of agent profile paths', }) .option('task_path', { type: 'string', describe: 'Path to task file to execute' }) .option('task_id', { type: 'string', describe: 'Task ID to execute' }) .help() .alias('help', 'h') .parse(); } function getProfiles(args) { return args.profiles || settings.profiles; } async function main() { if (settings.host_mindserver) { const mindServer = createMindServer(); } mainProxy.connect(); const args = parseArguments(); const profiles = getProfiles(args); console.log(profiles); const { load_memory, init_message } = settings; for (let i=0; i setTimeout(resolve, 1000)); } } try { main(); } catch (error) { console.error('An error occurred:', error); process.exit(1); }