Adapter — Gemini Files API + generateContent client.
Converts a DriveFile (bytes + MIME from the Drive adapter) into a
validated AnalyzeResponse using:
POST /upload/v1beta/files — upload bytes, get a file URI and state.
GET /v1beta/{file.name} — poll until state === 'ACTIVE' (video only).
POST /v1beta/models/{model}:generateContent — structured JSON response.
Single source of truth: PERSON_FIELDS (in the domain layer) drives
the Gemini responseSchema produced here, the Zod schema validated against,
and the SYSTEM_INSTRUCTION prompt.
Adapter — Gemini Files API + generateContent client.
Converts a DriveFile (bytes + MIME from the Drive adapter) into a validated AnalyzeResponse using:
POST /upload/v1beta/files— upload bytes, get a file URI andstate.GET /v1beta/{file.name}— poll untilstate === 'ACTIVE'(video only).POST /v1beta/models/{model}:generateContent— structured JSON response.Single source of truth: PERSON_FIELDS (in the domain layer) drives the Gemini
responseSchemaproduced here, the Zod schema validated against, and the SYSTEM_INSTRUCTION prompt.