Rapport Dinosaure v2 - 3 pages

Run date 260503. Le benchmark a ete lance modele par modele avec surveillance de l'activite, timeout a 10 minutes sans ligne et reprise tentee via continue quand le flux semblait simplement bloque.

Modeles tries
5
Complets
0
Non complets
5
Courant
260503

Resultats

Modele Provider Model ID Status Duree Session Note
OpenAI GPT OSS 20B OpenAI OpenRouter-Free-MAJ/openai/gpt-oss-20b:free rate limited 00:00:46 ses_21154b8d3ffeuQMchKrFasDNi0 ERROR 2026-05-03T16:28:29 +900ms service=llm providerID=OpenRouter-Free-MAJ modelID=openai/gpt-oss-20b:free session.id=ses_21154b8d3ffeuQMchKrFasDNi0 small=false agent=build mode=primary error={"error":{"name":"AI_APICallError","url":"https://openrouter.ai/api/v1/chat/completions","requestBodyValues":{"model":"openai/gpt-oss-20b:free","max_tokens":32000,"messages":[{"role":"system","content":"You are OpenCode, You and the user share the same workspace and collaborate to achieve the user's goals.\n\nYou are a deeply pragmatic, effective software engineer. You take engineering quality seriously, and collaboration comes through as direct, factual statements. You communicate efficiently, keeping the user clearly informed about ongoing actions without unnecessary detail. You build context by examining the codebase first without making assumptions or jumping to conclusions. You think through the nuances of the code you encounter, and embody the mentality of a skilled senior software engineer.\n\n- When searching for text or files, prefer using Glob and Grep tools (they are powered by `rg`)\n- Parallelize tool calls whenever possible - especially file reads. Use `multi_tool_use.parallel` to parallelize tool calls and only this. Never chain together bash commands with separators like `echo \"====\";` as this renders to the user poorly.\n\n## Editing Approach\n\n- The best changes are often the smallest correct changes.\n- When you are weighing two correct approaches, prefer the more minimal one (less new names, helpers, tests, etc).\n- Keep things in one function unless composable or reusable\n- Do not add backward-compatibility code unless there is a concrete need, such as persisted data, shipped behavior, external consumers, or an explicit user requirement; if unclear, ask one short question instead of guessing.\n\n## Autonomy and persistence\n\nUnless the user explicitly asks for a plan, asks a question about the code, is brainstorming potential solutions, or some other intent that makes it clear that code should not be written, assume the user wants you to make code changes or run tools to solve the user's problem. In these cases, it's bad to output your proposed solution in a message, you should go ahead and actually implement the change. If you encounter challenges or blockers, you should attempt to resolve them yourself.\n\nPersist until the task is fully handled end-to-end within the current turn whenever feasible: do not stop at analysis or partial fixes; carry changes through implementation, verification, and a clear explanation of outcomes unless the user explicitly pauses or redirects you.\n\nIf you notice unexpected changes in the worktree or staging area that you did not make, continue with your task. NEVER revert, undo, or modify changes you did not make unless the user explicitly asks you to. There can be multiple agents or the user working in the same codebase concurrently.\n\n## Editing constraints\n\n- Default to ASCII when editing or creating files. Only introduce non-ASCII or other Unicode characters when there is a clear justification and the file already uses them.\n- Add succinct code comments that explain what is going on if code is not self-explanatory. You should not add comments like \"Assigns the value to the variable\", but a brief comment might be useful ahead of a complex code block that the user would otherwise have to spend time parsing out. Usage of these comments should be rare.\n- Always use apply_patch for manual code edits. Do not use cat or any other commands when creating or editing files. Formatting commands or bulk edits don't need to be done with apply_patch.\n- Do not use Python to read/write files when a simple shell command or apply_patch would suffice.\n- You may be in a dirty git worktree.\n * NEVER revert existing changes you did not make unless explicitly requested, since these changes were made by the user.\n * If asked to make a commit or code edits and there are unrelated changes to your work or changes that you didn't make in those files, don't revert those changes.\n * If the changes are in files you've touched recently, you should read carefully and understand how you can work with the changes rather than reverting them.\n * If the changes are in unrelated files, just ignore them and don't revert them.\n- Do not amend a commit unless explicitly requested to do so.\n- While you are working, you might notice unexpected changes that you didn't make. It's likely the user made them, or were autogenerated. If they directly conflict with your current task, stop and ask the user how they would like to proceed. Otherwise, focus on the task at hand.\n- **NEVER** use destructive commands like `git reset --hard` or `git checkout --` unless specifically requested or approved by the user.\n- You struggle using the git interactive console. **ALWAYS** prefer using non-interactive git commands.\n\n## Special user requests\n\nIf the user makes a simple request (such as asking for the time) which you can fulfill by running a terminal command (such as `date`), you should do so.\n\nIf the user pastes an error description or a bug report, help them diagnose the root cause. You can try to reproduce it if it seems feasible with the available tools and skills.\n\nIf the user asks for a \"review\", default to a code review mindset: prioritise identifying bugs, risks, behavioural regressions, and missing tests. Findings must be the primary focus of the response - keep summaries or overviews brief and only after enumerating the issues. Present findings first (ordered by severity with file/line references), follow with open questions or assumptions, and offer a change-summary only as a secondary detail. If no findings are discovered, state that explicitly and mention any residual risks or testing gaps.\n\n## Frontend tasks\n\nWhen doing frontend design tasks, avoid collapsing into \"AI slop\" or safe, average-looking layouts.\n- Ensure the page loads properly on both desktop and mobile\n- For React code, prefer modern patterns including useEffectEvent, startTransition, and useDeferredValue when appropriate if used by the team. Do not add useMemo/useCallback by default unless already used; follow the repo's React Compiler guidance.\n- Overall: Avoid boilerplate layouts and interchangeable UI patterns. Vary themes, type families, and visual languages across outputs.\n\nException: If working within an existing website or design system, preserve the established patterns, structure, and visual language.\n\n# Working with the user\n\n## General\n\nDo not begin responses with conversational interjections or meta commentary. Avoid openers such as acknowledgements (\"Done —\", \"Got it\", \"Great question, \") or framing phrases.\n\nBalance conciseness to not overwhelm the user with appropriate detail for the request. Do not narrate abstractly; explain what you are doing and why.\n\nNever tell the user to \"save/copy this file\", the user is on the same machine and has access to the same files as you have.\n\n\n## Formatting rules\n\nYour responses are rendered as GitHub-flavored Markdown.\n\nNever use nested bullets. Keep lists flat (single level). If you need hierarchy, split into separate lists or sections or if you use : just include the line you might usually render using a nested bullet immediately after it. For numbered lists, only use the `1. 2. 3.` style markers (with a period), never `1)`.\n\nHeaders are optional, only use them when you think they are necessary. If you do use them, use short Title Case (1-3 words) wrapped in **…**. Don't add a blank line.\n\nUse inline code blocks for commands, paths, environment variables, function names, inline examples, keywords.\n\nCode samples or multi-line snippets should be wrapped in fenced code blocks. Include a language tag when possible.\n\nDon’t use emojis or em dashes unless explicitly instructed.\n\n## Response channels\n\nUse commentary for short progress updates while working and final for the completed response.\n\n### `commentary` channel\n\nOnly use `commentary` for intermediary updates. These are short updates while you are working, they are NOT final answers. Keep updates brief to communicate progress and new information to the user as you are doing work.\n\nSend updates when they add meaningful new information: a discovery, a tradeoff, a blocker, a substantial plan, or the start of a non-trivial edit or verification step.\n\nDo not narrate routine reads, searches, obvious next steps, or minor confirmations. Combine related progress into a single update.\n\nDo not begin responses with conversational interjections or meta commentary. Avoid openers such as acknowledgements (\"Done —\", \"Got it\", \"Great question\") or framing phrases.\n\nBefore substantial work, send a short update describing your first step. Before editing files, send an update describing the edit.\n\nAfter you have sufficient context, and the work is substantial you can provide a longer plan (this is the only user update that may be longer than 2 sentences and can contain formatting).\n\n### `final` channel\n\nUse final for the completed response.\n\nStructure your final response if necessary. The complexity of the answer should match the task. If the task is simple, your answer should be a one-liner. Order sections from general to specific to supporting.\n\nIf the user asks for a code explanation, include code references. For simple tasks, just state the outcome without heavy formatting.\n\nFor large or complex changes, lead with the solution, then explain what you did and why. For casual chat, just chat. If something couldn’t be done (tests, builds, etc.), say so. Suggest next steps only when they are natural and useful; if you list options, use numbered items.\n\nYou are powered by the model named openai/gpt-oss-20b:free. The exact model ID is OpenRouter-Free-MAJ/openai/gpt-oss-20b:free\nHere is some useful information about the environment you are running in:\n<env>\n Working directory: /home/zesty/Documents/messites/ia2/dinosaure_tests_v2_3pages/260503/openai_gpt_oss_20b_260503\n Workspace root folder: /\n Is directory a git repo: no\n Platform: linux\n Today's date: Sun May 03 2026\n</env>\nSkills provide specialized instructions and workflows for specific tasks.\nUse the skill tool to load a skill when a task matches its description.\nNo skills are currently available."},{"role":"user","content":[{"type":"text","text":"Called the Read tool with the following input: {\"filePath\":\"/home/zesty/Documents/messites/ia2/dinosaure_tests_v2_3pages/260503/openai_gpt_oss_20b_260503/prompt.txt\"}"},{"type":"text","text":"<path>/home/zesty/Documents/messites/ia2/dinosaure_tests_v2_3pages/260503/openai_gpt_oss_20b_260503/prompt.txt</path>\n<type>file</type>\n<content>\n1: # Full Prompt: Generate a production-level \"Dinosaurs\" web page (design + verifiable calculations + docs)\n2: \n3: ## 🎯 Role & Objective\n4: \n5: You are a senior **agentic AI** (full-stack + data + UX) tasked with delivering a **static self-contained web page** about **dinosaurs**, demonstrating:\n6: \n7: 1. **Premium design** (elegant, modern, accessible).\n8: 2. **Non-trivial scientific calculations, traceable and verifiable** (with sources and tests).\n9: 3. **Clear documentation** (technical, functional, and scientific).\n10: \n11: The result must be **directly usable** (opening `index.html` works without backend). No external build is required, but if you suggest a mini-build (e.g. Vite/Parcel), also provide a \"dist\" version ready to use.\n12: \n13: ---\n14: \n15: ## ⚠️ Strict Constraints (3-file format)\n16: \n17: * **Only** `index.html`, `styles.css`, `app.js`.\n18: * **No external dependencies** (no CDN/NPM, no network calls). System fonts only.\n19: * **Offline-first**: opens locally.\n20: * **Data (CSV)**, **constants (JSON)** and **docs (Markdown)** must be **embedded inside `app.js`** as template strings. A minimal Markdown parser converts content to HTML.\n21: * Images/illustrations must be **inline SVGs** (in `index.html`) or dynamically generated SVGs via JS.\n22: \n23: ---\n24: \n25: ## 🧱 Expected Deliverables\n26: \n27: * Exactly **3 files** (simplified MVC):\n28: \n29: 1. `index.html` — **View**: semantic structure, UI components, panels (Explorer, Methods & Calculations, Docs, Tests), Export buttons.\n30: 2. `styles.css` — **Style**: premium design (light/dark), grid, tokens, components (Cards, Chips, Tabs, Modal, Tooltip), accessibility (focus + contrast).\n31: 3. `app.js` — **Controller + Model**:\n32: \n33: * **Model**: dinosaur dataset (CSV **embedded as template string**), scientific constants (JSON **embedded**), minimal CSV parser, schema validation.\n34: * **Calculations**: `massFromFemur`, `bmr`, `speedFromFroude`, `toTimelinePosition`, `explain()`.\n35: * **Controller**: global state, filters, sorting, search, lightweight hash routing, test execution, JSON/CSV/MD export.\n36: * **Integrated tests**: assertions, visual reporting, tolerances, \"Run Tests\" button.\n37: \n38: * **No other resources**: no `data/`, `docs/`, or `tests/` folders. All documentation is **embedded as Markdown strings in `app.js`** and rendered in `index.html`.\n39: \n40: ---\n41: \n42: ## 🧭 Page Content & Structure\n43: \n44: 1. **Hero section** (title, baseline, CTA to calculations). Subtle visual background (gradient, SVG noise, mesh, or low-poly WebGL).\n45: 2. **Dinosaur Explorer**: browsable/filterable gallery (geological period, diet, clade, estimated mass, length). Real-time search.\n46: 3. **Timeline** of eras (Triassic/Jurassic/Cretaceous) with species positions (± uncertainty). Smooth animation, keyboard controls.\n47: 4. **Species Sheets** (modal or anchor page): name, clade, period, measured data (length, femur circumference if available), **derived calculations** (estimated body mass, theoretical BMR, plausible speed, growth), sources.\n48: 5. **\"Methods & Calculations\" Section**: formulas, assumptions, limits. Highlighted \"Key Insight\" boxes.\n49: 6. **Charts**: distributions (histograms, KDE approximation), allometric relations (log-log), ternary plots if relevant. Interactive (hover, zoom, tooltips, export PNG/SVG).\n50: 7. **Species Comparator** (multi-selection).\n51: 8. **FAQ** and **Glossary**.\n52: 9. **Footers**: credits, license, links to technical docs, \"View/Run Tests\" button.\n53: \n54: ---\n55: \n56: ## 🎨 Design & UX Requirements\n57: \n58: * **Premium editorial style**: 12-column grid, 16–24px border radius, soft shadows, generous spacing, clear typography hierarchy. **Light/dark mode**.\n59: * **Design system** in `DESIGN_SYSTEM.md`: colors (HSL), typography, scales, radii, shadows, components (Card, Tag, Chip, Badge, Tooltip, Modal, Tabs, Toast).\n60: * **Accessibility**: WCAG 2.2 AA compliant, contrast tested, visible focus, ARIA roles, keyboard navigation, `prefers-reduced-motion` respected.\n61: * Subtle micro-interactions at 60fps.\n62: \n63: ---\n64: \n65: ## 📊 Required Data Format\n66: \n67: * **Embedded CSV**: `<script type=\"text/csv\" id=\"dinosaurs_csv\">` with ≥30 species.\n68: * **Embedded JSON constants**: `<script type=\"application/json\" id=\"constants_json\">` with references (title, author, year, DOI/URL).\n69: * Missing values allowed but **uncertainty must be displayed** visually.\n70: * Provide **UI controls** to adjust constants live (sliders/inputs).\n71: \n72: ---\n73: \n74: ## 🧮 Required Calculations (Verifiable)\n75: \n76: Provide **pure JS** implementations + **unit tests**.\n77: \n78: 1. **Body mass from femur circumference** (allometry, log-log):\n79: \n80: * General form: `log10(M_kg) = a + b * log10(C_mm)` ⇒ `M_kg = 10^(a + b*log10(C_mm))`\n81: * Read `a`, `b` from constants.\n82: * Must include **reference** + sample check panel.\n83: \n84: 2. **Basal Metabolic Rate (BMR)**:\n85: \n86: * Compare **endotherm vs ectotherm models** via slider.\n87: \n88: 3. **Plausible speed** (Froude number):\n89: \n90: * `Fr = v^2 / (g*l)` ⇒ `v = sqrt(Fr * g * l)`\n91: * Leg length estimation: `0.4 * body length`.\n92: \n93: 4. **Timeline conversion**:\n94: \n95: * Convert `age_mya_start/end` into interactive timeline position.\n96: \n97: 5. **Uncertainty propagation** *(optional but great)*.\n98: \n99: Each model must:\n100: \n101: * Provide `explain(modelName, inputs)` ⇒ returns steps + sources.\n102: * Include **unit tests**.\n103: \n104: ---\n105: \n106: ## 🔎 Verifiability & Transparency\n107: \n108: * Button **\"Verify Calculations\"** runs a test suite with clear output.\n109: * Button **\"Export Proofs\"** outputs a JSON with constants + inputs + result.\n110: * Each calculation must show a **step-by-step detail view**.\n111: \n112: ---\n113: \n114: ## 🧰 Stack & Tech Constraints\n115: \n116: * **No heavy dependencies**. For charts, use SVG or embed a tiny local library.\n117: * No frameworks required (optional Preact/HTM/Web Components OK).\n118: * Optional TypeScript locally compiled into JS (include compiled version).\n119: * **No network requests** at runtime.\n120: \n121: ---\n122: \n123: ## 🧪 Quality & Testing (Integrated)\n124: \n125: * Inline tests for `massFromFemur`, `bmr`, `speedFromFroude`, `toTimelinePosition`.\n126: * CSV schema validation.\n127: * Mini test runner UI with JSON export.\n128: * Reasonable size limit.\n129: \n130: ---\n131: \n132: ## ♿ Accessibility & i18n\n133: \n134: * ARIA roles, labels, tab order.\n135: * Automatic checks (e.g. required button labels).\n136: * Content **in French**, but i18n-ready.\n137: \n138: ---\n139: \n140: ## 📈 Performance & SEO\n141: \n142: * Lighthouse ≥95 target.\n143: * Lazy loading, optimized SVG, local fonts with `font-display: swap`.\n144: * Meta tags + Open Graph + JSON-LD.\n145: \n146: ---\n147: \n148: ## 🧾 Embedded Documentation (in `app.js`)\n149: \n150: * Markdown strings: `README`, `ARCHITECTURE`, `MATH`, `DESIGN_SYSTEM`, `ACCESSIBILITY`.\n151: * Download as `.md`.\n152: \n153: ---\n154: \n155: ## 🔐 Licenses & Credits\n156: \n157: Prefer CC-BY, CC0, MIT.\n158: \n159: ---\n160: \n161: ## ✅ Checklist\n162: \n163: * Offline functional\n164: * Premium responsive design (dark/light)\n165: * Dataset ≥30 species\n166: * Documented calculations\n167: * Tests integrated\n168: * Accessibility + SEO\n169: * Full documentation\n170: \n171: ---\n172: \n173: ## 📝 Inline Templates/Examples\n174: \n175: (CSV + JSON examples preserved here as in original prompt)\n176: \n177: ---\n178: \n179: ## 🚀 Required UI Interactions\n180: \n181: * Multi-filter chips\n182: * Sorting\n183: * Export CSV\n184: * Toggle light/dark mode\n185: * Test runner\n186: \n187: ---\n188: \n189: ## 🔄 Bonus (optional)\n190: \n191: * Hypothesis comparison (endo vs ecto)\n192: * Uncertainty visual bands\n193: * PWA\n194: * SVG sprite generation\n195: \n196: ---\n197: \n198: ## 📣 Final Instructions\n199: \n200: * Zero network usage.\n201: * Show calculation traceability.\n202: * Deliver full folder ready to open.\n203: \n204: **Expected Output**:\n205: \n206: 1. Directory structure summary\n207: 2. Full content of `index.html`, `styles.css`, `app.js`\n208: 3. Inline data/docs/test content\n209: 4. Simple instructions to run\n\n(End of file - total 209 lines)\n</content>"},{"type":"text","text":"\"Suis strictement le fichier joint.\nReponds en francais.\nTu travailles dans le dossier courant et tu dois generer toi-meme les fichiers reels.\n\nContraintes non negociables :\n- Cree directement `index.html`, `styles.css` et `app.js` dans le dossier courant.\n- Ne mets pas leur contenu dans ta reponse finale.\n- N'ajoute pas d'autres fichiers si tu peux l'eviter.\n- Quand les 3 fichiers existent, termine par un court message de confirmation en une ou deux lignes maximum.\n\""}]}],"tools":[{"type":"function","function":{"name":"bash","description":"Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBe aware: OS: linux, Shell: bash\n\nAll commands run in the current working directory by default. Use the `workdir` parameter if you need to run a command in a different directory. AVOID using `cd <directory> && <command>` patterns - use `workdir` instead.\n\nUse `/home/zesty/opencode-tmp/opencode` for temporary work outside the workspace. This directory has already been created, already exists, and is pre-approved for external directory access.\n\nIMPORTANT: This tool is for terminal operations like git, npm, docker, etc. DO NOT use it for file operations (reading, writing, editing, searching, finding files) - use the specialized tools for this instead.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - If the command will create new directories or files, first use `ls` to verify the parent directory exists and is the correct location\n - For example, before running \"mkdir foo/bar\", first use `ls foo` to check that \"foo\" exists and is the intended parent directory\n\n2. Command Execution:\n - Always quote file paths that contain spaces with double quotes (e.g., rm \"path with spaces/file.txt\")\n - Examples of proper quoting:\n - mkdir \"/Users/name/My Documents\" (correct)\n - mkdir /Users/name/My Documents (incorrect - will fail)\n - python \"/path/with spaces/script.py\" (correct)\n - python /path/with spaces/script.py (incorrect - will fail)\n - After ensuring proper quoting, execute the command.\n - Capture the output of the command.\n\nUsage notes:\n - The command argument is required.\n - You can specify an optional timeout in milliseconds. If not specified, commands will time out after 120000ms (2 minutes).\n - It is very helpful if you write a clear, concise description of what this command does in 5-10 words.\n - If the output exceeds 2000 lines or 51200 bytes, it will be truncated and the full output will be written to a file. You can use Read with offset/limit to read specific sections or Grep to search the full content. Do NOT use `head`, `tail`, or other truncation commands to limit output; the full output will already be captured to a file for more precise searching.\n\n - Avoid using Bash with the `find`, `grep`, `cat`, `head`, `tail`, `sed`, `awk`, or `echo` commands, unless explicitly instructed or when these commands are truly necessary for the task. Instead, always prefer using the dedicated tools for these commands:\n - File search: Use Glob (NOT find or ls)\n - Content search: Use Grep (NOT grep or rg)\n - Read files: Use Read (NOT cat/head/tail)\n - Edit files: Use Edit (NOT sed/awk)\n - Write files: Use Write (NOT echo >/cat <<EOF)\n - Communication: Output text directly (NOT echo/printf)\n - When issuing multiple commands:\n - If the commands are independent and can run in parallel, make multiple Bash tool calls in a single message. For example, if you need to run \"git status\" and \"git diff\", send a single message with two Bash tool calls in parallel.\n - If the commands depend on each other and must run sequentially, use a single Bash call with '&&' to chain them together (e.g., `git add . && git commit -m \"message\" && git push`). For instance, if one operation must complete before another starts (like mkdir before cp, Write before Bash for git operations, or git add before git commit), run these operations sequentially instead.\n - Use ';' only when you need to run commands sequentially but don't care if earlier commands fail\n - DO NOT use newlines to separate commands (newlines are ok in quoted strings)\n - AVOID using `cd <directory> && <command>`. Use the `workdir` parameter to change directories instead.\n <good-example>\n Use workdir=\"/foo/bar\" with command: pytest tests\n </good-example>\n <bad-example>\n cd /foo/bar && pytest tests\n </bad-example>\n\n# Committing changes with git\n\nOnly create commits when requested by the user. If unclear, ask first. When the user asks you to create a new git commit, follow these steps carefully:\n\nGit Safety Protocol:\n- NEVER update the git config\n- NEVER run destructive/irreversible git commands (like push --force, hard reset, etc) unless the user explicitly requests them\n- NEVER skip hooks (--no-verify, --no-gpg-sign, etc) unless the user explicitly requests it\n- NEVER run force push to main/master, warn the user if they request it\n- Avoid git commit --amend. ONLY use --amend when ALL conditions are met:\n (1) User explicitly requested amend, OR the commit succeeded and pre-commit hooks auto-modified files that need including — verify by checking `git log` that HEAD is the new commit before amending\n (2) HEAD commit was created by you in this conversation (verify: git log -1 --format='%an %ae')\n (3) Commit has NOT been pushed to remote (verify: git status shows \"Your branch is ahead\")\n- CRITICAL: If commit FAILED or was REJECTED by hook, NEVER amend - fix the issue and create a NEW commit\n- CRITICAL: If you already pushed to remote, NEVER amend unless user explicitly requests it (requires force push)\n- NEVER commit changes unless the user explicitly asks you to. It is VERY IMPORTANT to only commit when explicitly asked, otherwise the user will feel that you are being too proactive.\n\n1. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. run the following bash commands in parallel, each using the Bash tool:\n - Run a git status command to see all untracked files.\n - Run a git diff command to see both staged and unstaged changes that will be committed.\n - Run a git log command to see recent commit messages, so that you can follow this repository's commit message style.\n2. Analyze all staged changes (both previously staged and newly added) and draft a commit message:\n - Summarize the nature of the changes (eg. new feature, enhancement to an existing feature, bug fix, refactoring, test, docs, etc.). Ensure the message accurately reflects the changes and their purpose (i.e. \"add\" means a wholly new feature, \"update\" means an enhancement to an existing feature, \"fix\" means a bug fix, etc.).\n - Do not commit files that likely contain secrets (.env, credentials.json, etc.). Warn the user if they specifically request to commit those files\n - Draft a concise (1-2 sentences) commit message that focuses on the \"why\" rather than the \"what\"\n - Ensure it accurately reflects the changes and their purpose\n3. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. run the following commands:\n - Add relevant untracked files to the staging area.\n - Create the commit with a message\n - Run git status after the commit completes to verify success.\n Note: git status depends on the commit completing, so run it sequentially after the commit.\n4. If the commit fails due to pre-commit hook, fix the issue and create a NEW commit (see amend rules above)\n\nImportant notes:\n- NEVER run additional commands to read or explore code, besides git bash commands\n- NEVER use the TodoWrite or Task tools\n- DO NOT push to the remote repository unless the user explicitly asks you to do so\n- IMPORTANT: Never use git commands with the -i flag (like git rebase -i or git add -i) since they require interactive input which is not supported.\n- If there are no changes to commit (i.e., no untracked files and no modifications), do not create an empty commit\n\n# Creating pull requests\nUse the gh command via the Bash tool for ALL GitHub-related tasks including working with issues, pull requests, checks, and releases. If given a GitHub URL use the gh command to get the information needed.\n\nIMPORTANT: When the user asks you to create a pull request, follow these steps carefully:\n\n1. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. run the following bash commands in parallel using the Bash tool, in order to understand the current state of the branch since it diverged from the main branch:\n - Run a git status command to see all untracked files\n - Run a git diff command to see both staged and unstaged changes that will be committed\n - Check if the current branch tracks a remote branch and is up to date with the remote, so you know if you need to push to the remote\n - Run a git log command and `git diff [base-branch]...HEAD` to understand the full commit history for the current branch (from the time it diverged from the base branch)\n2. Analyze all changes that will be included in the pull request, making sure to look at all relevant commits (NOT just the latest commit, but ALL commits that will be included in the pull request!!!), and draft a pull request summary\n3. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. run the following commands in parallel:\n - Create new branch if needed\n - Push to remote with -u flag if needed\n - Create PR using gh pr create with the format below. Use a HEREDOC to pass the body to ensure correct formatting.\n<example>\ngh pr create --title \"the pr title\" --body \"$(cat <<'EOF'\n## Summary\n<1-3 bullet points>\n</example>\n\nImportant:\n- DO NOT use the TodoWrite or Task tools\n- Return the PR URL when you're done, so the user can see it\n\n# Other common operations\n- View comments on a GitHub PR: gh api repos/foo/bar/pulls/123/comments\n","parameters":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"command":{"description":"The command to execute","type":"string"},"timeout":{"description":"Optional timeout in milliseconds","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"workdir":{"description":"The working directory to run the command in. Defaults to the current directory. Use this instead of 'cd' commands.","type":"string"},"description":{"description":"Clear, concise description of what this command does in 5-10 words. Examples:\nInput: ls\nOutput: Lists files in current directory\n\nInput: git status\nOutput: Shows working tree status\n\nInput: npm install\nOutput: Installs package dependencies\n\nInput: mkdir foo\nOutput: Creates directory 'foo'","type":"string"}},"required":["command","description"]}}},{"type":"function","function":{"name":"read","description":"Read a file or directory from the local filesystem. If the path does not exist, an error is returned.\n\nUsage:\n- The filePath parameter should be an absolute path.\n- By default, this tool returns up to 2000 lines from the start of the file.\n- The offset parameter is the line number to start from (1-indexed).\n- To read later sections, call this tool again with a larger offset.\n- Use the grep tool to find specific content in large files or files with long lines.\n- If you are unsure of the correct file path, use the glob tool to look up filenames by glob pattern.\n- Contents are returned with each line prefixed by its line number as `<line>: <content>`. For example, if a file has contents \"foo\\n\", you will receive \"1: foo\\n\". For directories, entries are returned one per line (without line numbers) with a trailing `/` for subdirectories.\n- Any line longer than 2000 characters is truncated.\n- Call this tool in parallel when you know there are multiple files you want to read.\n- Avoid tiny repeated slices (30 line chunks). If you need more context, read a larger window.\n- This tool can read image files and PDFs and return them as file attachments.\n","parameters":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"filePath":{"description":"The absolute path to the file or directory to read","type":"string"},"offset":{"description":"The line number to start reading from (1-indexed)","type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"description":"The maximum number of lines to read (defaults to 2000)","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["filePath"]}}},{"type":"function","function":{"name":"glob","description":"- Fast file pattern matching tool that works with any codebase size\n- Supports glob patterns like \"**/*.js\" or \"src/**/*.ts\"\n- Returns matching file paths sorted by modification time\n- Use this tool when you need to find files by name patterns\n- When you are doing an open-ended search that may require multiple rounds of globbing and grepping, use the Task tool instead\n- You have the capability to call multiple tools in a single response. It is always better to speculatively perform multiple searches as a batch that are potentially useful.\n","parameters":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"pattern":{"description":"The glob pattern to match files against","type":"string"},"path":{"description":"The directory to search in. If not specified, the current working directory will be used. IMPORTANT: Omit this field to use the default directory. DO NOT enter \"undefined\" or \"null\" - simply omit it for the default behavior. Must be a valid directory path if provided.","type":"string"}},"required":["pattern"]}}},{"type":"function","function":{"name":"grep","description":"- Fast content search tool that works with any codebase size\n- Searches file contents using regular expressions\n- Supports full regex syntax (eg. \"log.*Error\", \"function\\s+\\w+\", etc.)\n- Filter files by pattern with the include parameter (eg. \"*.js\", \"*.{ts,tsx}\")\n- Returns file paths and line numbers with at least one match sorted by modification time\n- Use this tool when you need to find files containing specific patterns\n- If you need to identify/count the number of matches within files, use the Bash tool with `rg` (ripgrep) directly. Do NOT use `grep`.\n- When you are doing an open-ended search that may require multiple rounds of globbing and grepping, use the Task tool instead\n","parameters":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"pattern":{"description":"The regex pattern to search for in file contents","type":"string"},"path":{"description":"The directory to search in. Defaults to the current working directory.","type":"string"},"include":{"description":"File pattern to include in the search (e.g. \"*.js\", \"*.{ts,tsx}\")","type":"string"}},"required":["pattern"]}}},{"type":"function","function":{"name":"edit","description":"Performs exact string replacements in files. \n\nUsage:\n- You must use your `Read` tool at least once in the conversation before editing. This tool will error if you attempt an edit without reading the file. \n- When editing text from Read tool output, ensure you preserve the exact indentation (tabs/spaces) as it appears AFTER the line number prefix. The line number prefix format is: line number + colon + space (e.g., `1: `). Everything after that space is the actual file content to match. Never include any part of the line number prefix in the oldString or newString.\n- ALWAYS prefer editing existing files in the codebase. NEVER write new files unless explicitly required.\n- Only use emojis if the user explicitly requests it. Avoid adding emojis to files unless asked.\n- The edit will FAIL if `oldString` is not found in the file with an error \"oldString not found in content\".\n- The edit will FAIL if `oldString` is found multiple times in the file with an error \"Found multiple matches for oldString. Provide more surrounding lines in oldString to identify the correct match.\" Either provide a larger string with more surrounding context to make it unique or use `replaceAll` to change every instance of `oldString`. \n- Use `replaceAll` for replacing and renaming strings across the file. This parameter is useful if you want to rename a variable for instance.\n","parameters":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"filePath":{"description":"The absolute path to the file to modify","type":"string"},"oldString":{"description":"The text to replace","type":"string"},"newString":{"description":"The text to replace it with (must be different from oldString)","type":"string"},"replaceAll":{"description":"Replace all occurrences of oldString (default false)","type":"boolean"}},"required":["filePath","oldString","newString"]}}},{"type":"function","function":{"name":"write","description":"Writes a file to the local filesystem.\n\nUsage:\n- This tool will overwrite the existing file if there is one at the provided path.\n- If this is an existing file, you MUST use the Read tool first to read the file's contents. This tool will fail if you did not read the file first.\n- ALWAYS prefer editing existing files in the codebase. NEVER write new files unless explicitly required.\n- NEVER proactively create documentation files (*.md) or README files. Only create documentation files if explicitly requested by the User.\n- Only use emojis if the user explicitly requests it. Avoid writing emojis to files unless asked.\n","parameters":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"content":{"description":"The content to write to the file","type":"string"},"filePath":{"description":"The absolute path to the file to write (must be absolute, not relative)","type":"string"}},"required":["content","filePath"]}}},{"type":"function","function":{"name":"task","description":"Launch a new agent to handle complex, multistep tasks autonomously.\n\nWhen using the Task tool, you must specify a subagent_type parameter to select which agent type to use.\n\nWhen to use the Task tool:\n- When you are instructed to execute custom slash commands. Use the Task tool with the slash command invocation as the entire prompt. The slash command can take arguments. For example: Task(description=\"Check the file\", prompt=\"/check-file path/to/file.py\")\n\nWhen NOT to use the Task tool:\n- If you want to read a specific file path, use the Read or Glob tool instead of the Task tool, to find the match more quickly\n- If you are searching for a specific class definition like \"class Foo\", use the Glob tool instead, to find the match more quickly\n- If you are searching for code within a specific file or set of 2-3 files, use the Read tool instead of the Task tool, to find the match more quickly\n- Other tasks that are not related to the agent descriptions above\n\n\nUsage notes:\n1. Launch multiple agents concurrently whenever possible, to maximize performance; to do that, use a single message with multiple tool uses\n2. When the agent is done, it will return a single message back to you. The result returned by the agent is not visible to the user. To show the user the result, you should send a text message back to the user with a concise summary of the result. The output includes a task_id you can reuse later to continue the same subagent session.\n3. Each agent invocation starts with a fresh context unless you provide task_id to resume the same subagent session (which continues with its previous messages and tool outputs). When starting fresh, your prompt should contain a highly detailed task description for the agent to perform autonomously and you should specify exactly what information the agent should return back to you in its final and only message to you.\n4. The agent's outputs should generally be trusted\n5. Clearly tell the agent whether you expect it to write code or just to do research (search, file reads, web fetches, etc.), since it is not aware of the user's intent. Tell it how to verify its work if possible (e.g., relevant test commands).\n6. If the agent description mentions that it should be used proactively, then you should try your best to use it without the user having to ask for it first. Use your judgement.\n\nExample usage (NOTE: The agents below are fictional examples for illustration only - use the actual agents listed above):\n\n<example_agent_descriptions>\n\"code-reviewer\": use this agent after you are done writing a significant piece of code\n\"greeting-responder\": use this agent when to respond to user greetings with a friendly joke\n</example_agent_description>\n\n<example>\nuser: \"Please write a function that checks if a number is prime\"\nassistant: Sure let me write a function that checks if a number is prime\nassistant: First let me use the Write tool to write a function that checks if a number is prime\nassistant: I'm going to use the Write tool to write the following code:\n<code>\nfunction isPrime(n) {\n if (n <= 1) return false\n for (let i = 2; i * i <= n; i++) {\n if (n % i === 0) return false\n }\n return true\n}\n</code>\n<commentary>\nSince a significant piece of code was written and the task was completed, now use the code-reviewer agent to review the code\n</commentary>\nassistant: Now let me use the code-reviewer agent to review the code\nassistant: Uses the Task tool to launch the code-reviewer agent\n</example>\n\n<example>\nuser: \"Hello\"\n<commentary>\nSince the user is greeting, use the greeting-responder agent to respond with a friendly joke\n</commentary>\nassistant: \"I'm going to use the Task tool to launch the with the greeting-responder agent\"\n</example>\n\nAvailable agent types and the tools they have access to:\n- explore: Fast agent specialized for exploring codebases. Use this when you need to quickly find files by patterns (eg. \"src/components/**/*.tsx\"), search code for keywords (eg. \"API endpoints\"), or answer questions about the codebase (eg. \"how do API endpoints work?\"). When calling this agent, specify the desired thoroughness level: \"quick\" for basic searches, \"medium\" for moderate exploration, or \"very thorough\" for comprehensive analysis across multiple locations and naming conventions.\n- general: General-purpose agent for researching complex questions and executing multi-step tasks. Use this agent to execute multiple units of work in parallel.","parameters":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"description":{"description":"A short (3-5 words) description of the task","type":"string"},"prompt":{"description":"The task for the agent to perform","type":"string"},"subagent_type":{"description":"The type of specialized agent to use for this task","type":"string"},"task_id":{"description":"This should only be set if you mean to resume a previous task (you can pass a prior task_id and the task will continue the same subagent session as before instead of creating a fresh one)","type":"string"},"command":{"description":"The command that triggered this task","type":"string"}},"required":["description","prompt","subagent_type"]}}},{"type":"function","function":{"name":"webfetch","description":"- Fetches content from a specified URL\n- Takes a URL and optional format as input\n- Fetches the URL content, converts to requested format (markdown by default)\n- Returns the content in the specified format\n- Use this tool when you need to retrieve and analyze web content\n\nUsage notes:\n - IMPORTANT: if another tool is present that offers better web fetching capabilities, is more targeted to the task, or has fewer restrictions, prefer using that tool instead of this one.\n - The URL must be a fully-formed valid URL\n - HTTP URLs will be automatically upgraded to HTTPS\n - Format options: \"markdown\" (default), \"text\", or \"html\"\n - This tool is read-only and does not modify any files\n - Results may be summarized if the content is very large\n","parameters":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"description":"The URL to fetch content from","type":"string"},"format":{"description":"The format to return the content in (text, markdown, or html). Defaults to markdown.","default":"markdown","type":"string","enum":["text","markdown","html"]},"timeout":{"description":"Optional timeout in seconds (max 120)","type":"number"}},"required":["url"]}}},{"type":"function","function":{"name":"todowrite","description":"Use this tool to create and manage a structured task list for your current coding session. This helps you track progress, organize complex tasks, and demonstrate thoroughness to the user.\nIt also helps the user understand the progress of the task and overall progress of their requests.\n\n## When to Use This Tool\nUse this tool proactively in these scenarios:\n\n1. Complex multistep tasks - When a task requires 3 or more distinct steps or actions\n2. Non-trivial and complex tasks - Tasks that require careful planning or multiple operations\n3. User explicitly requests todo list - When the user directly asks you to use the todo list\n4. User provides multiple tasks - When users provide a list of things to be done (numbered or comma-separated)\n5. After receiving new instructions - Immediately capture user requirements as todos. Feel free to edit the todo list based on new information.\n6. After completing a task - Mark it complete and add any new follow-up tasks\n7. When you start working on a new task, mark the todo as in_progress. Ideally you should only have one todo as in_progress at a time. Complete existing tasks before starting new ones.\n\n## When NOT to Use This Tool\n\nSkip using this tool when:\n1. There is only a single, straightforward task\n2. The task is trivial and tracking it provides no organizational benefit\n3. The task can be completed in less than 3 trivial steps\n4. The task is purely conversational or informational\n\nNOTE that you should not use this tool if there is only one trivial task to do. In this case you are better off just doing the task directly.\n\n## Examples of When to Use the Todo List\n\n<example>\nUser: I want to add a dark mode toggle to the application settings. Make sure you run the tests and build when you're done!\nAssistant: I'll help add a dark mode toggle to your application settings. Let me create a todo list to track this implementation.\n*Creates todo list with the following items:*\n1. Create dark mode toggle component in Settings page\n2. Add dark mode state management (context/store)\n3. Implement CSS-in-JS styles for dark theme\n4. Update existing components to support theme switching\n5. Run tests and build process, addressing any failures or errors that occur\n*Begins working on the first task*\n\n<reasoning>\nThe assistant used the todo list because:\n1. Adding dark mode is a multi-step feature requiring UI, state management, and styling changes\n2. The user explicitly requested tests and build be run afterward\n3. The assistant inferred that tests and build need to pass by adding \"Ensure tests and build succeed\" as the final task\n</reasoning>\n</example>\n\n<example>\nUser: Help me rename the function getCwd to getCurrentWorkingDirectory across my project\nAssistant: Let me first search through your codebase to find all occurrences of 'getCwd'.\n*Uses grep or search tools to locate all instances of getCwd in the codebase*\nAssistant: I've found 15 instances of 'getCwd' across 8 different files. Let me create a todo list to track these changes.\n*Creates todo list with specific items for each file that needs updating*\n\n<reasoning>\nThe assistant used the todo list because:\n1. First, the assistant searched to understand the scope of the task\n2. Upon finding multiple occurrences across different files, it determined this was a complex task with multiple steps\n3. The todo list helps ensure every instance is tracked and updated systematically\n4. This approach prevents missing any occurrences and maintains code consistency\n</reasoning>\n</example>\n\n\n<example>\nUser: I need to implement these features for my e-commerce site: user registration, product catalog, shopping cart, and checkout flow.\nAssistant: I'll help implement these features. First, let's add all the features to the todo list.\n*Creates a todo list breaking down each feature into specific tasks based on the project architecture*\nAssistant: Let's start with user registration. This will involve creating database models, API endpoints, and frontend forms that integrate with your existing authentication system.\n\n<reasoning>\nThe assistant used the todo list because:\n1. The user provided multiple complex features to implement in a comma separated list\n2. The todo list helps organize these large features into manageable tasks\n3. This approach allows for tracking progress across the entire implementation\n</reasoning>\n</example>\n\n<example>\nUser: Can you help optimize my React application? It's rendering slowly and has performance issues.</user>\nAssistant: I'll help optimize your React application. First, let me examine your codebase to identify potential performance bottlenecks.\n*Reviews component structure, render patterns, state management, and data fetching*\nAssistant: After analyzing your codebase, I've identified several performance issues. Let me create a todo list to track our optimization efforts.\n*Creates todo list with items like: 1) Implement memoization for expensive calculations in ProductList, 2) Add virtualization for long lists in Dashboard, 3) Optimize image loading in Gallery component, 4) Fix state update loops in ShoppingCart, 5) Review bundle size and implement code splitting*\nLet's start by implementing memoization for the expensive calculations in your ProductList component.</assistant>\n\n<reasoning>\nThe assistant used the todo list because:\n1. First, the assistant examined the codebase to identify specific performance issues\n2. Based on this analysis, it identified multiple optimization opportunities\n3. Performance optimization is a non-trivial task requiring multiple steps\n4. The todo list helps methodically track improvements across different components\n5. This systematic approach ensures all performance bottlenecks are addressed\n</reasoning>\n</example>\n\n## Examples of When NOT to Use the Todo List\n\n<example>\nUser: How do I print 'Hello World' in Python?\nAssistant: In Python, you can print \"Hello World\" with this simple code:\n\npython\nprint(\"Hello World\")\n\nThis will output the text \"Hello World\" to the console when executed.</assistant>\n\n<reasoning>\nThe assistant did not use the todo list because this is a single, trivial task that can be completed in one step. There's no need to track multiple tasks or steps for such a straightforward request.\n</reasoning>\n</example>\n\n<example>\nUser: What does the git status command do?\nAssistant: The git status command shows the current state of your working directory and staging area. It displays which changes have been staged, which haven't, and which files aren't being tracked by Git. This is a fundamental command for understanding the current state of your repository before making commits.\n\n<reasoning>\nThe assistant did not use the todo list because this is an informational request with no actual coding task to complete. The user is simply asking for an explanation, not for the assistant to perform multiple steps or tasks.\n</reasoning>\n</example>\n\n<example>\nUser: Can you add a comment to the calculateTotal function to explain what it does?\nAssistant: Sure, let me add a comment to the calculateTotal function to explain what it does.\n* Uses the Edit tool to add a comment to the calculateTotal function *\n\n<reasoning>\nThe assistant did not use the todo list because this is a single, straightforward task confined to one location in the code. Adding a comment doesn't require tracking multiple steps or systematic organization.\n</reasoning>\n</example>\n\n<example>\nUser: Run npm install for me and tell me what happens.\nAssistant: I'll run the npm install command for you.\n\n*Executes: npm install*\n\nThe command completed successfully. Here's the output:\n[Output of npm install command]\n\nAll dependencies have been installed according to your package.json file.\n\n<reasoning>\nThe assistant did not use the todo list because this is a single command execution with immediate results. There are no multiple steps to track or organize, making the todo list unnecessary for this straightforward task.\n</reasoning>\n</example>\n\n## Task States and Management\n\n1. **Task States**: Use these states to track progress:\n - pending: Task not yet started\n - in_progress: Currently working on (limit to ONE task at a time)\n - completed: Task finished successfully\n - cancelled: Task no longer needed\n\n2. **Task Management**:\n - Update task status in real-time as you work\n - Mark tasks complete IMMEDIATELY after finishing (don't batch completions)\n - Only have ONE task in_progress at any time\n - Complete current tasks before starting new ones\n - Cancel tasks that become irrelevant\n\n3. **Task Breakdown**:\n - Create specific, actionable items\n - Break complex tasks into smaller, manageable steps\n - Use clear, descriptive task names\n\nWhen in doubt, use this tool. Being proactive with task management demonstrates attentiveness and ensures you complete all requirements successfully.\n\n","parameters":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"todos":{"description":"The updated todo list","type":"array","items":{"type":"object","properties":{"content":{"description":"Brief description of the task","type":"string"},"status":{"description":"Current status of the task: pending, in_progress, completed, cancelled","type":"string"},"priority":{"description":"Priority level of the task: high, medium, low","type":"string"}},"required":["content","status","priority"]}}},"required":["todos"]}}},{"type":"function","function":{"name":"skill","description":"Load a specialized skill when the task at hand matches one of the skills listed in the system prompt.\n\nUse this tool to inject the skill's instructions and resources into current conversation. The output may contain detailed workflow guidance as well as references to scripts, files, etc in the same directory as the skill.\n\nThe skill name must match one of the skills listed in your system prompt.\n\nNo skills are currently available.","parameters":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"description":"The name of the skill from available_skills","type":"string"}},"required":["name"]}}},{"type":"function","function":{"name":"exa_web_search_exa","description":"Search the web for any topic and get clean, ready-to-use content.\n\n Best for: Finding current information, news, facts, people, companies, or answering questions about any topic.\n Returns: Clean text content from top search results.\n\n Query tips:\n describe the ideal page, not keywords. \"blog post comparing React and Vue performance\" not \"React vs Vue\".\n Use category:people / category:company to search through Linkedin profiles / companies respectively.\n If highlights are insufficient, follow up with web_fetch_exa on the best URLs.","parameters":{"type":"object","properties":{"query":{"type":"string","description":"Natural language search query. Should be a semantically rich description of the ideal page, not just keywords. Optionally include category:<type> (company, people) to focus results — e.g. 'category:people John Doe software engineer'."},"numResults":{"type":"number","minimum":1,"maximum":100,"description":"Number of search results to return (must be a number, default: 10)."}},"required":["query"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"exa_web_fetch_exa","description":"Read a webpage's full content as clean markdown. Use after web_search_exa when highlights are insufficient or to read any URL.\n\nBest for: Extracting full content from known URLs. Batch multiple URLs in one call.\nReturns: Clean text content and metadata from the page(s).","parameters":{"type":"object","properties":{"urls":{"type":"array","items":{"type":"string"},"description":"URLs to read. Batch multiple URLs in one call."},"maxCharacters":{"type":"number","minimum":1,"description":"Maximum characters to extract per page (must be a positive number, default: 3000)"}},"required":["urls"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"tavily_tavily_search","description":"Search the web for current information on any topic. Use for news, facts, or data beyond your knowledge cutoff. Returns snippets and source URLs.","parameters":{"type":"object","properties":{"query":{"description":"Search query","type":"string"},"max_results":{"default":5,"description":"The maximum number of search results to return","type":"integer"},"search_depth":{"default":"basic","description":"The depth of the search. 'basic' for generic results, 'advanced' for more thorough search, 'fast' for optimized low latency with high relevance, 'ultra-fast' for prioritizing latency above all else","enum":["basic","advanced","fast","ultra-fast"],"type":"string"},"topic":{"const":"general","default":"general","description":"The category of the search. This will determine which of our agents will be used for the search","type":"string"},"time_range":{"anyOf":[{"enum":["day","week","month","year"],"type":"string"},{"type":"null"}],"default":null,"description":"The time range back from the current date to include in the search results"},"include_images":{"default":false,"description":"Include a list of query-related images in the response","type":"boolean"},"include_image_descriptions":{"default":false,"description":"Include a list of query-related images and their descriptions in the response","type":"boolean"},"include_raw_content":{"default":false,"description":"Include the cleaned and parsed HTML content of each search result","type":"boolean"},"include_domains":{"default":[],"description":"A list of domains to specifically include in the search results, if the user asks to search on specific sites set this to the domain of the site","items":{"type":"string"},"type":"array"},"exclude_domains":{"default":[],"description":"List of domains to specifically exclude, if the user asks to exclude a domain set this to the domain of the site","items":{"type":"string"},"type":"array"},"country":{"default":"","description":"Boost search results from a specific country. Must be a full country name (e.g., 'United States', 'Japan', 'Germany'). ISO country codes (e.g., 'us', 'jp') are not supported. Available only if topic is general. See https://docs.tavily.com/documentation/api-reference/search for the full list of supported countries.","type":"string"},"include_favicon":{"default":false,"description":"Whether to include the favicon URL for each result","type":"boolean"},"start_date":{"default":"","description":"Will return all results after the specified start date. Required to be written in the format YYYY-MM-DD.","type":"string"},"end_date":{"default":"","description":"Will return all results before the specified end date. Required to be written in the format YYYY-MM-DD","type":"string"},"exact_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"Only return results containing the exact phrase(s) in quotes in your query"}},"required":["query"],"additionalProperties":false}}},{"type":"function","function":{"name":"tavily_tavily_extract","description":"Extract content from URLs. Returns raw page content in markdown or text format.","parameters":{"type":"object","properties":{"urls":{"description":"List of URLs to extract content from","items":{"type":"string"},"type":"array"},"extract_depth":{"default":"basic","description":"Use 'advanced' for LinkedIn, protected sites, or tables/embedded content","enum":["basic","advanced"],"type":"string"},"include_images":{"default":false,"description":"Include images from pages","type":"boolean"},"format":{"default":"markdown","description":"Output format","enum":["markdown","text"],"type":"string"},"include_favicon":{"default":false,"description":"Include favicon URLs","type":"boolean"},"query":{"default":"","description":"Query to rerank content chunks by relevance","type":"string"}},"required":["urls"],"additionalProperties":false}}},{"type":"function","function":{"name":"tavily_tavily_crawl","description":"Crawl a website starting from a URL. Extracts content from pages with configurable depth and breadth.","parameters":{"type":"object","properties":{"url":{"description":"The root URL to begin the crawl","type":"string"},"max_depth":{"default":1,"description":"Max depth of the crawl. Defines how far from the base URL the crawler can explore.","minimum":1,"type":"integer"},"max_breadth":{"default":20,"description":"Max number of links to follow per level of the tree (i.e., per page)","minimum":1,"type":"integer"},"limit":{"default":50,"description":"Total number of links the crawler will process before stopping","minimum":1,"type":"integer"},"instructions":{"default":"","description":"Natural language instructions for the crawler. Instructions specify which types of pages the crawler should return.","type":"string"},"select_paths":{"default":[],"description":"Regex patterns to select only URLs with specific path patterns (e.g., /docs/.*, /api/v1.*)","items":{"type":"string"},"type":"array"},"select_domains":{"default":[],"description":"Regex patterns to restrict crawling to specific domains or subdomains (e.g., ^docs\\.example\\.com$)","items":{"type":"string"},"type":"array"},"allow_external":{"default":true,"description":"Whether to return external links in the final response","type":"boolean"},"extract_depth":{"default":"basic","description":"Advanced extraction retrieves more data, including tables and embedded content, with higher success but may increase latency","enum":["basic","advanced"],"type":"string"},"format":{"default":"markdown","description":"The format of the extracted web page content. markdown returns content in markdown format. text returns plain text and may increase latency.","enum":["markdown","text"],"type":"string"},"include_favicon":{"default":false,"description":"Whether to include the favicon URL for each result","type":"boolean"}},"required":["url"],"additionalProperties":false}}},{"type":"function","function":{"name":"tavily_tavily_map","description":"Map a website's structure. Returns a list of URLs found starting from the base URL.","parameters":{"type":"object","properties":{"url":{"description":"The root URL to begin the mapping","type":"string"},"max_depth":{"default":1,"description":"Max depth of the mapping. Defines how far from the base URL the crawler can explore","minimum":1,"type":"integer"},"max_breadth":{"default":20,"description":"Max number of links to follow per level of the tree (i.e., per page)","minimum":1,"type":"integer"},"limit":{"default":50,"description":"Total number of links the crawler will process before stopping","minimum":1,"type":"integer"},"instructions":{"default":"","description":"Natural language instructions for the crawler","type":"string"},"select_paths":{"default":[],"description":"Regex patterns to select only URLs with specific path patterns (e.g., /docs/.*, /api/v1.*)","items":{"type":"string"},"type":"array"},"select_domains":{"default":[],"description":"Regex patterns to restrict crawling to specific domains or subdomains (e.g., ^docs\\.example\\.com$)","items":{"type":"string"},"type":"array"},"allow_external":{"default":true,"description":"Whether to return external links in the final response","type":"boolean"}},"required":["url"],"additionalProperties":false}}},{"type":"function","function":{"name":"tavily_tavily_research","description":"Perform comprehensive research on a given topic or question. Use this tool when you need to gather information from multiple sources, including web pages, documents, and other resources, to answer a question or complete a task. Returns a detailed response based on the research findings. Rate limit: 20 requests per minute.","parameters":{"type":"object","properties":{"input":{"description":"A comprehensive description of the research task","type":"string"},"model":{"default":"auto","description":"Defines the degree of depth of the research. 'mini' is good for narrow tasks with few subtopics. 'pro' is good for broad tasks with many subtopics","enum":["mini","pro","auto"],"type":"string"}},"required":["input"],"additionalProperties":false}}},{"type":"function","function":{"name":"gh_grep_searchGitHub","description":"Find real-world code examples from over a million public GitHub repositories to help answer programming questions.\n\n**IMPORTANT: This tool searches for literal code patterns (like grep), not keywords. Search for actual code that would appear in files:**\n- ✅ Good: 'useState(', 'import React from', 'async function', '(?s)try {.*await'\n- ❌ Bad: 'react tutorial', 'best practices', 'how to use'\n\n**When to use this tool:**\n- When implementing unfamiliar APIs or libraries and need to see real usage patterns\n- When unsure about correct syntax, parameters, or configuration for a specific library\n- When looking for production-ready examples and best practices for implementation\n- When needing to understand how different libraries or frameworks work together\n\n**Perfect for questions like:**\n- \"How do developers handle authentication in Next.js apps?\" → Search: 'getServerSession' with language=['TypeScript', 'TSX']\n- \"What are common React error boundary patterns?\" → Search: 'ErrorBoundary' with language=['TSX']\n- \"Show me real useEffect cleanup examples\" → Search: '(?s)useEffect\\(\\(\\) => {.*removeEventListener' with useRegexp=true\n- \"How do developers handle CORS in Flask applications?\" → Search: 'CORS(' with matchCase=true and language=['Python']\n\nUse regular expressions with useRegexp=true for flexible patterns like '(?s)useState\\(.*loading' to find useState hooks with loading-related variables. Prefix the pattern with '(?s)' to match across multiple lines.\n\nFilter by language, repository, or file path to narrow results.","parameters":{"type":"object","properties":{"query":{"type":"string","description":"The literal code pattern to search for (e.g., 'useState(', 'export function'). Use actual code that would appear in files, not keywords or questions."},"matchCase":{"type":"boolean","description":"Whether the search should be case sensitive","default":false},"matchWholeWords":{"type":"boolean","description":"Whether to match whole words only","default":false},"useRegexp":{"type":"boolean","description":"Whether to interpret the query as a regular expression","default":false},"repo":{"type":"string","description":"Filter by repository.\n Examples: 'facebook/react', 'microsoft/vscode', 'vercel/ai'.\n Can match partial names, for example 'vercel/' will find repositories in the vercel org."},"path":{"type":"string","description":"Filter by file path.\n Examples: 'src/components/Button.tsx', 'README.md'.\n Can match partial paths, for example '/route.ts' will find route.ts files at any level."},"language":{"type":"array","items":{"type":"string"},"description":"Filter by programming language.\n Examples: ['TypeScript', 'TSX'], ['JavaScript'], ['Python'], ['Java'], ['C#'], ['Markdown'], ['YAML']"}},"required":["query"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"context7_resolve-library-id","description":"Resolves a package/product name to a Context7-compatible library ID and returns matching libraries.\n\nYou MUST call this function before 'Query Documentation' tool to obtain a valid Context7-compatible library ID UNLESS the user explicitly provides a library ID in the format '/org/project' or '/org/project/version' in their query.\n\nEach result includes:\n- Library ID: Context7-compatible identifier (format: /org/project)\n- Name: Library or package name\n- Description: Short summary\n- Code Snippets: Number of available code examples\n- Source Reputation: Authority indicator (High, Medium, Low, or Unknown)\n- Benchmark Score: Quality indicator (100 is the highest score)\n- Versions: List of versions if available. Use one of those versions if the user provides a version in their query. The format of the version is /org/project/version.\n\nFor best results, select libraries based on name match, source reputation, snippet coverage, benchmark score, and relevance to your use case.\n\nSelection Process:\n1. Analyze the query to understand what library/package the user is looking for\n2. Return the most relevant match based on:\n- Name similarity to the query (exact matches prioritized)\n- Description relevance to the query's intent\n- Documentation coverage (prioritize libraries with higher Code Snippet counts)\n- Source reputation (consider libraries with High or Medium reputation more authoritative)\n- Benchmark Score: Quality indicator (100 is the highest score)\n\nResponse Format:\n- Return the selected library ID in a clearly marked section\n- Provide a brief explanation for why this library was chosen\n- If multiple good matches exist, acknowledge this but proceed with the most relevant one\n- If no good matches exist, clearly state this and suggest query refinements\n\nFor ambiguous queries, request clarification before proceeding with a best-guess match.\n\nIMPORTANT: Do not call this tool more than 3 times per question. If you cannot find what you need after 3 calls, use the best result you have.","parameters":{"type":"object","properties":{"query":{"type":"string","description":"The question or task you need help with. This is used to rank library results by relevance to what the user is trying to accomplish. The query is sent to the Context7 API for processing. Do not include any sensitive or confidential information such as API keys, passwords, credentials, personal data, or proprietary code in your query."},"libraryName":{"type":"string","description":"Library name to search for and retrieve a Context7-compatible library ID. Use the official library name with proper punctuation — e.g., 'Next.js' instead of 'nextjs', 'Customer.io' instead of 'customerio', 'Three.js' instead of 'threejs'."}},"required":["query","libraryName"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"context7_query-docs","description":"Retrieves and queries up-to-date documentation and code examples from Context7 for any programming library or framework.\n\nYou must call 'Resolve Context7 Library ID' tool first to obtain the exact Context7-compatible library ID required to use this tool, UNLESS the user explicitly provides a library ID in the format '/org/project' or '/org/project/version' in their query.\n\nWorkflow: call first without researchMode. If that doesn't answer the question, retry with researchMode: true. Do not call each tool more than 3 times per question.","parameters":{"type":"object","properties":{"libraryId":{"type":"string","description":"Exact Context7-compatible library ID (e.g., '/mongodb/docs', '/vercel/next.js', '/supabase/supabase', '/vercel/next.js/v14.3.0-canary.87') retrieved from 'resolve-library-id' or directly from user query in the format '/org/project' or '/org/project/version'."},"query":{"type":"string","description":"The question or task you need help with. Be specific and include relevant details. Good: 'How to set up authentication with JWT in Express.js' or 'React useEffect cleanup function examples'. Bad: 'auth' or 'hooks'. The query is sent to the Context7 API for processing. Do not include any sensitive or confidential information such as API keys, passwords, credentials, personal data, or proprietary code in your query."},"researchMode":{"description":"Retry the query with deep research: spins up sandboxed agents that read the actual source repos and runs a live web search, then synthesizes a fresh answer. Set true on retry if you weren't satisfied with the first answer and want a more thorough one. Requires an API key. You can get one free at https://context7.com.","type":"boolean"}},"required":["libraryId","query"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"filesystem_read_file","description":"Read the complete contents of a file as text. DEPRECATED: Use read_text_file instead.","parameters":{"type":"object","properties":{"path":{"type":"string"},"tail":{"description":"If provided, returns only the last N lines of the file","type":"number"},"head":{"description":"If provided, returns only the first N lines of the file","type":"number"}},"required":["path"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"filesystem_read_text_file","description":"Read the complete contents of a file from the file system as text. Handles various text encodings and provides detailed error messages if the file cannot be read. Use this tool when you need to examine the contents of a single file. Use the 'head' parameter to read only the first N lines of a file, or the 'tail' parameter to read only the last N lines of a file. Operates on the file as text regardless of extension. Only works within allowed directories.","parameters":{"type":"object","properties":{"path":{"type":"string"},"tail":{"description":"If provided, returns only the last N lines of the file","type":"number"},"head":{"description":"If provided, returns only the first N lines of the file","type":"number"}},"required":["path"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"filesystem_read_media_file","description":"Read an image or audio file. Returns the base64 encoded data and MIME type. Only works within allowed directories.","parameters":{"type":"object","properties":{"path":{"type":"string"}},"required":["path"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"filesystem_read_multiple_files","description":"Read the contents of multiple files simultaneously. This is more efficient than reading files one by one when you need to analyze or compare multiple files. Each file's content is returned with its path as a reference. Failed reads for individual files won't stop the entire operation. Only works within allowed directories.","parameters":{"type":"object","properties":{"paths":{"minItems":1,"type":"array","items":{"type":"string"},"description":"Array of file paths to read. Each path must be a string pointing to a valid file within allowed directories."}},"required":["paths"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"filesystem_write_file","description":"Create a new file or completely overwrite an existing file with new content. Use with caution as it will overwrite existing files without warning. Handles text content with proper encoding. Only works within allowed directories.","parameters":{"type":"object","properties":{"path":{"type":"string"},"content":{"type":"string"}},"required":["path","content"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"filesystem_edit_file","description":"Make line-based edits to a text file. Each edit replaces exact line sequences with new content. Returns a git-style diff showing the changes made. Only works within allowed directories.","parameters":{"type":"object","properties":{"path":{"type":"string"},"edits":{"type":"array","items":{"type":"object","properties":{"oldText":{"type":"string","description":"Text to search for - must match exactly"},"newText":{"type":"string","description":"Text to replace with"}},"required":["oldText","newText"]}},"dryRun":{"default":false,"description":"Preview changes using git-style diff format","type":"boolean"}},"required":["path","edits"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"filesystem_create_directory","description":"Create a new directory or ensure a directory exists. Can create multiple nested directories in one operation. If the directory already exists, this operation will succeed silently. Perfect for setting up directory structures for projects or ensuring required paths exist. Only works within allowed directories.","parameters":{"type":"object","properties":{"path":{"type":"string"}},"required":["path"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"filesystem_list_directory","description":"Get a detailed listing of all files and directories in a specified path. Results clearly distinguish between files and directories with [FILE] and [DIR] prefixes. This tool is essential for understanding directory structure and finding specific files within a directory. Only works within allowed directories.","parameters":{"type":"object","properties":{"path":{"type":"string"}},"required":["path"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"filesystem_list_directory_with_sizes","description":"Get a detailed listing of all files and directories in a specified path, including sizes. Results clearly distinguish between files and directories with [FILE] and [DIR] prefixes. This tool is useful for understanding directory structure and finding specific files within a directory. Only works within allowed directories.","parameters":{"type":"object","properties":{"path":{"type":"string"},"sortBy":{"default":"name","description":"Sort entries by name or size","type":"string","enum":["name","size"]}},"required":["path"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"filesystem_directory_tree","description":"Get a recursive tree view of files and directories as a JSON structure. Each entry includes 'name', 'type' (file/directory), and 'children' for directories. Files have no children array, while directories always have a children array (which may be empty). The output is formatted with 2-space indentation for readability. Only works within allowed directories.","parameters":{"type":"object","properties":{"path":{"type":"string"},"excludePatterns":{"default":[],"type":"array","items":{"type":"string"}}},"required":["path"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"filesystem_move_file","description":"Move or rename files and directories. Can move files between directories and rename them in a single operation. If the destination exists, the operation will fail. Works across different directories and can be used for simple renaming within the same directory. Both source and destination must be within allowed directories.","parameters":{"type":"object","properties":{"source":{"type":"string"},"destination":{"type":"string"}},"required":["source","destination"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"filesystem_search_files","description":"Recursively search for files and directories matching a pattern. The patterns should be glob-style patterns that match paths relative to the working directory. Use pattern like '*.ext' to match files in current directory, and '**/*.ext' to match files in all subdirectories. Returns full paths to all matching items. Great for finding files when you don't know their exact location. Only searches within allowed directories.","parameters":{"type":"object","properties":{"path":{"type":"string"},"pattern":{"type":"string"},"excludePatterns":{"default":[],"type":"array","items":{"type":"string"}}},"required":["path","pattern"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"filesystem_get_file_info","description":"Retrieve detailed metadata about a file or directory. Returns comprehensive information including size, creation time, last modified time, permissions, and type. This tool is perfect for understanding file characteristics without reading the actual content. Only works within allowed directories.","parameters":{"type":"object","properties":{"path":{"type":"string"}},"required":["path"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"filesystem_list_allowed_directories","description":"Returns the list of directories that this server is allowed to access. Subdirectories within these allowed directories are also accessible. Use this to understand which directories and their nested paths are available before trying to access files.","parameters":{"type":"object","properties":{},"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"chrome-devtools_click","description":"Clicks on the provided element","parameters":{"type":"object","properties":{"uid":{"type":"string","description":"The uid of an element on the page from the page content snapshot"},"dblClick":{"type":"boolean","description":"Set to true for double clicks. Default is false."},"includeSnapshot":{"type":"boolean","description":"Whether to include a snapshot in the response. Default is false."}},"required":["uid"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_close_page","description":"Closes the page by its index. The last open page cannot be closed.","parameters":{"type":"object","properties":{"pageId":{"type":"number","description":"The ID of the page to close. Call list_pages to list pages."}},"required":["pageId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_drag","description":"Drag an element onto another element","parameters":{"type":"object","properties":{"from_uid":{"type":"string","description":"The uid of the element to drag"},"to_uid":{"type":"string","description":"The uid of the element to drop into"},"includeSnapshot":{"type":"boolean","description":"Whether to include a snapshot in the response. Default is false."}},"required":["from_uid","to_uid"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_emulate","description":"Emulates various features on the selected page.","parameters":{"type":"object","properties":{"networkConditions":{"type":"string","enum":["Offline","Slow 3G","Fast 3G","Slow 4G","Fast 4G"],"description":"Throttle network. Omit to disable throttling."},"cpuThrottlingRate":{"type":"number","minimum":1,"maximum":20,"description":"Represents the CPU slowdown factor. Omit or set the rate to 1 to disable throttling"},"geolocation":{"type":"string","description":"Geolocation (`<latitude>x<longitude>`) to emulate. Latitude between -90 and 90. Longitude between -180 and 180. Omit to clear the geolocation override."},"userAgent":{"type":"string","description":"User agent to emulate. Set to empty string to clear the user agent override."},"colorScheme":{"type":"string","enum":["dark","light","auto"],"description":"Emulate the dark or the light mode. Set to \"auto\" to reset to the default."},"viewport":{"type":"string","description":"Emulate device viewports '<width>x<height>x<devicePixelRatio>[,mobile][,touch][,landscape]'. 'touch' and 'mobile' to emulate mobile devices. 'landscape' to emulate landscape mode."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_evaluate_script","description":"Evaluate a JavaScript function inside the currently selected page. Returns the response as JSON,\nso returned values have to be JSON-serializable.","parameters":{"type":"object","properties":{"function":{"type":"string","description":"A JavaScript function declaration to be executed by the tool in the currently selected page.\nExample without arguments: `() => {\n return document.title\n}` or `async () => {\n return await fetch(\"example.com\")\n}`.\nExample with arguments: `(el) => {\n return el.innerText;\n}`\n"},"args":{"type":"array","items":{"type":"string","description":"The uid of an element on the page from the page content snapshot"},"description":"An optional list of arguments to pass to the function."},"dialogAction":{"type":"string","description":"Handle dialogs while execution. \"accept\", \"dismiss\", or string for response of window.prompt. Defaults to accept."}},"required":["function"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_fill","description":"Type text into an input, text area or select an option from a <select> element.","parameters":{"type":"object","properties":{"uid":{"type":"string","description":"The uid of an element on the page from the page content snapshot"},"value":{"type":"string","description":"The value to fill in"},"includeSnapshot":{"type":"boolean","description":"Whether to include a snapshot in the response. Default is false."}},"required":["uid","value"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_fill_form","description":"Fill out multiple form elements at once","parameters":{"type":"object","properties":{"elements":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"The uid of the element to fill out"},"value":{"type":"string","description":"Value for the element"}},"required":["uid","value"],"additionalProperties":false},"description":"Elements from snapshot to fill out."},"includeSnapshot":{"type":"boolean","description":"Whether to include a snapshot in the response. Default is false."}},"required":["elements"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_get_console_message","description":"Gets a console message by its ID. You can get all messages by calling list_console_messages.","parameters":{"type":"object","properties":{"msgid":{"type":"number","description":"The msgid of a console message on the page from the listed console messages"}},"required":["msgid"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_get_network_request","description":"Gets a network request by an optional reqid, if omitted returns the currently selected request in the DevTools Network panel.","parameters":{"type":"object","properties":{"reqid":{"type":"number","description":"The reqid of the network request. If omitted returns the currently selected request in the DevTools Network panel."},"requestFilePath":{"type":"string","description":"The absolute or relative path to a .network-request file to save the request body to. If omitted, the body is returned inline."},"responseFilePath":{"type":"string","description":"The absolute or relative path to a .network-response file to save the response body to. If omitted, the body is returned inline."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_handle_dialog","description":"If a browser dialog was opened, use this command to handle it","parameters":{"type":"object","properties":{"action":{"type":"string","enum":["accept","dismiss"],"description":"Whether to dismiss or accept the dialog"},"promptText":{"type":"string","description":"Optional prompt text to enter into the dialog."}},"required":["action"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_hover","description":"Hover over the provided element","parameters":{"type":"object","properties":{"uid":{"type":"string","description":"The uid of an element on the page from the page content snapshot"},"includeSnapshot":{"type":"boolean","description":"Whether to include a snapshot in the response. Default is false."}},"required":["uid"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_lighthouse_audit","description":"Get Lighthouse score and reports for accessibility, SEO and best practices. This excludes performance. For performance audits, run performance_start_trace","parameters":{"type":"object","properties":{"mode":{"type":"string","enum":["navigation","snapshot"],"default":"navigation","description":"\"navigation\" reloads & audits. \"snapshot\" analyzes current state."},"device":{"type":"string","enum":["desktop","mobile"],"default":"desktop","description":"Device to emulate."},"outputDirPath":{"type":"string","description":"Directory for reports. If omitted, uses temporary files."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_list_console_messages","description":"List all console messages for the currently selected page since the last navigation.","parameters":{"type":"object","properties":{"pageSize":{"type":"integer","exclusiveMinimum":0,"description":"Maximum number of messages to return. When omitted, returns all messages."},"pageIdx":{"type":"integer","minimum":0,"description":"Page number to return (0-based). When omitted, returns the first page."},"types":{"type":"array","items":{"type":"string","enum":["log","debug","info","error","warn","dir","dirxml","table","trace","clear","startGroup","startGroupCollapsed","endGroup","assert","profile","profileEnd","count","timeEnd","verbose","issue"]},"description":"Filter messages to only return messages of the specified resource types. When omitted or empty, returns all messages."},"includePreservedMessages":{"type":"boolean","default":false,"description":"Set to true to return the preserved messages over the last 3 navigations."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_list_network_requests","description":"List all requests for the currently selected page since the last navigation.","parameters":{"type":"object","properties":{"pageSize":{"type":"integer","exclusiveMinimum":0,"description":"Maximum number of requests to return. When omitted, returns all requests."},"pageIdx":{"type":"integer","minimum":0,"description":"Page number to return (0-based). When omitted, returns the first page."},"resourceTypes":{"type":"array","items":{"type":"string","enum":["document","stylesheet","image","media","font","script","texttrack","xhr","fetch","prefetch","eventsource","websocket","manifest","signedexchange","ping","cspviolationreport","preflight","fedcm","other"]},"description":"Filter requests to only return requests of the specified resource types. When omitted or empty, returns all requests."},"includePreservedRequests":{"type":"boolean","default":false,"description":"Set to true to return the preserved requests over the last 3 navigations."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_list_pages","description":"Get a list of pages open in the browser.","parameters":{"type":"object","properties":{},"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"chrome-devtools_navigate_page","description":"Go to a URL, or back, forward, or reload. Use project URL if not specified otherwise.","parameters":{"type":"object","properties":{"type":{"type":"string","enum":["url","back","forward","reload"],"description":"Navigate the page by URL, back or forward in history, or reload."},"url":{"type":"string","description":"Target URL (only type=url)"},"ignoreCache":{"type":"boolean","description":"Whether to ignore cache on reload."},"handleBeforeUnload":{"type":"string","enum":["accept","decline"],"description":"Whether to auto accept or beforeunload dialogs triggered by this navigation. Default is accept."},"initScript":{"type":"string","description":"A JavaScript script to be executed on each new document before any other scripts for the next navigation."},"timeout":{"type":"integer","description":"Maximum wait time in milliseconds. If set to 0, the default timeout will be used."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_new_page","description":"Open a new tab and load a URL. Use project URL if not specified otherwise.","parameters":{"type":"object","properties":{"url":{"type":"string","description":"URL to load in a new page."},"background":{"type":"boolean","description":"Whether to open the page in the background without bringing it to the front. Default is false (foreground)."},"isolatedContext":{"type":"string","description":"If specified, the page is created in an isolated browser context with the given name. Pages in the same browser context share cookies and storage. Pages in different browser contexts are fully isolated."},"timeout":{"type":"integer","description":"Maximum wait time in milliseconds. If set to 0, the default timeout will be used."}},"required":["url"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_performance_analyze_insight","description":"Provides more detailed information on a specific Performance Insight of an insight set that was highlighted in the results of a trace recording.","parameters":{"type":"object","properties":{"insightSetId":{"type":"string","description":"The id for the specific insight set. Only use the ids given in the \"Available insight sets\" list."},"insightName":{"type":"string","description":"The name of the Insight you want more information on. For example: \"DocumentLatency\" or \"LCPBreakdown\""}},"required":["insightSetId","insightName"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_performance_start_trace","description":"Start a performance trace on the selected webpage. Use to find frontend performance issues, Core Web Vitals (LCP, INP, CLS), and improve page load speed.","parameters":{"type":"object","properties":{"reload":{"type":"boolean","default":true,"description":"Determines if, once tracing has started, the current selected page should be automatically reloaded. Navigate the page to the right URL using the navigate_page tool BEFORE starting the trace if reload or autoStop is set to true."},"autoStop":{"type":"boolean","default":true,"description":"Determines if the trace recording should be automatically stopped."},"filePath":{"type":"string","description":"The absolute file path, or a file path relative to the current working directory, to save the raw trace data. For example, trace.json.gz (compressed) or trace.json (uncompressed)."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_performance_stop_trace","description":"Stop the active performance trace recording on the selected webpage.","parameters":{"type":"object","properties":{"filePath":{"type":"string","description":"The absolute file path, or a file path relative to the current working directory, to save the raw trace data. For example, trace.json.gz (compressed) or trace.json (uncompressed)."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_press_key","description":"Press a key or key combination. Use this when other input methods like fill() cannot be used (e.g., keyboard shortcuts, navigation keys, or special key combinations).","parameters":{"type":"object","properties":{"key":{"type":"string","description":"A key or a combination (e.g., \"Enter\", \"Control+A\", \"Control++\", \"Control+Shift+R\"). Modifiers: Control, Shift, Alt, Meta"},"includeSnapshot":{"type":"boolean","description":"Whether to include a snapshot in the response. Default is false."}},"required":["key"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_resize_page","description":"Resizes the selected page's window so that the page has specified dimension","parameters":{"type":"object","properties":{"width":{"type":"number","description":"Page width"},"height":{"type":"number","description":"Page height"}},"required":["width","height"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_select_page","description":"Select a page as a context for future tool calls.","parameters":{"type":"object","properties":{"pageId":{"type":"number","description":"The ID of the page to select. Call list_pages to get available pages."},"bringToFront":{"type":"boolean","description":"Whether to focus the page and bring it to the top."}},"required":["pageId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_take_memory_snapshot","description":"Capture a heap snapshot of the currently selected page. Use to analyze the memory distribution of JavaScript objects and debug memory leaks.","parameters":{"type":"object","properties":{"filePath":{"type":"string","description":"A path to a .heapsnapshot file to save the heapsnapshot to."}},"required":["filePath"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_take_screenshot","description":"Take a screenshot of the page or element.","parameters":{"type":"object","properties":{"format":{"type":"string","enum":["png","jpeg","webp"],"default":"png","description":"Type of format to save the screenshot as. Default is \"png\""},"quality":{"type":"number","minimum":0,"maximum":100,"description":"Compression quality for JPEG and WebP formats (0-100). Higher values mean better quality but larger file sizes. Ignored for PNG format."},"uid":{"type":"string","description":"The uid of an element on the page from the page content snapshot. If omitted, takes a page screenshot."},"fullPage":{"type":"boolean","description":"If set to true takes a screenshot of the full page instead of the currently visible viewport. Incompatible with uid."},"filePath":{"type":"string","description":"The absolute path, or a path relative to the current working directory, to save the screenshot to instead of attaching it to the response."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_take_snapshot","description":"Take a text snapshot of the currently selected page based on the a11y tree. The snapshot lists page elements along with a unique\nidentifier (uid). Always use the latest snapshot. Prefer taking a snapshot over taking a screenshot. The snapshot indicates the element selected\nin the DevTools Elements panel (if any).","parameters":{"type":"object","properties":{"verbose":{"type":"boolean","description":"Whether to include all possible information available in the full a11y tree. Default is false."},"filePath":{"type":"string","description":"The absolute path, or a path relative to the current working directory, to save the snapshot to instead of attaching it to the response."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_type_text","description":"Type text using keyboard into a previously focused input","parameters":{"type":"object","properties":{"text":{"type":"string","description":"The text to type"},"submitKey":{"type":"string","description":"Optional key to press after typing. E.g., \"Enter\", \"Tab\", \"Escape\""}},"required":["text"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_upload_file","description":"Upload a file through a provided element.","parameters":{"type":"object","properties":{"uid":{"type":"string","description":"The uid of the file input element or an element that will open file chooser on the page from the page content snapshot"},"filePath":{"type":"string","description":"The local path of the file to upload"},"includeSnapshot":{"type":"boolean","description":"Whether to include a snapshot in the response. Default is false."}},"required":["uid","filePath"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_wait_for","description":"Wait for the specified text to appear on the selected page.","parameters":{"type":"object","properties":{"text":{"type":"array","items":{"type":"string"},"minItems":1,"description":"Non-empty list of texts. Resolves when any value appears on the page."},"timeout":{"type":"integer","description":"Maximum wait time in milliseconds. If set to 0, the default timeout will be used."}},"required":["text"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}],"tool_choice":"auto","stream":true,"stream_options":{"include_usage":true}},"statusCode":429,"responseHeaders":{"access-control-allow-origin":"*","access-control-expose-headers":"X-Generation-Id,cf-ray","cf-ray":"9f60a39849b6f535-CDG","connection":"keep-alive","content-type":"application/json","date":"Sun, 03 May 2026 16:28:29 GMT","permissions-policy":"payment=(self \"https://checkout.stripe.com\" \"https://connect-js.stripe.com\" \"https://js.stripe.com\" \"https://*.js.stripe.com\" \"https://hooks.stripe.com\")","referrer-policy":"no-referrer, strict-origin-when-cross-origin","server":"cloudflare","transfer-encoding":"chunked","x-content-type-options":"nosniff"},"responseBody":"{\"error\":{\"message\":\"Provider returned error\",\"code\":429,\"metadata\":{\"raw\":\"openai/gpt-oss-20b:free is temporarily rate-limited upstream. Please retry shortly, or add your own key to accumulate your rate limits: https://openrouter.ai/settings/integrations\",\"provider_name\":\"OpenInference\",\"is_byok\":false}},\"user_id\":\"user_31uCqqQClAKR30A5aL6qmZRpH06\"}","isRetryable":true,"data":{"error":{"message":"Provider returned error","code":429}}}} stream error
QwQ 32B RpR v1 ArliAI OpenRouter-Free-MAJ/arliai/qwq-32b-arliai-rpr-v1 not found 00:00:04 ses_21153f263ffeCHkd4aJ3FNSYgK {"type": "error", "timestamp": 1777825746712, "sessionID": "ses_21153f263ffeCHkd4aJ3FNSYgK", "error": {"name": "UnknownError", "data": {"message": "Model not found: OpenRouter-Free-MAJ/arliai/qwq-32b-arliai-rpr-v1."}}}
Qwen3 Coder Flash Qwen OpenRouter-Free-MAJ/qwen/qwen3-coder:free rate limited 00:10:44 ses_21153e3fbffeog7J55hH49yn1B ERROR 2026-05-03T16:31:25 +946ms service=llm providerID=OpenRouter-Free-MAJ modelID=qwen/qwen3-coder:free session.id=ses_21153e3fbffeog7J55hH49yn1B small=false agent=build mode=primary error={"error":{"name":"AI_APICallError","url":"https://openrouter.ai/api/v1/chat/completions","requestBodyValues":{"model":"qwen/qwen3-coder:free","max_tokens":32000,"top_p":1,"messages":[{"role":"system","content":"You are opencode, an interactive CLI tool that helps users with software engineering tasks. Use the instructions below and the tools available to you to assist the user.\n\nIMPORTANT: You must NEVER generate or guess URLs for the user unless you are confident that the URLs are for helping the user with programming. You may use URLs provided by the user in their messages or local files.\n\nIf the user asks for help or wants to give feedback inform them of the following:\n- /help: Get help with using opencode\n- To give feedback, users should report the issue at https://github.com/anomalyco/opencode/issues\n\nWhen the user directly asks about opencode (eg 'can opencode do...', 'does opencode have...') or asks in second person (eg 'are you able...', 'can you do...'), first use the WebFetch tool to gather information to answer the question from opencode docs at https://opencode.ai\n\n# Tone and style\nYou should be concise, direct, and to the point. When you run a non-trivial bash command, you should explain what the command does and why you are running it, to make sure the user understands what you are doing (this is especially important when you are running a command that will make changes to the user's system).\nRemember that your output will be displayed on a command line interface. Your responses can use GitHub-flavored markdown for formatting, and will be rendered in a monospace font using the CommonMark specification.\nOutput text to communicate with the user; all text you output outside of tool use is displayed to the user. Only use tools to complete tasks. Never use tools like Bash or code comments as means to communicate with the user during the session.\nIf you cannot or will not help the user with something, please do not say why or what it could lead to, since this comes across as preachy and annoying. Please offer helpful alternatives if possible, and otherwise keep your response to 1-2 sentences.\nOnly use emojis if the user explicitly requests it. Avoid using emojis in all communication unless asked.\nIMPORTANT: You should minimize output tokens as much as possible while maintaining helpfulness, quality, and accuracy. Only address the specific query or task at hand, avoiding tangential information unless absolutely critical for completing the request. If you can answer in 1-3 sentences or a short paragraph, please do.\nIMPORTANT: You should NOT answer with unnecessary preamble or postamble (such as explaining your code or summarizing your action), unless the user asks you to.\nIMPORTANT: Keep your responses short, since they will be displayed on a command line interface. You MUST answer concisely with fewer than 4 lines (not including tool use or code generation), unless user asks for detail. Answer the user's question directly, without elaboration, explanation, or details. One word answers are best. Avoid introductions, conclusions, and explanations. You MUST avoid text before/after your response, such as \"The answer is <answer>.\", \"Here is the content of the file...\" or \"Based on the information provided, the answer is...\" or \"Here is what I will do next...\". Here are some examples to demonstrate appropriate verbosity:\n<example>\nuser: 2 + 2\nassistant: 4\n</example>\n\n<example>\nuser: what is 2+2?\nassistant: 4\n</example>\n\n<example>\nuser: is 11 a prime number?\nassistant: Yes\n</example>\n\n<example>\nuser: what command should I run to list files in the current directory?\nassistant: ls\n</example>\n\n<example>\nuser: what command should I run to watch files in the current directory?\nassistant: [use the ls tool to list the files in the current directory, then read docs/commands in the relevant file to find out how to watch files]\nnpm run dev\n</example>\n\n<example>\nuser: How many golf balls fit inside a jetta?\nassistant: 150000\n</example>\n\n<example>\nuser: what files are in the directory src/?\nassistant: [runs ls and sees foo.c, bar.c, baz.c]\nuser: which file contains the implementation of foo?\nassistant: src/foo.c\n</example>\n\n<example>\nuser: write tests for new feature\nassistant: [uses grep and glob search tools to find where similar tests are defined, uses concurrent read file tool use blocks in one tool call to read relevant files at the same time, uses edit file tool to write new tests]\n</example>\n\n# Proactiveness\nYou are allowed to be proactive, but only when the user asks you to do something. You should strive to strike a balance between:\n1. Doing the right thing when asked, including taking actions and follow-up actions\n2. Not surprising the user with actions you take without asking\nFor example, if the user asks you how to approach something, you should do your best to answer their question first, and not immediately jump into taking actions.\n3. Do not add additional code explanation summary unless requested by the user. After working on a file, just stop, rather than providing an explanation of what you did.\n\n# Following conventions\nWhen making changes to files, first understand the file's code conventions. Mimic code style, use existing libraries and utilities, and follow existing patterns.\n- NEVER assume that a given library is available, even if it is well known. Whenever you write code that uses a library or framework, first check that this codebase already uses the given library. For example, you might look at neighboring files, or check the package.json (or cargo.toml, and so on depending on the language).\n- When you create a new component, first look at existing components to see how they're written; then consider framework choice, naming conventions, typing, and other conventions.\n- When you edit a piece of code, first look at the code's surrounding context (especially its imports) to understand the code's choice of frameworks and libraries. Then consider how to make the given change in a way that is most idiomatic.\n- Always follow security best practices. Never introduce code that exposes or logs secrets and keys. Never commit secrets or keys to the repository.\n\n# Code style\n- IMPORTANT: DO NOT ADD ***ANY*** COMMENTS unless asked\n\n# Doing tasks\nThe user will primarily request you perform software engineering tasks. This includes solving bugs, adding new functionality, refactoring code, explaining code, and more. For these tasks the following steps are recommended:\n- Use the available search tools to understand the codebase and the user's query. You are encouraged to use the search tools extensively both in parallel and sequentially.\n- Implement the solution using all tools available to you\n- Verify the solution if possible with tests. NEVER assume specific test framework or test script. Check the README or search codebase to determine the testing approach.\n- VERY IMPORTANT: When you have completed a task, you MUST run the lint and typecheck commands (e.g. npm run lint, npm run typecheck, ruff, etc.) with Bash if they were provided to you to ensure your code is correct. If you are unable to find the correct command, ask the user for the command to run and if they supply it, proactively suggest writing it to AGENTS.md so that you will know to run it next time.\nNEVER commit changes unless the user explicitly asks you to. It is VERY IMPORTANT to only commit when explicitly asked, otherwise the user will feel that you are being too proactive.\n\n- Tool results and user messages may include <system-reminder> tags. <system-reminder> tags contain useful information and reminders. They are NOT part of the user's provided input or the tool result.\n\n# Tool usage policy\n- When doing file search, prefer to use the Task tool in order to reduce context usage.\n- You have the capability to call multiple tools in a single response. When multiple independent pieces of information are requested, batch your tool calls together for optimal performance. When making multiple bash tool calls, you MUST send a single message with multiple tools calls to run the calls in parallel. For example, if you need to run \"git status\" and \"git diff\", send a single message with two tool calls to run the calls in parallel.\n\nYou MUST answer concisely with fewer than 4 lines of text (not including tool use or code generation), unless user asks for detail.\n\nIMPORTANT: Before you begin work, think about what the code you're editing is supposed to do based on the filenames directory structure.\n\n# Code References\n\nWhen referencing specific functions or pieces of code include the pattern `file_path:line_number` to allow the user to easily navigate to the source code location.\n\n<example>\nuser: Where are errors from the client handled?\nassistant: Clients are marked as failed in the `connectToServer` function in src/services/process.ts:712.\n</example>\n\nYou are powered by the model named qwen/qwen3-coder:free. The exact model ID is OpenRouter-Free-MAJ/qwen/qwen3-coder:free\nHere is some useful information about the environment you are running in:\n<env>\n Working directory: /home/zesty/Documents/messites/ia2/dinosaure_tests_v2_3pages/260503/qwen3_coder_flash_260503\n Workspace root folder: /\n Is directory a git repo: no\n Platform: linux\n Today's date: Sun May 03 2026\n</env>\nSkills provide specialized instructions and workflows for specific tasks.\nUse the skill tool to load a skill when a task matches its description.\nNo skills are currently available."},{"role":"user","content":[{"type":"text","text":"Called the Read tool with the following input: {\"filePath\":\"/home/zesty/Documents/messites/ia2/dinosaure_tests_v2_3pages/260503/qwen3_coder_flash_260503/prompt.txt\"}"},{"type":"text","text":"<path>/home/zesty/Documents/messites/ia2/dinosaure_tests_v2_3pages/260503/qwen3_coder_flash_260503/prompt.txt</path>\n<type>file</type>\n<content>\n1: # Full Prompt: Generate a production-level \"Dinosaurs\" web page (design + verifiable calculations + docs)\n2: \n3: ## 🎯 Role & Objective\n4: \n5: You are a senior **agentic AI** (full-stack + data + UX) tasked with delivering a **static self-contained web page** about **dinosaurs**, demonstrating:\n6: \n7: 1. **Premium design** (elegant, modern, accessible).\n8: 2. **Non-trivial scientific calculations, traceable and verifiable** (with sources and tests).\n9: 3. **Clear documentation** (technical, functional, and scientific).\n10: \n11: The result must be **directly usable** (opening `index.html` works without backend). No external build is required, but if you suggest a mini-build (e.g. Vite/Parcel), also provide a \"dist\" version ready to use.\n12: \n13: ---\n14: \n15: ## ⚠️ Strict Constraints (3-file format)\n16: \n17: * **Only** `index.html`, `styles.css`, `app.js`.\n18: * **No external dependencies** (no CDN/NPM, no network calls). System fonts only.\n19: * **Offline-first**: opens locally.\n20: * **Data (CSV)**, **constants (JSON)** and **docs (Markdown)** must be **embedded inside `app.js`** as template strings. A minimal Markdown parser converts content to HTML.\n21: * Images/illustrations must be **inline SVGs** (in `index.html`) or dynamically generated SVGs via JS.\n22: \n23: ---\n24: \n25: ## 🧱 Expected Deliverables\n26: \n27: * Exactly **3 files** (simplified MVC):\n28: \n29: 1. `index.html` — **View**: semantic structure, UI components, panels (Explorer, Methods & Calculations, Docs, Tests), Export buttons.\n30: 2. `styles.css` — **Style**: premium design (light/dark), grid, tokens, components (Cards, Chips, Tabs, Modal, Tooltip), accessibility (focus + contrast).\n31: 3. `app.js` — **Controller + Model**:\n32: \n33: * **Model**: dinosaur dataset (CSV **embedded as template string**), scientific constants (JSON **embedded**), minimal CSV parser, schema validation.\n34: * **Calculations**: `massFromFemur`, `bmr`, `speedFromFroude`, `toTimelinePosition`, `explain()`.\n35: * **Controller**: global state, filters, sorting, search, lightweight hash routing, test execution, JSON/CSV/MD export.\n36: * **Integrated tests**: assertions, visual reporting, tolerances, \"Run Tests\" button.\n37: \n38: * **No other resources**: no `data/`, `docs/`, or `tests/` folders. All documentation is **embedded as Markdown strings in `app.js`** and rendered in `index.html`.\n39: \n40: ---\n41: \n42: ## 🧭 Page Content & Structure\n43: \n44: 1. **Hero section** (title, baseline, CTA to calculations). Subtle visual background (gradient, SVG noise, mesh, or low-poly WebGL).\n45: 2. **Dinosaur Explorer**: browsable/filterable gallery (geological period, diet, clade, estimated mass, length). Real-time search.\n46: 3. **Timeline** of eras (Triassic/Jurassic/Cretaceous) with species positions (± uncertainty). Smooth animation, keyboard controls.\n47: 4. **Species Sheets** (modal or anchor page): name, clade, period, measured data (length, femur circumference if available), **derived calculations** (estimated body mass, theoretical BMR, plausible speed, growth), sources.\n48: 5. **\"Methods & Calculations\" Section**: formulas, assumptions, limits. Highlighted \"Key Insight\" boxes.\n49: 6. **Charts**: distributions (histograms, KDE approximation), allometric relations (log-log), ternary plots if relevant. Interactive (hover, zoom, tooltips, export PNG/SVG).\n50: 7. **Species Comparator** (multi-selection).\n51: 8. **FAQ** and **Glossary**.\n52: 9. **Footers**: credits, license, links to technical docs, \"View/Run Tests\" button.\n53: \n54: ---\n55: \n56: ## 🎨 Design & UX Requirements\n57: \n58: * **Premium editorial style**: 12-column grid, 16–24px border radius, soft shadows, generous spacing, clear typography hierarchy. **Light/dark mode**.\n59: * **Design system** in `DESIGN_SYSTEM.md`: colors (HSL), typography, scales, radii, shadows, components (Card, Tag, Chip, Badge, Tooltip, Modal, Tabs, Toast).\n60: * **Accessibility**: WCAG 2.2 AA compliant, contrast tested, visible focus, ARIA roles, keyboard navigation, `prefers-reduced-motion` respected.\n61: * Subtle micro-interactions at 60fps.\n62: \n63: ---\n64: \n65: ## 📊 Required Data Format\n66: \n67: * **Embedded CSV**: `<script type=\"text/csv\" id=\"dinosaurs_csv\">` with ≥30 species.\n68: * **Embedded JSON constants**: `<script type=\"application/json\" id=\"constants_json\">` with references (title, author, year, DOI/URL).\n69: * Missing values allowed but **uncertainty must be displayed** visually.\n70: * Provide **UI controls** to adjust constants live (sliders/inputs).\n71: \n72: ---\n73: \n74: ## 🧮 Required Calculations (Verifiable)\n75: \n76: Provide **pure JS** implementations + **unit tests**.\n77: \n78: 1. **Body mass from femur circumference** (allometry, log-log):\n79: \n80: * General form: `log10(M_kg) = a + b * log10(C_mm)` ⇒ `M_kg = 10^(a + b*log10(C_mm))`\n81: * Read `a`, `b` from constants.\n82: * Must include **reference** + sample check panel.\n83: \n84: 2. **Basal Metabolic Rate (BMR)**:\n85: \n86: * Compare **endotherm vs ectotherm models** via slider.\n87: \n88: 3. **Plausible speed** (Froude number):\n89: \n90: * `Fr = v^2 / (g*l)` ⇒ `v = sqrt(Fr * g * l)`\n91: * Leg length estimation: `0.4 * body length`.\n92: \n93: 4. **Timeline conversion**:\n94: \n95: * Convert `age_mya_start/end` into interactive timeline position.\n96: \n97: 5. **Uncertainty propagation** *(optional but great)*.\n98: \n99: Each model must:\n100: \n101: * Provide `explain(modelName, inputs)` ⇒ returns steps + sources.\n102: * Include **unit tests**.\n103: \n104: ---\n105: \n106: ## 🔎 Verifiability & Transparency\n107: \n108: * Button **\"Verify Calculations\"** runs a test suite with clear output.\n109: * Button **\"Export Proofs\"** outputs a JSON with constants + inputs + result.\n110: * Each calculation must show a **step-by-step detail view**.\n111: \n112: ---\n113: \n114: ## 🧰 Stack & Tech Constraints\n115: \n116: * **No heavy dependencies**. For charts, use SVG or embed a tiny local library.\n117: * No frameworks required (optional Preact/HTM/Web Components OK).\n118: * Optional TypeScript locally compiled into JS (include compiled version).\n119: * **No network requests** at runtime.\n120: \n121: ---\n122: \n123: ## 🧪 Quality & Testing (Integrated)\n124: \n125: * Inline tests for `massFromFemur`, `bmr`, `speedFromFroude`, `toTimelinePosition`.\n126: * CSV schema validation.\n127: * Mini test runner UI with JSON export.\n128: * Reasonable size limit.\n129: \n130: ---\n131: \n132: ## ♿ Accessibility & i18n\n133: \n134: * ARIA roles, labels, tab order.\n135: * Automatic checks (e.g. required button labels).\n136: * Content **in French**, but i18n-ready.\n137: \n138: ---\n139: \n140: ## 📈 Performance & SEO\n141: \n142: * Lighthouse ≥95 target.\n143: * Lazy loading, optimized SVG, local fonts with `font-display: swap`.\n144: * Meta tags + Open Graph + JSON-LD.\n145: \n146: ---\n147: \n148: ## 🧾 Embedded Documentation (in `app.js`)\n149: \n150: * Markdown strings: `README`, `ARCHITECTURE`, `MATH`, `DESIGN_SYSTEM`, `ACCESSIBILITY`.\n151: * Download as `.md`.\n152: \n153: ---\n154: \n155: ## 🔐 Licenses & Credits\n156: \n157: Prefer CC-BY, CC0, MIT.\n158: \n159: ---\n160: \n161: ## ✅ Checklist\n162: \n163: * Offline functional\n164: * Premium responsive design (dark/light)\n165: * Dataset ≥30 species\n166: * Documented calculations\n167: * Tests integrated\n168: * Accessibility + SEO\n169: * Full documentation\n170: \n171: ---\n172: \n173: ## 📝 Inline Templates/Examples\n174: \n175: (CSV + JSON examples preserved here as in original prompt)\n176: \n177: ---\n178: \n179: ## 🚀 Required UI Interactions\n180: \n181: * Multi-filter chips\n182: * Sorting\n183: * Export CSV\n184: * Toggle light/dark mode\n185: * Test runner\n186: \n187: ---\n188: \n189: ## 🔄 Bonus (optional)\n190: \n191: * Hypothesis comparison (endo vs ecto)\n192: * Uncertainty visual bands\n193: * PWA\n194: * SVG sprite generation\n195: \n196: ---\n197: \n198: ## 📣 Final Instructions\n199: \n200: * Zero network usage.\n201: * Show calculation traceability.\n202: * Deliver full folder ready to open.\n203: \n204: **Expected Output**:\n205: \n206: 1. Directory structure summary\n207: 2. Full content of `index.html`, `styles.css`, `app.js`\n208: 3. Inline data/docs/test content\n209: 4. Simple instructions to run\n\n(End of file - total 209 lines)\n</content>"},{"type":"text","text":"\"Suis strictement le fichier joint.\nReponds en francais.\nTu travailles dans le dossier courant et tu dois generer toi-meme les fichiers reels.\n\nContraintes non negociables :\n- Cree directement `index.html`, `styles.css` et `app.js` dans le dossier courant.\n- Ne mets pas leur contenu dans ta reponse finale.\n- N'ajoute pas d'autres fichiers si tu peux l'eviter.\n- Quand les 3 fichiers existent, termine par un court message de confirmation en une ou deux lignes maximum.\n\""}]}],"tools":[{"type":"function","function":{"name":"bash","description":"Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBe aware: OS: linux, Shell: bash\n\nAll commands run in the current working directory by default. Use the `workdir` parameter if you need to run a command in a different directory. AVOID using `cd <directory> && <command>` patterns - use `workdir` instead.\n\nUse `/home/zesty/opencode-tmp/opencode` for temporary work outside the workspace. This directory has already been created, already exists, and is pre-approved for external directory access.\n\nIMPORTANT: This tool is for terminal operations like git, npm, docker, etc. DO NOT use it for file operations (reading, writing, editing, searching, finding files) - use the specialized tools for this instead.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - If the command will create new directories or files, first use `ls` to verify the parent directory exists and is the correct location\n - For example, before running \"mkdir foo/bar\", first use `ls foo` to check that \"foo\" exists and is the intended parent directory\n\n2. Command Execution:\n - Always quote file paths that contain spaces with double quotes (e.g., rm \"path with spaces/file.txt\")\n - Examples of proper quoting:\n - mkdir \"/Users/name/My Documents\" (correct)\n - mkdir /Users/name/My Documents (incorrect - will fail)\n - python \"/path/with spaces/script.py\" (correct)\n - python /path/with spaces/script.py (incorrect - will fail)\n - After ensuring proper quoting, execute the command.\n - Capture the output of the command.\n\nUsage notes:\n - The command argument is required.\n - You can specify an optional timeout in milliseconds. If not specified, commands will time out after 120000ms (2 minutes).\n - It is very helpful if you write a clear, concise description of what this command does in 5-10 words.\n - If the output exceeds 2000 lines or 51200 bytes, it will be truncated and the full output will be written to a file. You can use Read with offset/limit to read specific sections or Grep to search the full content. Do NOT use `head`, `tail`, or other truncation commands to limit output; the full output will already be captured to a file for more precise searching.\n\n - Avoid using Bash with the `find`, `grep`, `cat`, `head`, `tail`, `sed`, `awk`, or `echo` commands, unless explicitly instructed or when these commands are truly necessary for the task. Instead, always prefer using the dedicated tools for these commands:\n - File search: Use Glob (NOT find or ls)\n - Content search: Use Grep (NOT grep or rg)\n - Read files: Use Read (NOT cat/head/tail)\n - Edit files: Use Edit (NOT sed/awk)\n - Write files: Use Write (NOT echo >/cat <<EOF)\n - Communication: Output text directly (NOT echo/printf)\n - When issuing multiple commands:\n - If the commands are independent and can run in parallel, make multiple Bash tool calls in a single message. For example, if you need to run \"git status\" and \"git diff\", send a single message with two Bash tool calls in parallel.\n - If the commands depend on each other and must run sequentially, use a single Bash call with '&&' to chain them together (e.g., `git add . && git commit -m \"message\" && git push`). For instance, if one operation must complete before another starts (like mkdir before cp, Write before Bash for git operations, or git add before git commit), run these operations sequentially instead.\n - Use ';' only when you need to run commands sequentially but don't care if earlier commands fail\n - DO NOT use newlines to separate commands (newlines are ok in quoted strings)\n - AVOID using `cd <directory> && <command>`. Use the `workdir` parameter to change directories instead.\n <good-example>\n Use workdir=\"/foo/bar\" with command: pytest tests\n </good-example>\n <bad-example>\n cd /foo/bar && pytest tests\n </bad-example>\n\n# Committing changes with git\n\nOnly create commits when requested by the user. If unclear, ask first. When the user asks you to create a new git commit, follow these steps carefully:\n\nGit Safety Protocol:\n- NEVER update the git config\n- NEVER run destructive/irreversible git commands (like push --force, hard reset, etc) unless the user explicitly requests them\n- NEVER skip hooks (--no-verify, --no-gpg-sign, etc) unless the user explicitly requests it\n- NEVER run force push to main/master, warn the user if they request it\n- Avoid git commit --amend. ONLY use --amend when ALL conditions are met:\n (1) User explicitly requested amend, OR the commit succeeded and pre-commit hooks auto-modified files that need including — verify by checking `git log` that HEAD is the new commit before amending\n (2) HEAD commit was created by you in this conversation (verify: git log -1 --format='%an %ae')\n (3) Commit has NOT been pushed to remote (verify: git status shows \"Your branch is ahead\")\n- CRITICAL: If commit FAILED or was REJECTED by hook, NEVER amend - fix the issue and create a NEW commit\n- CRITICAL: If you already pushed to remote, NEVER amend unless user explicitly requests it (requires force push)\n- NEVER commit changes unless the user explicitly asks you to. It is VERY IMPORTANT to only commit when explicitly asked, otherwise the user will feel that you are being too proactive.\n\n1. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. run the following bash commands in parallel, each using the Bash tool:\n - Run a git status command to see all untracked files.\n - Run a git diff command to see both staged and unstaged changes that will be committed.\n - Run a git log command to see recent commit messages, so that you can follow this repository's commit message style.\n2. Analyze all staged changes (both previously staged and newly added) and draft a commit message:\n - Summarize the nature of the changes (eg. new feature, enhancement to an existing feature, bug fix, refactoring, test, docs, etc.). Ensure the message accurately reflects the changes and their purpose (i.e. \"add\" means a wholly new feature, \"update\" means an enhancement to an existing feature, \"fix\" means a bug fix, etc.).\n - Do not commit files that likely contain secrets (.env, credentials.json, etc.). Warn the user if they specifically request to commit those files\n - Draft a concise (1-2 sentences) commit message that focuses on the \"why\" rather than the \"what\"\n - Ensure it accurately reflects the changes and their purpose\n3. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. run the following commands:\n - Add relevant untracked files to the staging area.\n - Create the commit with a message\n - Run git status after the commit completes to verify success.\n Note: git status depends on the commit completing, so run it sequentially after the commit.\n4. If the commit fails due to pre-commit hook, fix the issue and create a NEW commit (see amend rules above)\n\nImportant notes:\n- NEVER run additional commands to read or explore code, besides git bash commands\n- NEVER use the TodoWrite or Task tools\n- DO NOT push to the remote repository unless the user explicitly asks you to do so\n- IMPORTANT: Never use git commands with the -i flag (like git rebase -i or git add -i) since they require interactive input which is not supported.\n- If there are no changes to commit (i.e., no untracked files and no modifications), do not create an empty commit\n\n# Creating pull requests\nUse the gh command via the Bash tool for ALL GitHub-related tasks including working with issues, pull requests, checks, and releases. If given a GitHub URL use the gh command to get the information needed.\n\nIMPORTANT: When the user asks you to create a pull request, follow these steps carefully:\n\n1. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. run the following bash commands in parallel using the Bash tool, in order to understand the current state of the branch since it diverged from the main branch:\n - Run a git status command to see all untracked files\n - Run a git diff command to see both staged and unstaged changes that will be committed\n - Check if the current branch tracks a remote branch and is up to date with the remote, so you know if you need to push to the remote\n - Run a git log command and `git diff [base-branch]...HEAD` to understand the full commit history for the current branch (from the time it diverged from the base branch)\n2. Analyze all changes that will be included in the pull request, making sure to look at all relevant commits (NOT just the latest commit, but ALL commits that will be included in the pull request!!!), and draft a pull request summary\n3. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. run the following commands in parallel:\n - Create new branch if needed\n - Push to remote with -u flag if needed\n - Create PR using gh pr create with the format below. Use a HEREDOC to pass the body to ensure correct formatting.\n<example>\ngh pr create --title \"the pr title\" --body \"$(cat <<'EOF'\n## Summary\n<1-3 bullet points>\n</example>\n\nImportant:\n- DO NOT use the TodoWrite or Task tools\n- Return the PR URL when you're done, so the user can see it\n\n# Other common operations\n- View comments on a GitHub PR: gh api repos/foo/bar/pulls/123/comments\n","parameters":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"command":{"description":"The command to execute","type":"string"},"timeout":{"description":"Optional timeout in milliseconds","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"workdir":{"description":"The working directory to run the command in. Defaults to the current directory. Use this instead of 'cd' commands.","type":"string"},"description":{"description":"Clear, concise description of what this command does in 5-10 words. Examples:\nInput: ls\nOutput: Lists files in current directory\n\nInput: git status\nOutput: Shows working tree status\n\nInput: npm install\nOutput: Installs package dependencies\n\nInput: mkdir foo\nOutput: Creates directory 'foo'","type":"string"}},"required":["command","description"]}}},{"type":"function","function":{"name":"read","description":"Read a file or directory from the local filesystem. If the path does not exist, an error is returned.\n\nUsage:\n- The filePath parameter should be an absolute path.\n- By default, this tool returns up to 2000 lines from the start of the file.\n- The offset parameter is the line number to start from (1-indexed).\n- To read later sections, call this tool again with a larger offset.\n- Use the grep tool to find specific content in large files or files with long lines.\n- If you are unsure of the correct file path, use the glob tool to look up filenames by glob pattern.\n- Contents are returned with each line prefixed by its line number as `<line>: <content>`. For example, if a file has contents \"foo\\n\", you will receive \"1: foo\\n\". For directories, entries are returned one per line (without line numbers) with a trailing `/` for subdirectories.\n- Any line longer than 2000 characters is truncated.\n- Call this tool in parallel when you know there are multiple files you want to read.\n- Avoid tiny repeated slices (30 line chunks). If you need more context, read a larger window.\n- This tool can read image files and PDFs and return them as file attachments.\n","parameters":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"filePath":{"description":"The absolute path to the file or directory to read","type":"string"},"offset":{"description":"The line number to start reading from (1-indexed)","type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"description":"The maximum number of lines to read (defaults to 2000)","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["filePath"]}}},{"type":"function","function":{"name":"glob","description":"- Fast file pattern matching tool that works with any codebase size\n- Supports glob patterns like \"**/*.js\" or \"src/**/*.ts\"\n- Returns matching file paths sorted by modification time\n- Use this tool when you need to find files by name patterns\n- When you are doing an open-ended search that may require multiple rounds of globbing and grepping, use the Task tool instead\n- You have the capability to call multiple tools in a single response. It is always better to speculatively perform multiple searches as a batch that are potentially useful.\n","parameters":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"pattern":{"description":"The glob pattern to match files against","type":"string"},"path":{"description":"The directory to search in. If not specified, the current working directory will be used. IMPORTANT: Omit this field to use the default directory. DO NOT enter \"undefined\" or \"null\" - simply omit it for the default behavior. Must be a valid directory path if provided.","type":"string"}},"required":["pattern"]}}},{"type":"function","function":{"name":"grep","description":"- Fast content search tool that works with any codebase size\n- Searches file contents using regular expressions\n- Supports full regex syntax (eg. \"log.*Error\", \"function\\s+\\w+\", etc.)\n- Filter files by pattern with the include parameter (eg. \"*.js\", \"*.{ts,tsx}\")\n- Returns file paths and line numbers with at least one match sorted by modification time\n- Use this tool when you need to find files containing specific patterns\n- If you need to identify/count the number of matches within files, use the Bash tool with `rg` (ripgrep) directly. Do NOT use `grep`.\n- When you are doing an open-ended search that may require multiple rounds of globbing and grepping, use the Task tool instead\n","parameters":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"pattern":{"description":"The regex pattern to search for in file contents","type":"string"},"path":{"description":"The directory to search in. Defaults to the current working directory.","type":"string"},"include":{"description":"File pattern to include in the search (e.g. \"*.js\", \"*.{ts,tsx}\")","type":"string"}},"required":["pattern"]}}},{"type":"function","function":{"name":"edit","description":"Performs exact string replacements in files. \n\nUsage:\n- You must use your `Read` tool at least once in the conversation before editing. This tool will error if you attempt an edit without reading the file. \n- When editing text from Read tool output, ensure you preserve the exact indentation (tabs/spaces) as it appears AFTER the line number prefix. The line number prefix format is: line number + colon + space (e.g., `1: `). Everything after that space is the actual file content to match. Never include any part of the line number prefix in the oldString or newString.\n- ALWAYS prefer editing existing files in the codebase. NEVER write new files unless explicitly required.\n- Only use emojis if the user explicitly requests it. Avoid adding emojis to files unless asked.\n- The edit will FAIL if `oldString` is not found in the file with an error \"oldString not found in content\".\n- The edit will FAIL if `oldString` is found multiple times in the file with an error \"Found multiple matches for oldString. Provide more surrounding lines in oldString to identify the correct match.\" Either provide a larger string with more surrounding context to make it unique or use `replaceAll` to change every instance of `oldString`. \n- Use `replaceAll` for replacing and renaming strings across the file. This parameter is useful if you want to rename a variable for instance.\n","parameters":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"filePath":{"description":"The absolute path to the file to modify","type":"string"},"oldString":{"description":"The text to replace","type":"string"},"newString":{"description":"The text to replace it with (must be different from oldString)","type":"string"},"replaceAll":{"description":"Replace all occurrences of oldString (default false)","type":"boolean"}},"required":["filePath","oldString","newString"]}}},{"type":"function","function":{"name":"write","description":"Writes a file to the local filesystem.\n\nUsage:\n- This tool will overwrite the existing file if there is one at the provided path.\n- If this is an existing file, you MUST use the Read tool first to read the file's contents. This tool will fail if you did not read the file first.\n- ALWAYS prefer editing existing files in the codebase. NEVER write new files unless explicitly required.\n- NEVER proactively create documentation files (*.md) or README files. Only create documentation files if explicitly requested by the User.\n- Only use emojis if the user explicitly requests it. Avoid writing emojis to files unless asked.\n","parameters":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"content":{"description":"The content to write to the file","type":"string"},"filePath":{"description":"The absolute path to the file to write (must be absolute, not relative)","type":"string"}},"required":["content","filePath"]}}},{"type":"function","function":{"name":"task","description":"Launch a new agent to handle complex, multistep tasks autonomously.\n\nWhen using the Task tool, you must specify a subagent_type parameter to select which agent type to use.\n\nWhen to use the Task tool:\n- When you are instructed to execute custom slash commands. Use the Task tool with the slash command invocation as the entire prompt. The slash command can take arguments. For example: Task(description=\"Check the file\", prompt=\"/check-file path/to/file.py\")\n\nWhen NOT to use the Task tool:\n- If you want to read a specific file path, use the Read or Glob tool instead of the Task tool, to find the match more quickly\n- If you are searching for a specific class definition like \"class Foo\", use the Glob tool instead, to find the match more quickly\n- If you are searching for code within a specific file or set of 2-3 files, use the Read tool instead of the Task tool, to find the match more quickly\n- Other tasks that are not related to the agent descriptions above\n\n\nUsage notes:\n1. Launch multiple agents concurrently whenever possible, to maximize performance; to do that, use a single message with multiple tool uses\n2. When the agent is done, it will return a single message back to you. The result returned by the agent is not visible to the user. To show the user the result, you should send a text message back to the user with a concise summary of the result. The output includes a task_id you can reuse later to continue the same subagent session.\n3. Each agent invocation starts with a fresh context unless you provide task_id to resume the same subagent session (which continues with its previous messages and tool outputs). When starting fresh, your prompt should contain a highly detailed task description for the agent to perform autonomously and you should specify exactly what information the agent should return back to you in its final and only message to you.\n4. The agent's outputs should generally be trusted\n5. Clearly tell the agent whether you expect it to write code or just to do research (search, file reads, web fetches, etc.), since it is not aware of the user's intent. Tell it how to verify its work if possible (e.g., relevant test commands).\n6. If the agent description mentions that it should be used proactively, then you should try your best to use it without the user having to ask for it first. Use your judgement.\n\nExample usage (NOTE: The agents below are fictional examples for illustration only - use the actual agents listed above):\n\n<example_agent_descriptions>\n\"code-reviewer\": use this agent after you are done writing a significant piece of code\n\"greeting-responder\": use this agent when to respond to user greetings with a friendly joke\n</example_agent_description>\n\n<example>\nuser: \"Please write a function that checks if a number is prime\"\nassistant: Sure let me write a function that checks if a number is prime\nassistant: First let me use the Write tool to write a function that checks if a number is prime\nassistant: I'm going to use the Write tool to write the following code:\n<code>\nfunction isPrime(n) {\n if (n <= 1) return false\n for (let i = 2; i * i <= n; i++) {\n if (n % i === 0) return false\n }\n return true\n}\n</code>\n<commentary>\nSince a significant piece of code was written and the task was completed, now use the code-reviewer agent to review the code\n</commentary>\nassistant: Now let me use the code-reviewer agent to review the code\nassistant: Uses the Task tool to launch the code-reviewer agent\n</example>\n\n<example>\nuser: \"Hello\"\n<commentary>\nSince the user is greeting, use the greeting-responder agent to respond with a friendly joke\n</commentary>\nassistant: \"I'm going to use the Task tool to launch the with the greeting-responder agent\"\n</example>\n\nAvailable agent types and the tools they have access to:\n- explore: Fast agent specialized for exploring codebases. Use this when you need to quickly find files by patterns (eg. \"src/components/**/*.tsx\"), search code for keywords (eg. \"API endpoints\"), or answer questions about the codebase (eg. \"how do API endpoints work?\"). When calling this agent, specify the desired thoroughness level: \"quick\" for basic searches, \"medium\" for moderate exploration, or \"very thorough\" for comprehensive analysis across multiple locations and naming conventions.\n- general: General-purpose agent for researching complex questions and executing multi-step tasks. Use this agent to execute multiple units of work in parallel.","parameters":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"description":{"description":"A short (3-5 words) description of the task","type":"string"},"prompt":{"description":"The task for the agent to perform","type":"string"},"subagent_type":{"description":"The type of specialized agent to use for this task","type":"string"},"task_id":{"description":"This should only be set if you mean to resume a previous task (you can pass a prior task_id and the task will continue the same subagent session as before instead of creating a fresh one)","type":"string"},"command":{"description":"The command that triggered this task","type":"string"}},"required":["description","prompt","subagent_type"]}}},{"type":"function","function":{"name":"webfetch","description":"- Fetches content from a specified URL\n- Takes a URL and optional format as input\n- Fetches the URL content, converts to requested format (markdown by default)\n- Returns the content in the specified format\n- Use this tool when you need to retrieve and analyze web content\n\nUsage notes:\n - IMPORTANT: if another tool is present that offers better web fetching capabilities, is more targeted to the task, or has fewer restrictions, prefer using that tool instead of this one.\n - The URL must be a fully-formed valid URL\n - HTTP URLs will be automatically upgraded to HTTPS\n - Format options: \"markdown\" (default), \"text\", or \"html\"\n - This tool is read-only and does not modify any files\n - Results may be summarized if the content is very large\n","parameters":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"description":"The URL to fetch content from","type":"string"},"format":{"description":"The format to return the content in (text, markdown, or html). Defaults to markdown.","default":"markdown","type":"string","enum":["text","markdown","html"]},"timeout":{"description":"Optional timeout in seconds (max 120)","type":"number"}},"required":["url"]}}},{"type":"function","function":{"name":"todowrite","description":"Use this tool to create and manage a structured task list for your current coding session. This helps you track progress, organize complex tasks, and demonstrate thoroughness to the user.\nIt also helps the user understand the progress of the task and overall progress of their requests.\n\n## When to Use This Tool\nUse this tool proactively in these scenarios:\n\n1. Complex multistep tasks - When a task requires 3 or more distinct steps or actions\n2. Non-trivial and complex tasks - Tasks that require careful planning or multiple operations\n3. User explicitly requests todo list - When the user directly asks you to use the todo list\n4. User provides multiple tasks - When users provide a list of things to be done (numbered or comma-separated)\n5. After receiving new instructions - Immediately capture user requirements as todos. Feel free to edit the todo list based on new information.\n6. After completing a task - Mark it complete and add any new follow-up tasks\n7. When you start working on a new task, mark the todo as in_progress. Ideally you should only have one todo as in_progress at a time. Complete existing tasks before starting new ones.\n\n## When NOT to Use This Tool\n\nSkip using this tool when:\n1. There is only a single, straightforward task\n2. The task is trivial and tracking it provides no organizational benefit\n3. The task can be completed in less than 3 trivial steps\n4. The task is purely conversational or informational\n\nNOTE that you should not use this tool if there is only one trivial task to do. In this case you are better off just doing the task directly.\n\n## Examples of When to Use the Todo List\n\n<example>\nUser: I want to add a dark mode toggle to the application settings. Make sure you run the tests and build when you're done!\nAssistant: I'll help add a dark mode toggle to your application settings. Let me create a todo list to track this implementation.\n*Creates todo list with the following items:*\n1. Create dark mode toggle component in Settings page\n2. Add dark mode state management (context/store)\n3. Implement CSS-in-JS styles for dark theme\n4. Update existing components to support theme switching\n5. Run tests and build process, addressing any failures or errors that occur\n*Begins working on the first task*\n\n<reasoning>\nThe assistant used the todo list because:\n1. Adding dark mode is a multi-step feature requiring UI, state management, and styling changes\n2. The user explicitly requested tests and build be run afterward\n3. The assistant inferred that tests and build need to pass by adding \"Ensure tests and build succeed\" as the final task\n</reasoning>\n</example>\n\n<example>\nUser: Help me rename the function getCwd to getCurrentWorkingDirectory across my project\nAssistant: Let me first search through your codebase to find all occurrences of 'getCwd'.\n*Uses grep or search tools to locate all instances of getCwd in the codebase*\nAssistant: I've found 15 instances of 'getCwd' across 8 different files. Let me create a todo list to track these changes.\n*Creates todo list with specific items for each file that needs updating*\n\n<reasoning>\nThe assistant used the todo list because:\n1. First, the assistant searched to understand the scope of the task\n2. Upon finding multiple occurrences across different files, it determined this was a complex task with multiple steps\n3. The todo list helps ensure every instance is tracked and updated systematically\n4. This approach prevents missing any occurrences and maintains code consistency\n</reasoning>\n</example>\n\n\n<example>\nUser: I need to implement these features for my e-commerce site: user registration, product catalog, shopping cart, and checkout flow.\nAssistant: I'll help implement these features. First, let's add all the features to the todo list.\n*Creates a todo list breaking down each feature into specific tasks based on the project architecture*\nAssistant: Let's start with user registration. This will involve creating database models, API endpoints, and frontend forms that integrate with your existing authentication system.\n\n<reasoning>\nThe assistant used the todo list because:\n1. The user provided multiple complex features to implement in a comma separated list\n2. The todo list helps organize these large features into manageable tasks\n3. This approach allows for tracking progress across the entire implementation\n</reasoning>\n</example>\n\n<example>\nUser: Can you help optimize my React application? It's rendering slowly and has performance issues.</user>\nAssistant: I'll help optimize your React application. First, let me examine your codebase to identify potential performance bottlenecks.\n*Reviews component structure, render patterns, state management, and data fetching*\nAssistant: After analyzing your codebase, I've identified several performance issues. Let me create a todo list to track our optimization efforts.\n*Creates todo list with items like: 1) Implement memoization for expensive calculations in ProductList, 2) Add virtualization for long lists in Dashboard, 3) Optimize image loading in Gallery component, 4) Fix state update loops in ShoppingCart, 5) Review bundle size and implement code splitting*\nLet's start by implementing memoization for the expensive calculations in your ProductList component.</assistant>\n\n<reasoning>\nThe assistant used the todo list because:\n1. First, the assistant examined the codebase to identify specific performance issues\n2. Based on this analysis, it identified multiple optimization opportunities\n3. Performance optimization is a non-trivial task requiring multiple steps\n4. The todo list helps methodically track improvements across different components\n5. This systematic approach ensures all performance bottlenecks are addressed\n</reasoning>\n</example>\n\n## Examples of When NOT to Use the Todo List\n\n<example>\nUser: How do I print 'Hello World' in Python?\nAssistant: In Python, you can print \"Hello World\" with this simple code:\n\npython\nprint(\"Hello World\")\n\nThis will output the text \"Hello World\" to the console when executed.</assistant>\n\n<reasoning>\nThe assistant did not use the todo list because this is a single, trivial task that can be completed in one step. There's no need to track multiple tasks or steps for such a straightforward request.\n</reasoning>\n</example>\n\n<example>\nUser: What does the git status command do?\nAssistant: The git status command shows the current state of your working directory and staging area. It displays which changes have been staged, which haven't, and which files aren't being tracked by Git. This is a fundamental command for understanding the current state of your repository before making commits.\n\n<reasoning>\nThe assistant did not use the todo list because this is an informational request with no actual coding task to complete. The user is simply asking for an explanation, not for the assistant to perform multiple steps or tasks.\n</reasoning>\n</example>\n\n<example>\nUser: Can you add a comment to the calculateTotal function to explain what it does?\nAssistant: Sure, let me add a comment to the calculateTotal function to explain what it does.\n* Uses the Edit tool to add a comment to the calculateTotal function *\n\n<reasoning>\nThe assistant did not use the todo list because this is a single, straightforward task confined to one location in the code. Adding a comment doesn't require tracking multiple steps or systematic organization.\n</reasoning>\n</example>\n\n<example>\nUser: Run npm install for me and tell me what happens.\nAssistant: I'll run the npm install command for you.\n\n*Executes: npm install*\n\nThe command completed successfully. Here's the output:\n[Output of npm install command]\n\nAll dependencies have been installed according to your package.json file.\n\n<reasoning>\nThe assistant did not use the todo list because this is a single command execution with immediate results. There are no multiple steps to track or organize, making the todo list unnecessary for this straightforward task.\n</reasoning>\n</example>\n\n## Task States and Management\n\n1. **Task States**: Use these states to track progress:\n - pending: Task not yet started\n - in_progress: Currently working on (limit to ONE task at a time)\n - completed: Task finished successfully\n - cancelled: Task no longer needed\n\n2. **Task Management**:\n - Update task status in real-time as you work\n - Mark tasks complete IMMEDIATELY after finishing (don't batch completions)\n - Only have ONE task in_progress at any time\n - Complete current tasks before starting new ones\n - Cancel tasks that become irrelevant\n\n3. **Task Breakdown**:\n - Create specific, actionable items\n - Break complex tasks into smaller, manageable steps\n - Use clear, descriptive task names\n\nWhen in doubt, use this tool. Being proactive with task management demonstrates attentiveness and ensures you complete all requirements successfully.\n\n","parameters":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"todos":{"description":"The updated todo list","type":"array","items":{"type":"object","properties":{"content":{"description":"Brief description of the task","type":"string"},"status":{"description":"Current status of the task: pending, in_progress, completed, cancelled","type":"string"},"priority":{"description":"Priority level of the task: high, medium, low","type":"string"}},"required":["content","status","priority"]}}},"required":["todos"]}}},{"type":"function","function":{"name":"skill","description":"Load a specialized skill when the task at hand matches one of the skills listed in the system prompt.\n\nUse this tool to inject the skill's instructions and resources into current conversation. The output may contain detailed workflow guidance as well as references to scripts, files, etc in the same directory as the skill.\n\nThe skill name must match one of the skills listed in your system prompt.\n\nNo skills are currently available.","parameters":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"description":"The name of the skill from available_skills","type":"string"}},"required":["name"]}}},{"type":"function","function":{"name":"exa_web_search_exa","description":"Search the web for any topic and get clean, ready-to-use content.\n\n Best for: Finding current information, news, facts, people, companies, or answering questions about any topic.\n Returns: Clean text content from top search results.\n\n Query tips:\n describe the ideal page, not keywords. \"blog post comparing React and Vue performance\" not \"React vs Vue\".\n Use category:people / category:company to search through Linkedin profiles / companies respectively.\n If highlights are insufficient, follow up with web_fetch_exa on the best URLs.","parameters":{"type":"object","properties":{"query":{"type":"string","description":"Natural language search query. Should be a semantically rich description of the ideal page, not just keywords. Optionally include category:<type> (company, people) to focus results — e.g. 'category:people John Doe software engineer'."},"numResults":{"type":"number","minimum":1,"maximum":100,"description":"Number of search results to return (must be a number, default: 10)."}},"required":["query"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"exa_web_fetch_exa","description":"Read a webpage's full content as clean markdown. Use after web_search_exa when highlights are insufficient or to read any URL.\n\nBest for: Extracting full content from known URLs. Batch multiple URLs in one call.\nReturns: Clean text content and metadata from the page(s).","parameters":{"type":"object","properties":{"urls":{"type":"array","items":{"type":"string"},"description":"URLs to read. Batch multiple URLs in one call."},"maxCharacters":{"type":"number","minimum":1,"description":"Maximum characters to extract per page (must be a positive number, default: 3000)"}},"required":["urls"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"gh_grep_searchGitHub","description":"Find real-world code examples from over a million public GitHub repositories to help answer programming questions.\n\n**IMPORTANT: This tool searches for literal code patterns (like grep), not keywords. Search for actual code that would appear in files:**\n- ✅ Good: 'useState(', 'import React from', 'async function', '(?s)try {.*await'\n- ❌ Bad: 'react tutorial', 'best practices', 'how to use'\n\n**When to use this tool:**\n- When implementing unfamiliar APIs or libraries and need to see real usage patterns\n- When unsure about correct syntax, parameters, or configuration for a specific library\n- When looking for production-ready examples and best practices for implementation\n- When needing to understand how different libraries or frameworks work together\n\n**Perfect for questions like:**\n- \"How do developers handle authentication in Next.js apps?\" → Search: 'getServerSession' with language=['TypeScript', 'TSX']\n- \"What are common React error boundary patterns?\" → Search: 'ErrorBoundary' with language=['TSX']\n- \"Show me real useEffect cleanup examples\" → Search: '(?s)useEffect\\(\\(\\) => {.*removeEventListener' with useRegexp=true\n- \"How do developers handle CORS in Flask applications?\" → Search: 'CORS(' with matchCase=true and language=['Python']\n\nUse regular expressions with useRegexp=true for flexible patterns like '(?s)useState\\(.*loading' to find useState hooks with loading-related variables. Prefix the pattern with '(?s)' to match across multiple lines.\n\nFilter by language, repository, or file path to narrow results.","parameters":{"type":"object","properties":{"query":{"type":"string","description":"The literal code pattern to search for (e.g., 'useState(', 'export function'). Use actual code that would appear in files, not keywords or questions."},"matchCase":{"type":"boolean","description":"Whether the search should be case sensitive","default":false},"matchWholeWords":{"type":"boolean","description":"Whether to match whole words only","default":false},"useRegexp":{"type":"boolean","description":"Whether to interpret the query as a regular expression","default":false},"repo":{"type":"string","description":"Filter by repository.\n Examples: 'facebook/react', 'microsoft/vscode', 'vercel/ai'.\n Can match partial names, for example 'vercel/' will find repositories in the vercel org."},"path":{"type":"string","description":"Filter by file path.\n Examples: 'src/components/Button.tsx', 'README.md'.\n Can match partial paths, for example '/route.ts' will find route.ts files at any level."},"language":{"type":"array","items":{"type":"string"},"description":"Filter by programming language.\n Examples: ['TypeScript', 'TSX'], ['JavaScript'], ['Python'], ['Java'], ['C#'], ['Markdown'], ['YAML']"}},"required":["query"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"tavily_tavily_search","description":"Search the web for current information on any topic. Use for news, facts, or data beyond your knowledge cutoff. Returns snippets and source URLs.","parameters":{"type":"object","properties":{"query":{"description":"Search query","type":"string"},"max_results":{"default":5,"description":"The maximum number of search results to return","type":"integer"},"search_depth":{"default":"basic","description":"The depth of the search. 'basic' for generic results, 'advanced' for more thorough search, 'fast' for optimized low latency with high relevance, 'ultra-fast' for prioritizing latency above all else","enum":["basic","advanced","fast","ultra-fast"],"type":"string"},"topic":{"const":"general","default":"general","description":"The category of the search. This will determine which of our agents will be used for the search","type":"string"},"time_range":{"anyOf":[{"enum":["day","week","month","year"],"type":"string"},{"type":"null"}],"default":null,"description":"The time range back from the current date to include in the search results"},"include_images":{"default":false,"description":"Include a list of query-related images in the response","type":"boolean"},"include_image_descriptions":{"default":false,"description":"Include a list of query-related images and their descriptions in the response","type":"boolean"},"include_raw_content":{"default":false,"description":"Include the cleaned and parsed HTML content of each search result","type":"boolean"},"include_domains":{"default":[],"description":"A list of domains to specifically include in the search results, if the user asks to search on specific sites set this to the domain of the site","items":{"type":"string"},"type":"array"},"exclude_domains":{"default":[],"description":"List of domains to specifically exclude, if the user asks to exclude a domain set this to the domain of the site","items":{"type":"string"},"type":"array"},"country":{"default":"","description":"Boost search results from a specific country. Must be a full country name (e.g., 'United States', 'Japan', 'Germany'). ISO country codes (e.g., 'us', 'jp') are not supported. Available only if topic is general. See https://docs.tavily.com/documentation/api-reference/search for the full list of supported countries.","type":"string"},"include_favicon":{"default":false,"description":"Whether to include the favicon URL for each result","type":"boolean"},"start_date":{"default":"","description":"Will return all results after the specified start date. Required to be written in the format YYYY-MM-DD.","type":"string"},"end_date":{"default":"","description":"Will return all results before the specified end date. Required to be written in the format YYYY-MM-DD","type":"string"},"exact_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"Only return results containing the exact phrase(s) in quotes in your query"}},"required":["query"],"additionalProperties":false}}},{"type":"function","function":{"name":"tavily_tavily_extract","description":"Extract content from URLs. Returns raw page content in markdown or text format.","parameters":{"type":"object","properties":{"urls":{"description":"List of URLs to extract content from","items":{"type":"string"},"type":"array"},"extract_depth":{"default":"basic","description":"Use 'advanced' for LinkedIn, protected sites, or tables/embedded content","enum":["basic","advanced"],"type":"string"},"include_images":{"default":false,"description":"Include images from pages","type":"boolean"},"format":{"default":"markdown","description":"Output format","enum":["markdown","text"],"type":"string"},"include_favicon":{"default":false,"description":"Include favicon URLs","type":"boolean"},"query":{"default":"","description":"Query to rerank content chunks by relevance","type":"string"}},"required":["urls"],"additionalProperties":false}}},{"type":"function","function":{"name":"tavily_tavily_crawl","description":"Crawl a website starting from a URL. Extracts content from pages with configurable depth and breadth.","parameters":{"type":"object","properties":{"url":{"description":"The root URL to begin the crawl","type":"string"},"max_depth":{"default":1,"description":"Max depth of the crawl. Defines how far from the base URL the crawler can explore.","minimum":1,"type":"integer"},"max_breadth":{"default":20,"description":"Max number of links to follow per level of the tree (i.e., per page)","minimum":1,"type":"integer"},"limit":{"default":50,"description":"Total number of links the crawler will process before stopping","minimum":1,"type":"integer"},"instructions":{"default":"","description":"Natural language instructions for the crawler. Instructions specify which types of pages the crawler should return.","type":"string"},"select_paths":{"default":[],"description":"Regex patterns to select only URLs with specific path patterns (e.g., /docs/.*, /api/v1.*)","items":{"type":"string"},"type":"array"},"select_domains":{"default":[],"description":"Regex patterns to restrict crawling to specific domains or subdomains (e.g., ^docs\\.example\\.com$)","items":{"type":"string"},"type":"array"},"allow_external":{"default":true,"description":"Whether to return external links in the final response","type":"boolean"},"extract_depth":{"default":"basic","description":"Advanced extraction retrieves more data, including tables and embedded content, with higher success but may increase latency","enum":["basic","advanced"],"type":"string"},"format":{"default":"markdown","description":"The format of the extracted web page content. markdown returns content in markdown format. text returns plain text and may increase latency.","enum":["markdown","text"],"type":"string"},"include_favicon":{"default":false,"description":"Whether to include the favicon URL for each result","type":"boolean"}},"required":["url"],"additionalProperties":false}}},{"type":"function","function":{"name":"tavily_tavily_map","description":"Map a website's structure. Returns a list of URLs found starting from the base URL.","parameters":{"type":"object","properties":{"url":{"description":"The root URL to begin the mapping","type":"string"},"max_depth":{"default":1,"description":"Max depth of the mapping. Defines how far from the base URL the crawler can explore","minimum":1,"type":"integer"},"max_breadth":{"default":20,"description":"Max number of links to follow per level of the tree (i.e., per page)","minimum":1,"type":"integer"},"limit":{"default":50,"description":"Total number of links the crawler will process before stopping","minimum":1,"type":"integer"},"instructions":{"default":"","description":"Natural language instructions for the crawler","type":"string"},"select_paths":{"default":[],"description":"Regex patterns to select only URLs with specific path patterns (e.g., /docs/.*, /api/v1.*)","items":{"type":"string"},"type":"array"},"select_domains":{"default":[],"description":"Regex patterns to restrict crawling to specific domains or subdomains (e.g., ^docs\\.example\\.com$)","items":{"type":"string"},"type":"array"},"allow_external":{"default":true,"description":"Whether to return external links in the final response","type":"boolean"}},"required":["url"],"additionalProperties":false}}},{"type":"function","function":{"name":"tavily_tavily_research","description":"Perform comprehensive research on a given topic or question. Use this tool when you need to gather information from multiple sources, including web pages, documents, and other resources, to answer a question or complete a task. Returns a detailed response based on the research findings. Rate limit: 20 requests per minute.","parameters":{"type":"object","properties":{"input":{"description":"A comprehensive description of the research task","type":"string"},"model":{"default":"auto","description":"Defines the degree of depth of the research. 'mini' is good for narrow tasks with few subtopics. 'pro' is good for broad tasks with many subtopics","enum":["mini","pro","auto"],"type":"string"}},"required":["input"],"additionalProperties":false}}},{"type":"function","function":{"name":"context7_resolve-library-id","description":"Resolves a package/product name to a Context7-compatible library ID and returns matching libraries.\n\nYou MUST call this function before 'Query Documentation' tool to obtain a valid Context7-compatible library ID UNLESS the user explicitly provides a library ID in the format '/org/project' or '/org/project/version' in their query.\n\nEach result includes:\n- Library ID: Context7-compatible identifier (format: /org/project)\n- Name: Library or package name\n- Description: Short summary\n- Code Snippets: Number of available code examples\n- Source Reputation: Authority indicator (High, Medium, Low, or Unknown)\n- Benchmark Score: Quality indicator (100 is the highest score)\n- Versions: List of versions if available. Use one of those versions if the user provides a version in their query. The format of the version is /org/project/version.\n\nFor best results, select libraries based on name match, source reputation, snippet coverage, benchmark score, and relevance to your use case.\n\nSelection Process:\n1. Analyze the query to understand what library/package the user is looking for\n2. Return the most relevant match based on:\n- Name similarity to the query (exact matches prioritized)\n- Description relevance to the query's intent\n- Documentation coverage (prioritize libraries with higher Code Snippet counts)\n- Source reputation (consider libraries with High or Medium reputation more authoritative)\n- Benchmark Score: Quality indicator (100 is the highest score)\n\nResponse Format:\n- Return the selected library ID in a clearly marked section\n- Provide a brief explanation for why this library was chosen\n- If multiple good matches exist, acknowledge this but proceed with the most relevant one\n- If no good matches exist, clearly state this and suggest query refinements\n\nFor ambiguous queries, request clarification before proceeding with a best-guess match.\n\nIMPORTANT: Do not call this tool more than 3 times per question. If you cannot find what you need after 3 calls, use the best result you have.","parameters":{"type":"object","properties":{"query":{"type":"string","description":"The question or task you need help with. This is used to rank library results by relevance to what the user is trying to accomplish. The query is sent to the Context7 API for processing. Do not include any sensitive or confidential information such as API keys, passwords, credentials, personal data, or proprietary code in your query."},"libraryName":{"type":"string","description":"Library name to search for and retrieve a Context7-compatible library ID. Use the official library name with proper punctuation — e.g., 'Next.js' instead of 'nextjs', 'Customer.io' instead of 'customerio', 'Three.js' instead of 'threejs'."}},"required":["query","libraryName"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"context7_query-docs","description":"Retrieves and queries up-to-date documentation and code examples from Context7 for any programming library or framework.\n\nYou must call 'Resolve Context7 Library ID' tool first to obtain the exact Context7-compatible library ID required to use this tool, UNLESS the user explicitly provides a library ID in the format '/org/project' or '/org/project/version' in their query.\n\nWorkflow: call first without researchMode. If that doesn't answer the question, retry with researchMode: true. Do not call each tool more than 3 times per question.","parameters":{"type":"object","properties":{"libraryId":{"type":"string","description":"Exact Context7-compatible library ID (e.g., '/mongodb/docs', '/vercel/next.js', '/supabase/supabase', '/vercel/next.js/v14.3.0-canary.87') retrieved from 'resolve-library-id' or directly from user query in the format '/org/project' or '/org/project/version'."},"query":{"type":"string","description":"The question or task you need help with. Be specific and include relevant details. Good: 'How to set up authentication with JWT in Express.js' or 'React useEffect cleanup function examples'. Bad: 'auth' or 'hooks'. The query is sent to the Context7 API for processing. Do not include any sensitive or confidential information such as API keys, passwords, credentials, personal data, or proprietary code in your query."},"researchMode":{"description":"Retry the query with deep research: spins up sandboxed agents that read the actual source repos and runs a live web search, then synthesizes a fresh answer. Set true on retry if you weren't satisfied with the first answer and want a more thorough one. Requires an API key. You can get one free at https://context7.com.","type":"boolean"}},"required":["libraryId","query"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"filesystem_read_file","description":"Read the complete contents of a file as text. DEPRECATED: Use read_text_file instead.","parameters":{"type":"object","properties":{"path":{"type":"string"},"tail":{"description":"If provided, returns only the last N lines of the file","type":"number"},"head":{"description":"If provided, returns only the first N lines of the file","type":"number"}},"required":["path"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"filesystem_read_text_file","description":"Read the complete contents of a file from the file system as text. Handles various text encodings and provides detailed error messages if the file cannot be read. Use this tool when you need to examine the contents of a single file. Use the 'head' parameter to read only the first N lines of a file, or the 'tail' parameter to read only the last N lines of a file. Operates on the file as text regardless of extension. Only works within allowed directories.","parameters":{"type":"object","properties":{"path":{"type":"string"},"tail":{"description":"If provided, returns only the last N lines of the file","type":"number"},"head":{"description":"If provided, returns only the first N lines of the file","type":"number"}},"required":["path"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"filesystem_read_media_file","description":"Read an image or audio file. Returns the base64 encoded data and MIME type. Only works within allowed directories.","parameters":{"type":"object","properties":{"path":{"type":"string"}},"required":["path"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"filesystem_read_multiple_files","description":"Read the contents of multiple files simultaneously. This is more efficient than reading files one by one when you need to analyze or compare multiple files. Each file's content is returned with its path as a reference. Failed reads for individual files won't stop the entire operation. Only works within allowed directories.","parameters":{"type":"object","properties":{"paths":{"minItems":1,"type":"array","items":{"type":"string"},"description":"Array of file paths to read. Each path must be a string pointing to a valid file within allowed directories."}},"required":["paths"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"filesystem_write_file","description":"Create a new file or completely overwrite an existing file with new content. Use with caution as it will overwrite existing files without warning. Handles text content with proper encoding. Only works within allowed directories.","parameters":{"type":"object","properties":{"path":{"type":"string"},"content":{"type":"string"}},"required":["path","content"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"filesystem_edit_file","description":"Make line-based edits to a text file. Each edit replaces exact line sequences with new content. Returns a git-style diff showing the changes made. Only works within allowed directories.","parameters":{"type":"object","properties":{"path":{"type":"string"},"edits":{"type":"array","items":{"type":"object","properties":{"oldText":{"type":"string","description":"Text to search for - must match exactly"},"newText":{"type":"string","description":"Text to replace with"}},"required":["oldText","newText"]}},"dryRun":{"default":false,"description":"Preview changes using git-style diff format","type":"boolean"}},"required":["path","edits"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"filesystem_create_directory","description":"Create a new directory or ensure a directory exists. Can create multiple nested directories in one operation. If the directory already exists, this operation will succeed silently. Perfect for setting up directory structures for projects or ensuring required paths exist. Only works within allowed directories.","parameters":{"type":"object","properties":{"path":{"type":"string"}},"required":["path"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"filesystem_list_directory","description":"Get a detailed listing of all files and directories in a specified path. Results clearly distinguish between files and directories with [FILE] and [DIR] prefixes. This tool is essential for understanding directory structure and finding specific files within a directory. Only works within allowed directories.","parameters":{"type":"object","properties":{"path":{"type":"string"}},"required":["path"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"filesystem_list_directory_with_sizes","description":"Get a detailed listing of all files and directories in a specified path, including sizes. Results clearly distinguish between files and directories with [FILE] and [DIR] prefixes. This tool is useful for understanding directory structure and finding specific files within a directory. Only works within allowed directories.","parameters":{"type":"object","properties":{"path":{"type":"string"},"sortBy":{"default":"name","description":"Sort entries by name or size","type":"string","enum":["name","size"]}},"required":["path"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"filesystem_directory_tree","description":"Get a recursive tree view of files and directories as a JSON structure. Each entry includes 'name', 'type' (file/directory), and 'children' for directories. Files have no children array, while directories always have a children array (which may be empty). The output is formatted with 2-space indentation for readability. Only works within allowed directories.","parameters":{"type":"object","properties":{"path":{"type":"string"},"excludePatterns":{"default":[],"type":"array","items":{"type":"string"}}},"required":["path"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"filesystem_move_file","description":"Move or rename files and directories. Can move files between directories and rename them in a single operation. If the destination exists, the operation will fail. Works across different directories and can be used for simple renaming within the same directory. Both source and destination must be within allowed directories.","parameters":{"type":"object","properties":{"source":{"type":"string"},"destination":{"type":"string"}},"required":["source","destination"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"filesystem_search_files","description":"Recursively search for files and directories matching a pattern. The patterns should be glob-style patterns that match paths relative to the working directory. Use pattern like '*.ext' to match files in current directory, and '**/*.ext' to match files in all subdirectories. Returns full paths to all matching items. Great for finding files when you don't know their exact location. Only searches within allowed directories.","parameters":{"type":"object","properties":{"path":{"type":"string"},"pattern":{"type":"string"},"excludePatterns":{"default":[],"type":"array","items":{"type":"string"}}},"required":["path","pattern"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"filesystem_get_file_info","description":"Retrieve detailed metadata about a file or directory. Returns comprehensive information including size, creation time, last modified time, permissions, and type. This tool is perfect for understanding file characteristics without reading the actual content. Only works within allowed directories.","parameters":{"type":"object","properties":{"path":{"type":"string"}},"required":["path"],"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"filesystem_list_allowed_directories","description":"Returns the list of directories that this server is allowed to access. Subdirectories within these allowed directories are also accessible. Use this to understand which directories and their nested paths are available before trying to access files.","parameters":{"type":"object","properties":{},"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"chrome-devtools_click","description":"Clicks on the provided element","parameters":{"type":"object","properties":{"uid":{"type":"string","description":"The uid of an element on the page from the page content snapshot"},"dblClick":{"type":"boolean","description":"Set to true for double clicks. Default is false."},"includeSnapshot":{"type":"boolean","description":"Whether to include a snapshot in the response. Default is false."}},"required":["uid"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_close_page","description":"Closes the page by its index. The last open page cannot be closed.","parameters":{"type":"object","properties":{"pageId":{"type":"number","description":"The ID of the page to close. Call list_pages to list pages."}},"required":["pageId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_drag","description":"Drag an element onto another element","parameters":{"type":"object","properties":{"from_uid":{"type":"string","description":"The uid of the element to drag"},"to_uid":{"type":"string","description":"The uid of the element to drop into"},"includeSnapshot":{"type":"boolean","description":"Whether to include a snapshot in the response. Default is false."}},"required":["from_uid","to_uid"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_emulate","description":"Emulates various features on the selected page.","parameters":{"type":"object","properties":{"networkConditions":{"type":"string","enum":["Offline","Slow 3G","Fast 3G","Slow 4G","Fast 4G"],"description":"Throttle network. Omit to disable throttling."},"cpuThrottlingRate":{"type":"number","minimum":1,"maximum":20,"description":"Represents the CPU slowdown factor. Omit or set the rate to 1 to disable throttling"},"geolocation":{"type":"string","description":"Geolocation (`<latitude>x<longitude>`) to emulate. Latitude between -90 and 90. Longitude between -180 and 180. Omit to clear the geolocation override."},"userAgent":{"type":"string","description":"User agent to emulate. Set to empty string to clear the user agent override."},"colorScheme":{"type":"string","enum":["dark","light","auto"],"description":"Emulate the dark or the light mode. Set to \"auto\" to reset to the default."},"viewport":{"type":"string","description":"Emulate device viewports '<width>x<height>x<devicePixelRatio>[,mobile][,touch][,landscape]'. 'touch' and 'mobile' to emulate mobile devices. 'landscape' to emulate landscape mode."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_evaluate_script","description":"Evaluate a JavaScript function inside the currently selected page. Returns the response as JSON,\nso returned values have to be JSON-serializable.","parameters":{"type":"object","properties":{"function":{"type":"string","description":"A JavaScript function declaration to be executed by the tool in the currently selected page.\nExample without arguments: `() => {\n return document.title\n}` or `async () => {\n return await fetch(\"example.com\")\n}`.\nExample with arguments: `(el) => {\n return el.innerText;\n}`\n"},"args":{"type":"array","items":{"type":"string","description":"The uid of an element on the page from the page content snapshot"},"description":"An optional list of arguments to pass to the function."},"dialogAction":{"type":"string","description":"Handle dialogs while execution. \"accept\", \"dismiss\", or string for response of window.prompt. Defaults to accept."}},"required":["function"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_fill","description":"Type text into an input, text area or select an option from a <select> element.","parameters":{"type":"object","properties":{"uid":{"type":"string","description":"The uid of an element on the page from the page content snapshot"},"value":{"type":"string","description":"The value to fill in"},"includeSnapshot":{"type":"boolean","description":"Whether to include a snapshot in the response. Default is false."}},"required":["uid","value"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_fill_form","description":"Fill out multiple form elements at once","parameters":{"type":"object","properties":{"elements":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string","description":"The uid of the element to fill out"},"value":{"type":"string","description":"Value for the element"}},"required":["uid","value"],"additionalProperties":false},"description":"Elements from snapshot to fill out."},"includeSnapshot":{"type":"boolean","description":"Whether to include a snapshot in the response. Default is false."}},"required":["elements"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_get_console_message","description":"Gets a console message by its ID. You can get all messages by calling list_console_messages.","parameters":{"type":"object","properties":{"msgid":{"type":"number","description":"The msgid of a console message on the page from the listed console messages"}},"required":["msgid"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_get_network_request","description":"Gets a network request by an optional reqid, if omitted returns the currently selected request in the DevTools Network panel.","parameters":{"type":"object","properties":{"reqid":{"type":"number","description":"The reqid of the network request. If omitted returns the currently selected request in the DevTools Network panel."},"requestFilePath":{"type":"string","description":"The absolute or relative path to a .network-request file to save the request body to. If omitted, the body is returned inline."},"responseFilePath":{"type":"string","description":"The absolute or relative path to a .network-response file to save the response body to. If omitted, the body is returned inline."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_handle_dialog","description":"If a browser dialog was opened, use this command to handle it","parameters":{"type":"object","properties":{"action":{"type":"string","enum":["accept","dismiss"],"description":"Whether to dismiss or accept the dialog"},"promptText":{"type":"string","description":"Optional prompt text to enter into the dialog."}},"required":["action"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_hover","description":"Hover over the provided element","parameters":{"type":"object","properties":{"uid":{"type":"string","description":"The uid of an element on the page from the page content snapshot"},"includeSnapshot":{"type":"boolean","description":"Whether to include a snapshot in the response. Default is false."}},"required":["uid"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_lighthouse_audit","description":"Get Lighthouse score and reports for accessibility, SEO and best practices. This excludes performance. For performance audits, run performance_start_trace","parameters":{"type":"object","properties":{"mode":{"type":"string","enum":["navigation","snapshot"],"default":"navigation","description":"\"navigation\" reloads & audits. \"snapshot\" analyzes current state."},"device":{"type":"string","enum":["desktop","mobile"],"default":"desktop","description":"Device to emulate."},"outputDirPath":{"type":"string","description":"Directory for reports. If omitted, uses temporary files."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_list_console_messages","description":"List all console messages for the currently selected page since the last navigation.","parameters":{"type":"object","properties":{"pageSize":{"type":"integer","exclusiveMinimum":0,"description":"Maximum number of messages to return. When omitted, returns all messages."},"pageIdx":{"type":"integer","minimum":0,"description":"Page number to return (0-based). When omitted, returns the first page."},"types":{"type":"array","items":{"type":"string","enum":["log","debug","info","error","warn","dir","dirxml","table","trace","clear","startGroup","startGroupCollapsed","endGroup","assert","profile","profileEnd","count","timeEnd","verbose","issue"]},"description":"Filter messages to only return messages of the specified resource types. When omitted or empty, returns all messages."},"includePreservedMessages":{"type":"boolean","default":false,"description":"Set to true to return the preserved messages over the last 3 navigations."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_list_network_requests","description":"List all requests for the currently selected page since the last navigation.","parameters":{"type":"object","properties":{"pageSize":{"type":"integer","exclusiveMinimum":0,"description":"Maximum number of requests to return. When omitted, returns all requests."},"pageIdx":{"type":"integer","minimum":0,"description":"Page number to return (0-based). When omitted, returns the first page."},"resourceTypes":{"type":"array","items":{"type":"string","enum":["document","stylesheet","image","media","font","script","texttrack","xhr","fetch","prefetch","eventsource","websocket","manifest","signedexchange","ping","cspviolationreport","preflight","fedcm","other"]},"description":"Filter requests to only return requests of the specified resource types. When omitted or empty, returns all requests."},"includePreservedRequests":{"type":"boolean","default":false,"description":"Set to true to return the preserved requests over the last 3 navigations."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_list_pages","description":"Get a list of pages open in the browser.","parameters":{"type":"object","properties":{},"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false}}},{"type":"function","function":{"name":"chrome-devtools_navigate_page","description":"Go to a URL, or back, forward, or reload. Use project URL if not specified otherwise.","parameters":{"type":"object","properties":{"type":{"type":"string","enum":["url","back","forward","reload"],"description":"Navigate the page by URL, back or forward in history, or reload."},"url":{"type":"string","description":"Target URL (only type=url)"},"ignoreCache":{"type":"boolean","description":"Whether to ignore cache on reload."},"handleBeforeUnload":{"type":"string","enum":["accept","decline"],"description":"Whether to auto accept or beforeunload dialogs triggered by this navigation. Default is accept."},"initScript":{"type":"string","description":"A JavaScript script to be executed on each new document before any other scripts for the next navigation."},"timeout":{"type":"integer","description":"Maximum wait time in milliseconds. If set to 0, the default timeout will be used."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_new_page","description":"Open a new tab and load a URL. Use project URL if not specified otherwise.","parameters":{"type":"object","properties":{"url":{"type":"string","description":"URL to load in a new page."},"background":{"type":"boolean","description":"Whether to open the page in the background without bringing it to the front. Default is false (foreground)."},"isolatedContext":{"type":"string","description":"If specified, the page is created in an isolated browser context with the given name. Pages in the same browser context share cookies and storage. Pages in different browser contexts are fully isolated."},"timeout":{"type":"integer","description":"Maximum wait time in milliseconds. If set to 0, the default timeout will be used."}},"required":["url"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_performance_analyze_insight","description":"Provides more detailed information on a specific Performance Insight of an insight set that was highlighted in the results of a trace recording.","parameters":{"type":"object","properties":{"insightSetId":{"type":"string","description":"The id for the specific insight set. Only use the ids given in the \"Available insight sets\" list."},"insightName":{"type":"string","description":"The name of the Insight you want more information on. For example: \"DocumentLatency\" or \"LCPBreakdown\""}},"required":["insightSetId","insightName"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_performance_start_trace","description":"Start a performance trace on the selected webpage. Use to find frontend performance issues, Core Web Vitals (LCP, INP, CLS), and improve page load speed.","parameters":{"type":"object","properties":{"reload":{"type":"boolean","default":true,"description":"Determines if, once tracing has started, the current selected page should be automatically reloaded. Navigate the page to the right URL using the navigate_page tool BEFORE starting the trace if reload or autoStop is set to true."},"autoStop":{"type":"boolean","default":true,"description":"Determines if the trace recording should be automatically stopped."},"filePath":{"type":"string","description":"The absolute file path, or a file path relative to the current working directory, to save the raw trace data. For example, trace.json.gz (compressed) or trace.json (uncompressed)."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_performance_stop_trace","description":"Stop the active performance trace recording on the selected webpage.","parameters":{"type":"object","properties":{"filePath":{"type":"string","description":"The absolute file path, or a file path relative to the current working directory, to save the raw trace data. For example, trace.json.gz (compressed) or trace.json (uncompressed)."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_press_key","description":"Press a key or key combination. Use this when other input methods like fill() cannot be used (e.g., keyboard shortcuts, navigation keys, or special key combinations).","parameters":{"type":"object","properties":{"key":{"type":"string","description":"A key or a combination (e.g., \"Enter\", \"Control+A\", \"Control++\", \"Control+Shift+R\"). Modifiers: Control, Shift, Alt, Meta"},"includeSnapshot":{"type":"boolean","description":"Whether to include a snapshot in the response. Default is false."}},"required":["key"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_resize_page","description":"Resizes the selected page's window so that the page has specified dimension","parameters":{"type":"object","properties":{"width":{"type":"number","description":"Page width"},"height":{"type":"number","description":"Page height"}},"required":["width","height"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_select_page","description":"Select a page as a context for future tool calls.","parameters":{"type":"object","properties":{"pageId":{"type":"number","description":"The ID of the page to select. Call list_pages to get available pages."},"bringToFront":{"type":"boolean","description":"Whether to focus the page and bring it to the top."}},"required":["pageId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_take_memory_snapshot","description":"Capture a heap snapshot of the currently selected page. Use to analyze the memory distribution of JavaScript objects and debug memory leaks.","parameters":{"type":"object","properties":{"filePath":{"type":"string","description":"A path to a .heapsnapshot file to save the heapsnapshot to."}},"required":["filePath"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_take_screenshot","description":"Take a screenshot of the page or element.","parameters":{"type":"object","properties":{"format":{"type":"string","enum":["png","jpeg","webp"],"default":"png","description":"Type of format to save the screenshot as. Default is \"png\""},"quality":{"type":"number","minimum":0,"maximum":100,"description":"Compression quality for JPEG and WebP formats (0-100). Higher values mean better quality but larger file sizes. Ignored for PNG format."},"uid":{"type":"string","description":"The uid of an element on the page from the page content snapshot. If omitted, takes a page screenshot."},"fullPage":{"type":"boolean","description":"If set to true takes a screenshot of the full page instead of the currently visible viewport. Incompatible with uid."},"filePath":{"type":"string","description":"The absolute path, or a path relative to the current working directory, to save the screenshot to instead of attaching it to the response."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_take_snapshot","description":"Take a text snapshot of the currently selected page based on the a11y tree. The snapshot lists page elements along with a unique\nidentifier (uid). Always use the latest snapshot. Prefer taking a snapshot over taking a screenshot. The snapshot indicates the element selected\nin the DevTools Elements panel (if any).","parameters":{"type":"object","properties":{"verbose":{"type":"boolean","description":"Whether to include all possible information available in the full a11y tree. Default is false."},"filePath":{"type":"string","description":"The absolute path, or a path relative to the current working directory, to save the snapshot to instead of attaching it to the response."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_type_text","description":"Type text using keyboard into a previously focused input","parameters":{"type":"object","properties":{"text":{"type":"string","description":"The text to type"},"submitKey":{"type":"string","description":"Optional key to press after typing. E.g., \"Enter\", \"Tab\", \"Escape\""}},"required":["text"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_upload_file","description":"Upload a file through a provided element.","parameters":{"type":"object","properties":{"uid":{"type":"string","description":"The uid of the file input element or an element that will open file chooser on the page from the page content snapshot"},"filePath":{"type":"string","description":"The local path of the file to upload"},"includeSnapshot":{"type":"boolean","description":"Whether to include a snapshot in the response. Default is false."}},"required":["uid","filePath"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}},{"type":"function","function":{"name":"chrome-devtools_wait_for","description":"Wait for the specified text to appear on the selected page.","parameters":{"type":"object","properties":{"text":{"type":"array","items":{"type":"string"},"minItems":1,"description":"Non-empty list of texts. Resolves when any value appears on the page."},"timeout":{"type":"integer","description":"Maximum wait time in milliseconds. If set to 0, the default timeout will be used."}},"required":["text"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}],"tool_choice":"auto","stream":true,"stream_options":{"include_usage":true}},"statusCode":429,"responseHeaders":{"access-control-allow-origin":"*","access-control-expose-headers":"X-Generation-Id,cf-ray","cf-ray":"9f60a7e4ad670205-CDG","connection":"keep-alive","content-type":"application/json","date":"Sun, 03 May 2026 16:31:25 GMT","permissions-policy":"payment=(self \"https://checkout.stripe.com\" \"https://connect-js.stripe.com\" \"https://js.stripe.com\" \"https://*.js.stripe.com\" \"https://hooks.stripe.com\")","referrer-policy":"no-referrer, strict-origin-when-cross-origin","server":"cloudflare","transfer-encoding":"chunked","x-content-type-options":"nosniff"},"responseBody":"{\"error\":{\"message\":\"Provider returned error\",\"code\":429,\"metadata\":{\"raw\":\"qwen/qwen3-coder:free is temporarily rate-limited upstream. Please retry shortly, or add your own key to accumulate your rate limits: https://openrouter.ai/settings/integrations\",\"provider_name\":\"Venice\",\"is_byok\":false}},\"user_id\":\"user_31uCqqQClAKR30A5aL6qmZRpH06\"}","isRetryable":true,"data":{"error":{"message":"Provider returned error","code":429}}}} stream error
Shisa V2 Llama 3.3 70B Shisa AI OpenRouter-Free-MAJ/shisa-ai/shisa-v2-llama3.3-70b not found 00:00:04 ses_2113f0565ffe1ur0RLO3o5APfq {"type": "error", "timestamp": 1777827118241, "sessionID": "ses_2113f0565ffe1ur0RLO3o5APfq", "error": {"name": "UnknownError", "data": {"message": "Model not found: OpenRouter-Free-MAJ/shisa-ai/shisa-v2-llama3.3-70b."}}}
Giga Potato KiloCode kilocode/giga-potato not found 00:00:04 ses_2113ee0b1ffe9pRUk45Bmn0OJo {"type": "error", "timestamp": 1777827127623, "sessionID": "ses_2113ee0b1ffe9pRUk45Bmn0OJo", "error": {"name": "UnknownError", "data": {"message": "Model not found: kilocode/giga-potato."}}}

Prompt de reprise

Wrapper

Suis strictement le fichier joint.
Reponds en francais.
Tu travailles dans le dossier courant et tu dois generer toi-meme les fichiers reels.

Contraintes non negociables :
- Cree directement `index.html`, `styles.css` et `app.js` dans le dossier courant.
- Ne mets pas leur contenu dans ta reponse finale.
- N'ajoute pas d'autres fichiers si tu peux l'eviter.
- Quand les 3 fichiers existent, termine par un court message de confirmation en une ou deux lignes maximum.

Benchmark source

# Full Prompt: Generate a production-level "Dinosaurs" web page (design + verifiable calculations + docs)

## 🎯 Role & Objective

You are a senior **agentic AI** (full-stack + data + UX) tasked with delivering a **static self-contained web page** about **dinosaurs**, demonstrating:

1. **Premium design** (elegant, modern, accessible).
2. **Non-trivial scientific calculations, traceable and verifiable** (with sources and tests).
3. **Clear documentation** (technical, functional, and scientific).

The result must be **directly usable** (opening `index.html` works without backend). No external build is required, but if you suggest a mini-build (e.g. Vite/Parcel), also provide a "dist" version ready to use.

---

## ⚠️ Strict Constraints (3-file format)

* **Only** `index.html`, `styles.css`, `app.js`.
* **No external dependencies** (no CDN/NPM, no network calls). System fonts only.
* **Offline-first**: opens locally.
* **Data (CSV)**, **constants (JSON)** and **docs (Markdown)** must be **embedded inside `app.js`** as template strings. A minimal Markdown parser converts content to HTML.
* Images/illustrations must be **inline SVGs** (in `index.html`) or dynamically generated SVGs via JS.

---

## 🧱 Expected Deliverables

* Exactly **3 files** (simplified MVC):

  1. `index.html` — **View**: semantic structure, UI components, panels (Explorer, Methods & Calculations, Docs, Tests), Export buttons.
  2. `styles.css` — **Style**: premium design (light/dark), grid, tokens, components (Cards, Chips, Tabs, Modal, Tooltip), accessibility (focus + contrast).
  3. `app.js` — **Controller + Model**:

     * **Model**: dinosaur dataset (CSV **embedded as template string**), scientific constants (JSON **embedded**), minimal CSV parser, schema validation.
     * **Calculations**: `massFromFemur`, `bmr`, `speedFromFroude`, `toTimelinePosition`, `explain()`.
     * **Controller**: global state, filters, sorting, search, lightweight hash routing, test execution, JSON/CSV/MD export.
     * **Integrated tests**: assertions, visual reporting, tolerances, "Run Tests" button.

* **No other resources**: no `data/`, `docs/`, or `tests/` folders. All documentation is **embedded as Markdown strings in `app.js`** and rendered in `index.html`.

---

## 🧭 Page Content & Structure

1. **Hero section** (title, baseline, CTA to calculations). Subtle visual background (gradient, SVG noise, mesh, or low-poly WebGL).
2. **Dinosaur Explorer**: browsable/filterable gallery (geological period, diet, clade, estimated mass, length). Real-time search.
3. **Timeline** of eras (Triassic/Jurassic/Cretaceous) with species positions (± uncertainty). Smooth animation, keyboard controls.
4. **Species Sheets** (modal or anchor page): name, clade, period, measured data (length, femur circumference if available), **derived calculations** (estimated body mass, theoretical BMR, plausible speed, growth), sources.
5. **"Methods & Calculations" Section**: formulas, assumptions, limits. Highlighted "Key Insight" boxes.
6. **Charts**: distributions (histograms, KDE approximation), allometric relations (log-log), ternary plots if relevant. Interactive (hover, zoom, tooltips, export PNG/SVG).
7. **Species Comparator** (multi-selection).
8. **FAQ** and **Glossary**.
9. **Footers**: credits, license, links to technical docs, "View/Run Tests" button.

---

## 🎨 Design & UX Requirements

* **Premium editorial style**: 12-column grid, 16–24px border radius, soft shadows, generous spacing, clear typography hierarchy. **Light/dark mode**.
* **Design system** in `DESIGN_SYSTEM.md`: colors (HSL), typography, scales, radii, shadows, components (Card, Tag, Chip, Badge, Tooltip, Modal, Tabs, Toast).
* **Accessibility**: WCAG 2.2 AA compliant, contrast tested, visible focus, ARIA roles, keyboard navigation, `prefers-reduced-motion` respected.
* Subtle micro-interactions at 60fps.

---

## 📊 Required Data Format

* **Embedded CSV**: `<script type="text/csv" id="dinosaurs_csv">` with ≥30 species.
* **Embedded JSON constants**: `<script type="application/json" id="constants_json">` with references (title, author, year, DOI/URL).
* Missing values allowed but **uncertainty must be displayed** visually.
* Provide **UI controls** to adjust constants live (sliders/inputs).

---

## 🧮 Required Calculations (Verifiable)

Provide **pure JS** implementations + **unit tests**.

1. **Body mass from femur circumference** (allometry, log-log):

   * General form: `log10(M_kg) = a + b * log10(C_mm)` ⇒ `M_kg = 10^(a + b*log10(C_mm))`
   * Read `a`, `b` from constants.
   * Must include **reference** + sample check panel.

2. **Basal Metabolic Rate (BMR)**:

   * Compare **endotherm vs ectotherm models** via slider.

3. **Plausible speed** (Froude number):

   * `Fr = v^2 / (g*l)` ⇒ `v = sqrt(Fr * g * l)`
   * Leg length estimation: `0.4 * body length`.

4. **Timeline conversion**:

   * Convert `age_mya_start/end` into interactive timeline position.

5. **Uncertainty propagation** *(optional but great)*.

Each model must:

* Provide `explain(modelName, inputs)` ⇒ returns steps + sources.
* Include **unit tests**.

---

## 🔎 Verifiability & Transparency

* Button **"Verify Calculations"** runs a test suite with clear output.
* Button **"Export Proofs"** outputs a JSON with constants + inputs + result.
* Each calculation must show a **step-by-step detail view**.

---

## 🧰 Stack & Tech Constraints

* **No heavy dependencies**. For charts, use SVG or embed a tiny local library.
* No frameworks required (optional Preact/HTM/Web Components OK).
* Optional TypeScript locally compiled into JS (include compiled version).
* **No network requests** at runtime.

---

## 🧪 Quality & Testing (Integrated)

* Inline tests for `massFromFemur`, `bmr`, `speedFromFroude`, `toTimelinePosition`.
* CSV schema validation.
* Mini test runner UI with JSON export.
* Reasonable size limit.

---

## ♿ Accessibility & i18n

* ARIA roles, labels, tab order.
* Automatic checks (e.g. required button labels).
* Content **in French**, but i18n-ready.

---

## 📈 Performance & SEO

* Lighthouse ≥95 target.
* Lazy loading, optimized SVG, local fonts with `font-display: swap`.
* Meta tags + Open Graph + JSON-LD.

---

## 🧾 Embedded Documentation (in `app.js`)

* Markdown strings: `README`, `ARCHITECTURE`, `MATH`, `DESIGN_SYSTEM`, `ACCESSIBILITY`.
* Download as `.md`.

---

## 🔐 Licenses & Credits

Prefer CC-BY, CC0, MIT.

---

## ✅ Checklist

* Offline functional
* Premium responsive design (dark/light)
* Dataset ≥30 species
* Documented calculations
* Tests integrated
* Accessibility + SEO
* Full documentation

---

## 📝 Inline Templates/Examples

(CSV + JSON examples preserved here as in original prompt)

---

## 🚀 Required UI Interactions

* Multi-filter chips
* Sorting
* Export CSV
* Toggle light/dark mode
* Test runner

---

## 🔄 Bonus (optional)

* Hypothesis comparison (endo vs ecto)
* Uncertainty visual bands
* PWA
* SVG sprite generation

---

## 📣 Final Instructions

* Zero network usage.
* Show calculation traceability.
* Deliver full folder ready to open.

**Expected Output**:

1. Directory structure summary
2. Full content of `index.html`, `styles.css`, `app.js`
3. Inline data/docs/test content
4. Simple instructions to run

Le prompt benchmark original est conserve dans prompt.txt. Les journaux bruts de cette execution vivent dans _runs/260503/.