{
  "body": {
    "model": "anthropic/claude-opus-4-5",
    "max_tokens": 32000,
    "temperature": 0,
    "messages": [
      {
        "role": "system",
        "content": "[[SYSTEM_MESSAGE]]"
      },
      {
        "role": "user",
        "content": "Generate an AI_RULES.md file for this app. Describe the tech stack in 5-10 bullet points and describe clear rules about what libraries to use for what."
      },
      {
        "role": "assistant",
        "content": "\n  <dyad-write path=\"file1.txt\">\n  A file (2)\n  </dyad-write>\n  More\n  EOM"
      },
      {
        "role": "user",
        "content": "tc=local-agent/ask-read-file"
      },
      {
        "role": "assistant",
        "content": "Let me read the file to explain its contents.",
        "tool_calls": [
          {
            "id": "[[TOOL_CALL_0]]",
            "type": "function",
            "function": {
              "name": "read_file",
              "arguments": "{\"path\":\"src/App.tsx\"}"
            }
          }
        ]
      },
      {
        "role": "tool",
        "tool_call_id": "[[TOOL_CALL_0]]",
        "content": "{\"type\":\"text\",\"value\":\"const App = () => <div>Minimal imported app</div>;\\n\\nexport default App;\\n\"}"
      },
      {
        "role": "assistant",
        "content": "This is a simple React component that renders a div with the text 'Minimal imported app'. The component is exported as the default export."
      },
      {
        "role": "user",
        "content": "[dump]"
      }
    ],
    "tools": [
      {
        "type": "function",
        "function": {
          "name": "read_file",
          "description": "Read the content of a file from the codebase.\n  \n- You have the capability to call multiple tools in a single response. It is always better to speculatively read multiple files as a batch that are potentially useful.",
          "parameters": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "type": "object",
            "properties": {
              "path": {
                "type": "string",
                "description": "The file path to read"
              },
              "start_line_one_indexed": {
                "description": "The one-indexed line number to start reading from (inclusive).",
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "end_line_one_indexed_inclusive": {
                "description": "The one-indexed line number to end reading at (inclusive).",
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "path"
            ],
            "additionalProperties": false
          }
        }
      },
      {
        "type": "function",
        "function": {
          "name": "list_files",
          "description": "List files in the application directory. By default, lists only the immediate directory contents. Use recursive=true to list all files recursively. If you are not sure, list all files by omitting the directory parameter.",
          "parameters": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "type": "object",
            "properties": {
              "directory": {
                "description": "Optional subdirectory to list",
                "type": "string"
              },
              "recursive": {
                "description": "Whether to list files recursively (default: false)",
                "type": "boolean"
              },
              "include_hidden": {
                "description": "Whether to include .dyad files which are git-ignored (default: false)",
                "type": "boolean"
              }
            },
            "additionalProperties": false
          }
        }
      },
      {
        "type": "function",
        "function": {
          "name": "grep",
          "description": "Search for a regex pattern in the codebase using ripgrep.\n\n- Returns matching lines with file paths and line numbers\n- By default, the search is case-insensitive\n- Use include_pattern to filter by file type (e.g. '*.tsx')\n- Use exclude_pattern to skip certain files (e.g. '*.test.ts')\n- Results are limited to 100 matches by default (max 250). If results are truncated, narrow your search with include_pattern or a more specific query.",
          "parameters": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "type": "object",
            "properties": {
              "query": {
                "type": "string",
                "description": "The regex pattern to search for"
              },
              "include_pattern": {
                "description": "Glob pattern for files to include (e.g. '*.ts' for TypeScript files)",
                "type": "string"
              },
              "exclude_pattern": {
                "description": "Glob pattern for files to exclude",
                "type": "string"
              },
              "case_sensitive": {
                "description": "Whether the search should be case sensitive (default: false)",
                "type": "boolean"
              },
              "limit": {
                "description": "Maximum number of matches to return (default: 100, max: 250). Use include_pattern to narrow results if limit is reached.",
                "type": "number",
                "minimum": 1,
                "maximum": 250
              }
            },
            "required": [
              "query"
            ],
            "additionalProperties": false
          }
        }
      },
      {
        "type": "function",
        "function": {
          "name": "code_search",
          "description": "Search the codebase semantically to find files relevant to a query. Use this tool when you need to discover which files contain code related to a specific concept, feature, or functionality. Returns a list of file paths that are most relevant to the search query.\n\n### When to Use This Tool\n\n- Explore unfamiliar codebases\n- Ask \"how / where / what\" questions to understand behavior\n- Find code by meaning rather than exact text\n\n### When NOT to Use\n\nSkip this tool for:\n1. Exact text matches (use `grep`)\n2. Reading known files (use `read_file`)\n3. Simple symbol lookups (use `grep`)\n",
          "parameters": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "type": "object",
            "properties": {
              "query": {
                "type": "string",
                "description": "Search query to find relevant files"
              }
            },
            "required": [
              "query"
            ],
            "additionalProperties": false
          }
        }
      },
      {
        "type": "function",
        "function": {
          "name": "set_chat_summary",
          "description": "Set the title/summary for this chat message. You should always call this message at the end of the turn when you have finished calling all the other tools.",
          "parameters": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "type": "object",
            "properties": {
              "summary": {
                "type": "string",
                "description": "A short summary/title for the chat"
              }
            },
            "required": [
              "summary"
            ],
            "additionalProperties": false
          }
        }
      },
      {
        "type": "function",
        "function": {
          "name": "read_logs",
          "description": "Read logs at the moment this tool is called. Includes client logs, server logs, edge function logs, and network requests. Use this to debug errors, investigate issues, or understand app behavior. IMPORTANT: Logs are a snapshot from when you call this tool - they will NOT update while you are writing code or making changes. Use filters (searchTerm, type, level) to narrow down relevant logs on the first call.",
          "parameters": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "type": "object",
            "properties": {
              "type": {
                "description": "Filter by log source type (default: all). Types: 'client' = browser console logs; 'server' = backend (including development server) logs and build output; 'edge-function' = edge function logs; 'network-requests' = HTTP requests and responses (outgoing calls and their responses).",
                "type": "string",
                "enum": [
                  "all",
                  "client",
                  "server",
                  "edge-function",
                  "network-requests"
                ]
              },
              "level": {
                "description": "Filter by log level (default: all)",
                "type": "string",
                "enum": [
                  "all",
                  "info",
                  "warn",
                  "error"
                ]
              },
              "searchTerm": {
                "description": "Search for logs containing this text (case-insensitive)",
                "type": "string"
              },
              "limit": {
                "description": "Maximum number of logs to return (default: 50, max: 200)",
                "type": "number",
                "minimum": 1,
                "maximum": 200
              }
            },
            "additionalProperties": false
          }
        }
      },
      {
        "type": "function",
        "function": {
          "name": "web_search",
          "description": "\nUse this tool to access real-time information beyond your training data cutoff.\n\nWhen to Search:\n- Current API documentation, library versions, or breaking changes\n- Latest best practices, security advisories, or bug fixes\n- Specific error messages or troubleshooting solutions\n- Recent framework updates or deprecation notices\n\nQuery Tips:\n- Be specific: Include version numbers, exact error messages, or technical terms\n- Add context: \"React 19 useEffect cleanup\" not just \"React hooks\"\n\nExamples:\n\n<example>\nOpenAI GPT-5 API model names\n</example>\n\n<example>\nNextJS 14 app router middleware auth\n</example>\n",
          "parameters": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "type": "object",
            "properties": {
              "query": {
                "type": "string",
                "description": "The search query to look up on the web"
              }
            },
            "required": [
              "query"
            ],
            "additionalProperties": false
          }
        }
      },
      {
        "type": "function",
        "function": {
          "name": "web_crawl",
          "description": "\nYou can crawl a website so you can clone it.\n\n### When You MUST Trigger a Crawl\nTrigger a crawl ONLY if BOTH conditions are true:\n\n1. The user's message shows intent to CLONE / COPY / REPLICATE / RECREATE / DUPLICATE / MIMIC a website.\n   - Keywords include: clone, copy, replicate, recreate, duplicate, mimic, build the same, make the same.\n\n2. The user's message contains a URL or something that appears to be a domain name.\n   - e.g. \"example.com\", \"https://example.com\"\n   - Do not require 'http://' or 'https://'.\n",
          "parameters": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "type": "object",
            "properties": {
              "url": {
                "type": "string",
                "description": "URL to crawl"
              }
            },
            "required": [
              "url"
            ],
            "additionalProperties": false
          }
        }
      },
      {
        "type": "function",
        "function": {
          "name": "web_fetch",
          "description": "Fetch and read the content of a web page as markdown given its URL.\n\n### When to Use This Tool\nUse this tool when the user's message contains a URL (or domain name) and they want to:\n- **Read** the page's content (e.g. documentation, blog post, article)\n- **Reference** information from the page (e.g. API docs, tutorials, guides)\n- **Extract** data or context from a live web page to inform their code\n- **Follow a link** someone shared to understand its contents\n\nExamples:\n- \"Use the docs at docs.example.com/api to set up the client\"\n- \"What does this page say? https://example.com/blog/post\"\n- \"Follow the guide at example.com/tutorial\"\n\n### When NOT to Use This Tool\n- The user wants to **visually clone or replicate** a website → use `web_crawl` instead\n- The user needs to **search the web** for information without a specific URL → use `web_search` instead\n",
          "parameters": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "type": "object",
            "properties": {
              "url": {
                "type": "string",
                "description": "URL to fetch content from"
              }
            },
            "required": [
              "url"
            ],
            "additionalProperties": false
          }
        }
      },
      {
        "type": "function",
        "function": {
          "name": "run_type_checks",
          "description": "Run TypeScript type checks on the current workspace. You can provide paths to specific files or directories, or omit the argument to get diagnostics for all files.\n\n- If a file path is provided, returns diagnostics for that file only\n- If a directory path is provided, returns diagnostics for all files within that directory\n- If no path is provided, returns diagnostics for all files in the workspace\n- This tool can return type errors that were already present before your edits, so avoid calling it with a very wide scope of files\n- NEVER call this tool on a file unless you've edited it or are about to edit it",
          "parameters": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "type": "object",
            "properties": {
              "paths": {
                "description": "Optional. An array of paths to files or directories to read type errors for. If provided, returns diagnostics for the specified files/directories only. If not provided, returns diagnostics for all files in the workspace.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "additionalProperties": false
          }
        }
      }
    ],
    "tool_choice": "auto",
    "stream": true
  },
  "headers": {
    "authorization": "Bearer testdyadkey"
  }
}