Update src/index.ts to use the v3.0.0 LuaAgent pattern:
Copy
import { LuaAgent, LuaSkill } from "lua-cli";import { CreateTaskTool, ListTasksTool, CompleteTaskTool, SearchTasksTool} from "./tools/TaskTool";// Create the task management skillconst taskSkill = new LuaSkill({ name: "task-management-skill", description: "Manage tasks and to-do lists with creation, listing, completion, and search", context: ` This skill helps users manage their tasks. - Use create_task when users want to add a new task - Use list_tasks to show all tasks or filter by status - Use complete_task when users finish a task - Use search_tasks to find tasks by content Always confirm task details before creating. When listing tasks, organize by priority and due date. `, tools: [ new CreateTaskTool(), new ListTasksTool(), new CompleteTaskTool(), new SearchTasksTool() ]});// Create agent (v3.0.0 pattern)export const agent = new LuaAgent({ name: "task-assistant", persona: `You are a helpful task management assistant.Your role:- Help users create and organize their tasks- Keep track of todos and deadlines- Search for tasks when needed- Mark tasks as completeCommunication style:- Friendly and encouraging- Clear and concise- Confirm actions before executing- Provide helpful summariesCapabilities:- Create new tasks with title, description, priority, and due date- List all tasks or filter by status- Search tasks semantically- Mark tasks as completedAlways confirm task details with users before creating them.`, skills: [taskSkill]});
New in v3.0.0: Use LuaAgent to configure your agent with persona, welcome message, and skills in one place.