Open History to see the last commit
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' },
16}
17
18export const REPORT_PROVIDERS: Record<ReportProvider, { label: string }> = {
19 docker: { label: 'Docker' },
20 local: { label: 'Local process' },
21}
22
23export const REPORT_AUTH_MODES: Record<ReportAuthMode, { label: string }> = {
24 'api-key': { label: 'API key' },
25 host: { label: 'Host login' },
26}
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 },
44}
45
46export function isReportHarness(value: unknown): value is ReportHarness {
47 return typeof value === 'string' && value in REPORT_HARNESSES
48}
49
50export function isReportProvider(value: unknown): value is ReportProvider {
51 return typeof value === 'string' && value in REPORT_PROVIDERS
52}
53
54export function isReportAgent(value: unknown): value is ReportAgent {
55 return typeof value === 'string' && value in REPORT_AGENTS
56}
57
58export function isReportAuthMode(value: unknown): value is ReportAuthMode {
59 return typeof value === 'string' && value in REPORT_AUTH_MODES
60}
61
62export const REPORT_REPO = 'TanStack/ai'