tool-definitions.ts
1 export interface ToolDefinition { 2 id: string 3 label: string 4 description: string 5 /** 6 * The builtin extension ID that backs this tool. 7 * If the extension is disabled, the tool should be greyed out in the UI. 8 * Omit for tools that are always available (core tools without a separate extension). 9 */ 10 extensionId?: string 11 } 12 13 /** 14 * Standard dynamic tools. 15 * Many granular tools (read_file, write_file, etc.) are now unified under 'files'. 16 */ 17 export const AVAILABLE_TOOLS: ToolDefinition[] = [ 18 { id: 'shell', label: 'Shell', description: 'Execute commands in the working directory and manage background processes' }, 19 { id: 'execute', label: 'Execute', description: 'Run sandboxed bash scripts with just-bash, with optional host execution when explicitly enabled' }, 20 { id: 'files', label: 'Files', description: 'Complete file management: read, write, list, move, copy, delete, and send' }, 21 { id: 'edit_file', label: 'Edit File', description: 'Surgical search-and-replace within files' }, 22 { id: 'web', label: 'Web', description: 'Search the web, fetch content, and make HTTP API calls' }, 23 { id: 'delegate', label: 'Delegate', description: 'Delegate complex tasks to specialized backends (Claude Code, Codex, OpenCode, Gemini, Cursor, Qwen)' }, 24 { id: 'browser', label: 'Browser', description: 'Playwright — browse, scrape, interact with web pages' }, 25 { id: 'memory', label: 'Memory', description: 'Store and retrieve long-term memories across conversations' }, 26 { id: 'monitor', label: 'Monitor', description: 'Durable watch jobs: monitor files, endpoints, tasks, and resume agents on triggers' }, 27 { id: 'extension_creator', label: 'Extension Creator', description: 'Design focused extensions for durable capabilities and recurring automations' }, 28 { id: 'image_gen', label: 'Image Generation', description: 'Generate images from text prompts using OpenAI, Stability AI, Replicate, fal.ai, and more', extensionId: 'image_gen' }, 29 { id: 'email', label: 'Email', description: 'Send emails via SMTP with plain text and HTML support', extensionId: 'email' }, 30 { id: 'replicate', label: 'Replicate', description: 'Run any AI model on Replicate — image generation, LLMs, audio, video, and more', extensionId: 'replicate' }, 31 { id: 'google_workspace', label: 'Google Workspace', description: 'Run Google Workspace CLI (`gws`) commands for Drive, Docs, Sheets, Gmail, Calendar, Chat, and more', extensionId: 'google_workspace' }, 32 { id: 'swarmfeed', label: 'SwarmFeed', description: 'Post, reply, quote repost, bookmark, follow, search, browse feeds, read threads, and check notifications on the SwarmFeed agent network (auto-enabled when SwarmFeed is on)' }, 33 { id: 'swarmdock', label: 'SwarmDock', description: 'Browse tasks and inspect marketplace status/profile on SwarmDock (auto-enabled when SwarmDock is on)' }, 34 ] 35 36 /** 37 * Platform capability tools. 38 * Granular CRUD tools are now unified under 'manage_platform'. 39 */ 40 export const PLATFORM_TOOLS: ToolDefinition[] = [ 41 { id: 'manage_platform', label: 'Platform', description: 'Unified management of agents, projects, tasks, schedules, skills, documents, and secrets' }, 42 { id: 'manage_projects', label: 'Projects', description: 'Manage durable project context: objectives, priorities, heartbeat plans, credential needs, and linked resources' }, 43 { id: 'manage_connectors', label: 'Connectors', description: 'Manage chat platform bridges and send outbound messages' }, 44 { id: 'manage_chatrooms', label: 'Chatrooms', description: 'Manage SwarmClaw routing rules and multi-agent chatrooms' }, 45 { id: 'delegate_to_agent', label: 'Assign Agent', description: 'Delegate a task to another specific agent' }, 46 { id: 'schedule_wake', label: 'Reminders', description: 'Schedule a proactive wake event in the current chat' }, 47 ] 48 49 export const ALL_TOOLS: ToolDefinition[] = [...AVAILABLE_TOOLS, ...PLATFORM_TOOLS] 50 51 /** Flat id→label lookup for display */ 52 export const TOOL_LABELS: Record<string, string> = Object.fromEntries( 53 ALL_TOOLS.map((t) => [t.id, t.label]), 54 )