()
| 21 | import { z } from 'zod' |
| 22 | |
| 23 | function githubHeaders(): Record<string, string> { |
| 24 | const headers: Record<string, string> = { |
| 25 | Accept: 'application/vnd.github+json', |
| 26 | 'User-Agent': 'tanstack-ai-sandbox-triage', |
| 27 | } |
| 28 | if (process.env.GITHUB_TOKEN) { |
| 29 | headers.Authorization = `Bearer ${process.env.GITHUB_TOKEN}` |
| 30 | } |
| 31 | return headers |
| 32 | } |
| 33 | |
| 34 | /** |
| 35 | * Build the bridged tools + code-mode setup + system mandate for one triage run. |