Sources Class Model

Sources Class Model An architecture diagram generated by Archify. SourceUploadPipeline · own client + semaphore · Architecture component · loop-bound SourceUploadPipeline own client + semaphore loop-bound Scotty Upload · start · finalize · Architecture component Scotty Upload start · finalize NotebookLMClient · composition root · Architecture component NotebookLMClient composition root SourcesAPI · abstract base · Architecture component · ABC SourcesAPI abstract base ABC WebSourcesAPI · _web/sources/ · Architecture component WebSourcesAPI _web/sources/ SourceAddService · probe then create · Architecture component SourceAddService probe then create DriveImportService · fetch + confirm · Architecture component DriveImportService fetch + confirm AndroidSourcesAPI · _android/sources.py · Architecture component AndroidSourcesAPI _android/sources.py AndroidUploadPipeline · control + data plane · Architecture component AndroidUploadPipeline control + data plane Source · _types/sources.py · Architecture component · frozen Source _types/sources.py frozen SourceStatus · READY · PROCESSING · Architecture component · int + Enum SourceStatus READY · PROCESSING int + Enum constructs subclass subclass add_file resumable add_url drive refs add_file returns status Legend Backend Database Cloud

Inheritance

  • • SourcesAPI is an ABC; both backends return the same frozen Source
  • • WebSourcesAPI and its pipeline share one CallSupervisor

Upload pipeline

  • • The pipeline is a phased transport-lifecycle participant, not a plain helper
  • • It holds its own upload semaphore and a dedicated httpx client

Duplicate safety

  • • SourceAddService wraps URL and Drive mutations in idempotent_create
  • • Text adds stay non-idempotent unless the caller dedupes externally