[build]
ignore = "node ./scripts/netlify-ignore-build.mjs brain"
command = "export DATABASE_URL=${NETLIFY_DATABASE_URL:-$DATABASE_URL} && pnpm install && NITRO_PRESET=netlify pnpm --filter brain build && pnpm exec tsx templates/brain/jobs/emit-netlify-brain-queue-cron.ts"
publish = "templates/brain/dist"
functions = "templates/brain/.netlify/functions-internal"

[build.environment]
GA_MEASUREMENT_ID = "G-ESF7FYXGN9"
GTM_CONTAINER_ID = "GTM-N3WSTXZ"
NITRO_PRESET = "netlify"
NPM_CONFIG_PRODUCTION = "false"

# A2A delegation calls run a full agent loop (LLM + tool calls + DB queries).
# The framework does not impose a default agent-run timeout; if a template sets
# AGENT_RUN_SOFT_TIMEOUT_MS, keep it below this function timeout so the hidden
# auto-continuation path can hand off before Netlify kills the function.
[functions."*"]
timeout = 75

[functions.brain-queue-sweep-background]
timeout = 900
memory = "2gb"
