You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Everything a route needs beyond the request itself. Passed explicitly to
* each route-registration function rather than attached to the Fastify
* instance via a plugin/decorator — with this few routes, an explicit
* parameter is more traceable than "where did `app.db` get set?"
*/
export interface ServerDeps {
db: Kysely<DB>;
repoRoot: string;
projectName: string;
/** The id of the `AIProvider` resolved at startup (`"gemini"`, `"anthropic"`, ...), or `null` if none was configured — see `bootstrap.ts`. Routes that need AI (`/api/v1/analyze`, draft generation) check this before enqueueing work that could only fail. */
providerId: string | null;
/** The model to request from that provider — `@procni/ai`'s `DEFAULT_MODEL_BY_PROVIDER` entry for `providerId`, until per-provider settings storage (`provider_configs`) is wired up. */