{
  "body": {
    "model": "dyad/auto",
    "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": "[dump]"
      }
    ],
    "tools": [
      {
        "type": "function",
        "function": {
          "name": "write_file",
          "description": "Create or completely overwrite a file in the codebase",
          "parameters": {
            "type": "object",
            "properties": {
              "path": {
                "type": "string",
                "description": "The file path relative to the app root"
              },
              "content": {
                "type": "string",
                "description": "The content to write to the file"
              },
              "description": {
                "type": "string",
                "description": "Brief description of the change"
              }
            },
            "required": [
              "path",
              "content"
            ],
            "additionalProperties": false,
            "$schema": "http://json-schema.org/draft-07/schema#"
          }
        }
      },
      {
        "type": "function",
        "function": {
          "name": "edit_file",
          "description": "\n## When to Use edit_file\n\nUse the `edit_file` tool ONLY when you are editing an existing file. The edit output will be read by a less intelligent model, which will quickly apply the edit. You should make it clear what the edit is, while also minimizing the unchanged code you write.\n\n**Use only ONE edit_file call per file.** If you need to make multiple changes to the same file, include all edits in sequence within a single call using `// ... existing code ...` comments between them.\n\n## When NOT to Use edit_file\n\nDo NOT use this tool when:\n- You are creating a brand-new file (use file creation tools instead).\n- You are rewriting most of an existing file (in those cases, output the complete file instead).\n\n## Basic Format\n\nWhen writing the edit, you should specify each edit in sequence, with the special comment // ... existing code ... to represent unchanged code in between edited lines.\n\nBasic example:\n```\nedit_file(path=\"file.js\", description=\"change code\", content=\"\"\"\n// ... existing code ...\nFIRST_EDIT\n// ... existing code ...\nSECOND_EDIT\n// ... existing code ...\nTHIRD_EDIT\n// ... existing code ...\n\"\"\")\n```\n\n## General Principles\n\nYou should bias towards repeating as few lines of the original file as possible to convey the change.\n\nNEVER show unmodified code in the edit, unless sufficient context of unchanged lines around the code you're editing is needed to resolve ambiguity.\n\nDO NOT omit spans of pre-existing code without using the // ... existing code ... comment to indicate its absence.\n\n## Example: Basic Edit\n```\nedit_file(path=\"LandingPage.tsx\", description=\"Update title.\", content=\"\"\"\n// ... existing code ...\n\nconst LandingPage = () => {\n  // ... existing code ...\n  return (\n    <div>hello</div>\n  );\n};\n\n// ... existing code ...\n\"\"\")\n```\n\n## Example: Deleting Code\n\n**When deleting code, you must provide surrounding context and leave an explicit comment indicating what was removed.**\n```\nedit_file(path=\"utils.ts\", description=\"Remove deprecated helper function\", content=\"\"\"\n// ... existing code ...\n\nexport function currentHelper() {\n  return \"active\";\n}\n\n// REMOVED: deprecatedHelper() function\n\nexport function anotherHelper() {\n  return \"working\";\n}\n\n// ... existing code ...\n\"\"\")\n```\n",
          "parameters": {
            "type": "object",
            "properties": {
              "path": {
                "type": "string",
                "description": "The file path relative to the app root"
              },
              "content": {
                "type": "string",
                "description": "The updated code snippet to apply"
              },
              "description": {
                "type": "string",
                "description": "Brief description of the edit"
              }
            },
            "required": [
              "path",
              "content"
            ],
            "additionalProperties": false,
            "$schema": "http://json-schema.org/draft-07/schema#"
          }
        }
      },
      {
        "type": "function",
        "function": {
          "name": "delete_file",
          "description": "Delete a file from the codebase",
          "parameters": {
            "type": "object",
            "properties": {
              "path": {
                "type": "string",
                "description": "The file path to delete"
              }
            },
            "required": [
              "path"
            ],
            "additionalProperties": false,
            "$schema": "http://json-schema.org/draft-07/schema#"
          }
        }
      },
      {
        "type": "function",
        "function": {
          "name": "rename_file",
          "description": "Rename or move a file in the codebase",
          "parameters": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string",
                "description": "The current file path"
              },
              "to": {
                "type": "string",
                "description": "The new file path"
              }
            },
            "required": [
              "from",
              "to"
            ],
            "additionalProperties": false,
            "$schema": "http://json-schema.org/draft-07/schema#"
          }
        }
      },
      {
        "type": "function",
        "function": {
          "name": "add_dependency",
          "description": "Install npm packages",
          "parameters": {
            "type": "object",
            "properties": {
              "packages": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Array of package names to install"
              }
            },
            "required": [
              "packages"
            ],
            "additionalProperties": false,
            "$schema": "http://json-schema.org/draft-07/schema#"
          }
        }
      },
      {
        "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": {
            "type": "object",
            "properties": {
              "path": {
                "type": "string",
                "description": "The file path to read"
              }
            },
            "required": [
              "path"
            ],
            "additionalProperties": false,
            "$schema": "http://json-schema.org/draft-07/schema#"
          }
        }
      },
      {
        "type": "function",
        "function": {
          "name": "list_files",
          "description": "List all files in the application directory recursively. If you are not sure, list all files by omitting the directory parameter.",
          "parameters": {
            "type": "object",
            "properties": {
              "directory": {
                "type": "string",
                "description": "Optional subdirectory to list"
              }
            },
            "additionalProperties": false,
            "$schema": "http://json-schema.org/draft-07/schema#"
          }
        }
      },
      {
        "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": {
            "type": "object",
            "properties": {
              "summary": {
                "type": "string",
                "description": "A short summary/title for the chat"
              }
            },
            "required": [
              "summary"
            ],
            "additionalProperties": false,
            "$schema": "http://json-schema.org/draft-07/schema#"
          }
        }
      },
      {
        "type": "function",
        "function": {
          "name": "add_integration",
          "description": "Add an integration provider to the app (e.g., Supabase for auth, database, or server-side functions). Once you have called this tool, stop and do not call any more tools because you need to wait for the user to set up the integration.",
          "parameters": {
            "type": "object",
            "properties": {
              "provider": {
                "type": "string",
                "enum": [
                  "supabase"
                ],
                "description": "The integration provider to add (e.g., 'supabase')"
              }
            },
            "required": [
              "provider"
            ],
            "additionalProperties": false,
            "$schema": "http://json-schema.org/draft-07/schema#"
          }
        }
      },
      {
        "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": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "all",
                  "client",
                  "server",
                  "edge-function",
                  "network-requests",
                  "build-time"
                ],
                "description": "Filter by log source type (default: all). Types: 'client' = browser console logs; 'server' = backend/SSR logs; 'edge-function' = edge function logs; 'network-requests' = HTTP requests and responses (outgoing calls and their responses); 'build-time' = build and bundler output."
              },
              "level": {
                "type": "string",
                "enum": [
                  "all",
                  "info",
                  "warn",
                  "error"
                ],
                "description": "Filter by log level (default: all)"
              },
              "searchTerm": {
                "type": "string",
                "description": "Search for logs containing this text (case-insensitive)"
              },
              "limit": {
                "type": "number",
                "minimum": 1,
                "maximum": 200,
                "description": "Maximum number of logs to return (default: 50, max: 200)"
              }
            },
            "additionalProperties": false,
            "$schema": "http://json-schema.org/draft-07/schema#"
          }
        }
      },
      {
        "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": {
            "type": "object",
            "properties": {
              "query": {
                "type": "string",
                "description": "The search query to look up on the web"
              }
            },
            "required": [
              "query"
            ],
            "additionalProperties": false,
            "$schema": "http://json-schema.org/draft-07/schema#"
          }
        }
      }
    ],
    "tool_choice": "auto",
    "stream": true,
    "thinking": {
      "type": "enabled",
      "include_thoughts": true,
      "budget_tokens": 4000
    }
  },
  "headers": {
    "authorization": "Bearer testdyadkey"
  }
}