feat(files): add source-file upload with MinIO storage and Postgres repositories
Why: - Implements plan 001 Phase 3's upload orchestration. Changes: - ObjectStorage port and MinIO adapter, thread-offloaded per ADR-0017. - Tenant-scoped repositories for api_keys, source_files, ingestion_jobs. - upload_source_file implementing the two-transaction shape with (tenant_id, domain, content_sha256) idempotency. Impact: - This phase stores bytes only -- chunks_indexed is always 0 until Phase 4/5 add parsing/embedding.
This commit is contained in:
19
src/application/files/__init__.py
Normal file
19
src/application/files/__init__.py
Normal file
@@ -0,0 +1,19 @@
|
||||
"""Source-file upload and status use cases (ADR-0008, ADR-0009, ADR-0017)."""
|
||||
|
||||
from src.application.files.errors import FilesError, FileTooLargeError, InvalidUploadError
|
||||
from src.application.files.models import UploadResult, ValidatedUpload
|
||||
from src.application.files.status import FileStatusResult, get_file_status
|
||||
from src.application.files.upload import upload_source_file
|
||||
from src.application.files.validation import validate_and_hash_upload
|
||||
|
||||
__all__ = [
|
||||
"FileStatusResult",
|
||||
"FileTooLargeError",
|
||||
"FilesError",
|
||||
"InvalidUploadError",
|
||||
"UploadResult",
|
||||
"ValidatedUpload",
|
||||
"get_file_status",
|
||||
"upload_source_file",
|
||||
"validate_and_hash_upload",
|
||||
]
|
||||
Reference in New Issue
Block a user