/** * Project-scoped context builder for the Chat pane's system prompt. * * The spec calls for a fixed-format block injected server-side into every * /api/ai/chat request: * - path * - detected capabilities * - last 10 git commits * - README excerpt (first 500 chars) * * When no project is selected, the block falls back to a station-level * description — nostr-station's version + a hint that doctor/config/relay * questions are welcome. Enough so the assistant stays anchored instead * of replying with empty-slate generalities. * * Reads are fresh per chat turn (git log is the most volatile input, so * caching it would just stale). Costs are tiny (~one git invocation + a * 500-byte file read). */ export interface AiContext { text: string; source: 'project' | 'station'; projectId?: string; projectName?: string; } /** * Build the context block for a given projectId (or null/missing → station * scope). Never throws — missing files / git errors just trim the block. */ export declare function buildAiContext(projectId?: string | null): AiContext;