Sources Class Model

Sources Class Model An architecture diagram generated by Archify. WebRuntime Upload · SourceUploadPipeline · Architecture component · loop-bound WebRuntime Upload SourceUploadPipeline loop-bound Scotty Upload · start · finalize · Architecture component Scotty Upload start · finalize NotebookLMClient · composition root · Architecture component NotebookLMClient composition root Neutral SourcesAPI · _sources.py · shared workflows · Architecture component · one contract Neutral SourcesAPI _sources.py · shared workflows one contract WebSourcesAPI · _web/sources/ · Architecture component WebSourcesAPI _web/sources/ SourceAddService · one send · inspect if unknown · Architecture component SourceAddService one send · inspect if unknown SourcePoller · shared readiness loop · Architecture component SourcePoller shared readiness loop AndroidSourcesAPI · _android/sources.py · Architecture component AndroidSourcesAPI _android/sources.py AndroidRuntime Upload · control + data plane · Architecture component AndroidRuntime Upload control + data plane Source · _types/sources.py · Architecture component · mutable dataclass Source _types/sources.py mutable dataclass SourceStatus · UNKNOWN · PROCESSING · READY · Architecture component · ERROR · PREPARING SourceStatus UNKNOWN · PROCESSING · READY ERROR · PREPARING constructs subclass subclass add_file resumable add_url wait hook add_file returns status Legend Backend Database Cloud

Hoisted workflows

  • • Neutral _sources.py owns lookup, readiness polling, and post-upload finalization
  • • WebSourcesAPI and AndroidSourcesAPI implement one backend hook contract

Upload pipeline

  • • WebRuntime and AndroidRuntime own their corresponding upload pipelines
  • • Each pipeline keeps its own upload semaphore and dedicated client

Duplicate safety

  • • SourceAddService sends each mutation once; callers inspect only after an unknown outcome
  • • Text adds stay non-idempotent unless the caller dedupes externally