Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

repo-report-options.ts

62 lines1.8 KB

1/**
2 * Client-safe picker types for /repo-report.
3 * Do not import harness packages here.
4 */
5​
6export type ReportHarness = 'claude-code' | 'codex' | 'grok' | 'acp'
7export type ReportProvider = 'docker' | 'local'
8export type ReportAuthMode = 'host' | 'api-key'
9export type ReportAgent = 'explainer' | 'package-map' | 'first-hour'
10​
11export const REPORT_HARNESSES: Record<ReportHarness, { label: string }> = {
12 'claude-code': { label: 'Claude Code' },
13 grok: { label: 'Grok Build' },
14 acp: { label: 'ACP compatible (Grok)' },
15 codex: { label: 'Codex' },
17​
18export const REPORT_PROVIDERS: Record<ReportProvider, { label: string }> = {
19 docker: { label: 'Docker' },
20 local: { label: 'Local process' },
22​
23export const REPORT_AUTH_MODES: Record<ReportAuthMode, { label: string }> = {
24 'api-key': { label: 'API key' },
25 host: { label: 'Host login' },
27​
28export const REPORT_AGENTS: Record<
29 ReportAgent,
30 { label: string; hint: string }
31> = {
32 explainer: {
33 label: 'Explainer',
34 hint: 'What this repo is, and who it is for',
35 },
36 'package-map': {
37 label: 'Package map',
38 hint: 'Main packages and what each one does',
39 },
40 'first-hour': {
41 label: 'First hour',
42 hint: 'Clone, install, and run the first command',
43 },
45​
46export function isReportHarness(value: unknown): value is ReportHarness {
47 return typeof value === 'string' && value in REPORT_HARNESSES
49​
50export function isReportProvider(value: unknown): value is ReportProvider {
51 return typeof value === 'string' && value in REPORT_PROVIDERS
53​
54export function isReportAgent(value: unknown): value is ReportAgent {
55 return typeof value === 'string' && value in REPORT_AGENTS
57​
58export function isReportAuthMode(value: unknown): value is ReportAuthMode {
59 return typeof value === 'string' && value in REPORT_AUTH_MODES
61​
62export const REPORT_REPO = 'TanStack/ai'