UNPKG

@justinechang39/maki

Version:

AI-powered CLI agent for file operations, CSV manipulation, todo management, and web content fetching using OpenRouter

46 lines (45 loc) 1.89 kB
// Tool definitions import { csvToolImplementations, csvTools } from './csv-tools.js'; import { fileToolImplementations, fileTools } from './file-tools.js'; import { todoToolImplementations, todoTools } from './todo-tools.js'; import { webToolImplementations, webTools } from './web-tools.js'; // Think tool const thinkTool = { type: 'function', function: { name: 'think', description: 'CRITICAL REASONING TOOL: Use this to reason through any situation, plan operations, work through ambiguities, and make informed decisions. This is your private internal workspace - the user cannot see your thoughts. Use this tool whenever you need to reason: before tasks, during execution, to reassess progress, and ALWAYS to double-check your work before presenting results. This should be your most frequently used tool. Use it to ask yourself: Did you do it right? Are you done? Is there anything else that needs to be done?', parameters: { type: 'object', properties: { thoughts: { type: 'string', description: 'Your detailed analysis, step-by-step plan, decision reasoning, or problem decomposition. Include what you discovered, what you plan to do next, and why.' } }, required: ['thoughts'] } } }; const thinkImplementation = async (args) => { return { success: true, message: 'Thinking process documented.', thoughts_received: args.thoughts }; }; // Export all tools and implementations export const tools = [ thinkTool, ...fileTools, ...csvTools, ...todoTools, ...webTools ]; export const toolImplementations = { think: thinkImplementation, ...fileToolImplementations, ...csvToolImplementations, ...todoToolImplementations, ...webToolImplementations };