export const SYSTEM_TOOLS = [
    {
        "name": "save_to_backpack",
        "description": "Save research, notes, or compiled data directly into Pidgey's internal Backpack instead of downloading to the user's OS.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "filename": {
                    "type": "STRING",
                    "description": "Filename with extension (e.g., report.html, notes.txt)"
                },
                "content": {
                    "type": "STRING",
                    "description": "Full file content to stash."
                }
            },
            "required": [
                "filename",
                "content"
            ]
        }
    },
    {
        "name": "read_from_backpack",
        "description": "Read the contents of a specific file located in the user's Backpack. Supports pagination: specify startLine and endLine to read a specific chunk of large files to save context window tokens.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "filename": {
                    "type": "STRING",
                    "description": "The exact name of the file to read (as seen in your system index)."
                },
                "startLine": {
                    "type": "NUMBER",
                    "description": "Optional: Start line number to read from (e.g. 0)"
                },
                "endLine": {
                    "type": "NUMBER",
                    "description": "Optional: End line number to read up to (e.g. 500)"
                }
            },
            "required": [
                "filename"
            ]
        }
    },
    {
        "name": "save_chat_to_backpack",
        "description": "Automatically bundles the entire current conversation history and saves it to the Backpack as a markdown file. Use this when the user asks to save the chat or conversation.",
        "parameters": {
            "type": "OBJECT",
            "properties": {}
        }
    },
    {
        "name": "export_chat_history",
        "description": "Export the entire current chat history natively as a LibreOffice Document (.doc), PDF, or Spreadsheet (.csv). Use this when the user asks to export or download the chat as a file instead of just saving it to the internal backpack.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "format": {
                    "type": "STRING",
                    "description": "The file format to export. Can be 'doc', 'pdf', or 'csv'."
                }
            },
            "required": [
                "format"
            ]
        }
    },
    {
        "name": "compare_open_tabs",
        "description": "Reads the page content of ALL currently open browser tabs and outputs a comprehensive comparison. Ideal for comparing products (Amazon), features (SaaS), or properties across different pages.",
        "parameters": {
            "type": "OBJECT",
            "properties": {}
        }
    },
    {
        "name": "list_backpack",
        "description": "List all files currently saved in Pidgey's internal Backpack.",
        "parameters": {
            "type": "OBJECT",
            "properties": {}
        }
    },
    {
        "name": "search_backpack",
        "description": "True RAG (Vector Search) query across all ingested Backpack documents. Performs semantic similarity search against local vector embeddings and returns the most relevant paragraphs.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "query": {
                    "type": "STRING",
                    "description": "The specific question or information to search the backpack for."
                }
            },
            "required": [
                "query"
            ]
        }
    },
    {
        "name": "update_preferences",
        "description": "Remember a user preference or personal detail in long-term Nest-Egg memory.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "key": {
                    "type": "STRING",
                    "description": "Memory key (e.g., user_name, preferred_style)."
                },
                "value": {
                    "type": "STRING",
                    "description": "Value to remember."
                }
            },
            "required": [
                "key",
                "value"
            ]
        }
    },
    {
        "name": "update_knowledge_graph",
        "description": "Add a relational triplet to Pidgey's permanent Nest-Egg Knowledge Graph. Connect facts together.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "subject": {
                    "type": "STRING",
                    "description": "The entity, concept, or person (e.g., 'Company X')"
                },
                "relation": {
                    "type": "STRING",
                    "description": "The relationship (e.g., 'is a client of', 'founded in')"
                },
                "target": {
                    "type": "STRING",
                    "description": "The target entity, concept, or value (e.g., 'The User', '2019')"
                }
            },
            "required": [
                "subject",
                "relation",
                "target"
            ]
        }
    },
    {
        "name": "create_pidgey_studio_video",
        "description": "Send a prompt directly to the Pidgey Studio editor to create or edit a video. This completely bypasses the UI and goes straight to the Studio engine.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "prompt": {
                    "type": "STRING",
                    "description": "The command or instruction for Pidgey Studio (e.g. 'Create a cinematic trailer', 'Zoom in on the first clip')"
                }
            },
            "required": [
                "prompt"
            ]
        }
    },
    {
        "name": "create_libreoffice_document",
        "description": "Generate a new document, compile research, or append to user preferences natively via LibreOffice opening it for the user automatically. Returns success.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "title": {
                    "type": "STRING",
                    "description": "The title or filename of the document (e.g. 'Bitcoin Research 2026')."
                },
                "content": {
                    "type": "STRING",
                    "description": "The exact document content. You MUST use rich HTML formatting here. Use <h1>, <h2>, <p>, <table>, and <span style=\"color:blue\"> inline CSS to make it beautiful. If the user asks for charts, build a clean HTML table or use emojis with colored spans to simulate bar charts! Native Markdown will not work as well as HTML."
                },
                "format": {
                    "type": "STRING",
                    "description": "Optional format. Can be 'odt' (default) or 'pdf'."
                }
            },
            "required": [
                "title",
                "content"
            ]
        }
    },
    {
        "name": "send_pidgeypost_email",
        "description": "Draft and schedule an email via the PidgeyPost API. Optionally, you can set a scheduled date.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "to": {
                    "type": "STRING",
                    "description": "Recipient email address"
                },
                "subject": {
                    "type": "STRING",
                    "description": "Email subject line"
                },
                "body": {
                    "type": "STRING",
                    "description": "Email body content (HTML or plain text)"
                },
                "scheduleDate": {
                    "type": "STRING",
                    "description": "Optional. ISO 8601 date string to schedule the email (e.g. \"2026-03-02T09:00:00Z\"). Leave blank to send immediately."
                }
            },
            "required": [
                "to",
                "subject",
                "body"
            ]
        }
    },
    {
        "name": "generate_image",
        "description": "Generate an image or edit an existing image from a text prompt using Nano Banana. Useful for creating visual assets, mockups, or when the user asks to 'make an image', 'draw', or 'generate'.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "prompt": {
                    "type": "STRING",
                    "description": "The detailed description of the image to generate."
                }
            },
            "required": [
                "prompt"
            ]
        }
    },
    {
        "name": "growth_scrape_social_threads",
        "description": "Autonomous Growth Engine: Scrape Twitter, Reddit, or LinkedIn for specific keywords (e.g., 'expensive AI', 'ChatGPT alternate') to identify pain points and potential users.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "platform": {
                    "type": "STRING",
                    "description": "The social platform to search (e.g., 'reddit', 'twitter', 'linkedin')."
                },
                "keywords": {
                    "type": "STRING",
                    "description": "The exact search queries or keywords to monitor."
                },
                "maxResults": {
                    "type": "NUMBER",
                    "description": "Maximum number of threads to return (default is 10)."
                }
            },
            "required": [
                "platform",
                "keywords"
            ]
        }
    },
    {
        "name": "growth_auto_reply_draft",
        "description": "Autonomous Growth Engine: Navigate to a lead's social thread URL and inject a hyper-contextual, non-spammy reply into the composition box for the user to review.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "threadUrl": {
                    "type": "STRING",
                    "description": "URL of the specific thread to reply to."
                },
                "replyText": {
                    "type": "STRING",
                    "description": "The custom drafted reply text to inject. Be highly contextual and mention BYOK."
                }
            },
            "required": [
                "threadUrl",
                "replyText"
            ]
        }
    },
    {
        "name": "growth_competitor_intel_scan",
        "description": "Autonomous Growth Engine: Scan a competitor's domain for recent pricing changes, new feature drops, or marketing pivots. Alerts the user if significant events are detected.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "competitorUrl": {
                    "type": "STRING",
                    "description": "The landing page or pricing page URL of a competitor."
                }
            },
            "required": [
                "competitorUrl"
            ]
        }
    },
    {
        "name": "growth_multi_platform_megaphone",
        "description": "Autonomous Growth Engine: Write once, post everywhere. Provide reformatted versions of a single marketing update tailored for Twitter, LinkedIn, Reddit, and IndieHackers. Pidgey will open all tabs and inject the text into the composition boxes automatically.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "twitterPost": {
                    "type": "STRING",
                    "description": "Short, punchy version optimized for Twitter/X with #hashtags."
                },
                "linkedinPost": {
                    "type": "STRING",
                    "description": "Professional, story-driven version for LinkedIn."
                },
                "redditPost": {
                    "type": "STRING",
                    "description": "Raw, technical, and authentic version for Reddit (e.g. r/SideProject)."
                },
                "indieHackersPost": {
                    "type": "STRING",
                    "description": "Founder-focused, milestone-driven version for IndieHackers."
                }
            },
            "required": [
                "twitterPost",
                "linkedinPost",
                "redditPost",
                "indieHackersPost"
            ]
        }
    },
    {
        "name": "growth_analytics_translator",
        "description": "Autonomous Growth Engine: Takes a screenshot of the current analytics dashboard (e.g. Google Analytics, Plausible), analyzes the charts/metrics via Vision, and returns plain-English actionable advice on marketing performance/user behavior.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "dashboardContext": {
                    "type": "STRING",
                    "description": "Context about the analytics dashboard currently open (e.g., 'Google Analytics traffic last 7 days')."
                }
            },
            "required": ["dashboardContext"]
        }
    },
    {
        "name": "growth_zero_friction_outreach",
        "description": "Autonomous Growth Engine: Scans the current page/profile for an email or contact form, drafts a hyper-personalized cold outreach pitch based on their background, and automatically opens the compose box (Gmail/PidgeyPost/Outlook) with the draft ready.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "recipientName": {
                    "type": "STRING",
                    "description": "The name of the recipient, scraped from context."
                },
                "emailAddress": {
                    "type": "STRING",
                    "description": "The email address of the recipient (if found)."
                },
                "emailSubject": {
                    "type": "STRING",
                    "description": "A catchy, personalized subject line for the pitch."
                },
                "emailBody": {
                    "type": "STRING",
                    "description": "The personalized body of the email pitching a collaboration or Pidgey Assist."
                }
            },
            "required": ["recipientName", "emailSubject", "emailBody"]
        }
    },
    {
        "name": "growth_creator_bounty_campaign",
        "description": "Autonomous Growth Engine: Perform an auto-bounty campaign. Pidgey will search YouTube for creators related to a niche, fetch their contact info, and draft a personalized outreach email offering a free access code in exchange for a review.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "nicheKeywords": {
                    "type": "STRING",
                    "description": "Keywords to search for creators (e.g. 'ChatGPT alternatives', 'AI productivity hacks')."
                },
                "bountyOffer": {
                    "type": "STRING",
                    "description": "The exact bounty or offer to pitch (e.g. 'Free Pro access code for your audience')."
                }
            },
            "required": ["nicheKeywords", "bountyOffer"]
        }
    },
    {
        "name": "delegate_task",
        "description": "SWARM MODE: Delegate a sub-task to a specialized Pidgey Persona (Trader, Homestead, Reseller, Worker) to execute in parallel. Always use this when the user requests Swarm mode or an expert.",
        "parameters": {
            "type": "OBJECT",
            "properties": {
                "persona": {
                    "type": "STRING",
                    "description": "The specialized persona to use: 'Trader', 'Homestead', 'Reseller', or 'Worker'."
                },
                "task": {
                    "type": "STRING",
                    "description": "The comprehensive task instruction and context for the sub-agent."
                }
            },
            "required": ["persona", "task"]
        }
    }
];
