trustgraph/trustgraph-flow/trustgraph
cybermaggedon a630e143ef
Incremental / large document loading (#659)
Tech spec

BlobStore (trustgraph-flow/trustgraph/librarian/blob_store.py):
- get_stream() - yields document content in chunks for streaming retrieval
- create_multipart_upload() - initializes S3 multipart upload, returns
  upload_id
- upload_part() - uploads a single part, returns etag
- complete_multipart_upload() - finalizes upload with part etags
- abort_multipart_upload() - cancels and cleans up

Cassandra schema (trustgraph-flow/trustgraph/tables/library.py):
- New upload_session table with 24-hour TTL
- Index on user for listing sessions
- Prepared statements for all operations
- Methods: create_upload_session(), get_upload_session(),
  update_upload_session_chunk(), delete_upload_session(),
  list_upload_sessions()

- Schema extended with UploadSession, UploadProgress, and new
  request/response fields
- Librarian methods: begin_upload, upload_chunk, complete_upload,
  abort_upload, get_upload_status, list_uploads
- Service routing for all new operations
- Python SDK with transparent chunked upload:
  - add_document() auto-switches to chunked for files > 10MB
  - Progress callback support (on_progress)
  - get_pending_uploads(), get_upload_status(), abort_upload(),
    resume_upload()

- Document table: Added parent_id and document_type columns with index
- Document schema (knowledge/document.py): Added document_id field for
  streaming retrieval
- Librarian operations:
  - add-child-document for extracted PDF pages
  - list-children to get child documents
  - stream-document for chunked content retrieval
  - Cascade delete removes children when parent is deleted
  - list-documents filters children by default
- PDF decoder (decoding/pdf/pdf_decoder.py): Updated to stream large
  documents from librarian API to temp file
- Librarian service (librarian/service.py): Sends document_id instead of
  content for large PDFs (>2MB)
- Deprecated tools (load_pdf.py, load_text.py): Added deprecation
  warnings directing users to tg-add-library-document +
  tg-start-library-processing

Remove load_pdf and load_text utils

Move chunker/librarian comms to base class

Updating tests
2026-03-04 16:57:58 +00:00
..
agent Tool services - dynamically pluggable tool implementations for agent frameworks (#658) 2026-03-04 14:51:32 +00:00
chunking Incremental / large document loading (#659) 2026-03-04 16:57:58 +00:00
config/service Fix config inconsistency (#609) 2026-01-14 12:31:40 +00:00
cores Fixed flows/flow key issue in config (#616) 2026-01-16 00:10:44 +00:00
decoding Incremental / large document loading (#659) 2026-03-04 16:57:58 +00:00
direct Entity-centric graph (#633) 2026-02-16 13:26:43 +00:00
embeddings Structured data 2 (#645) 2026-02-23 15:56:29 +00:00
external Implement logging strategy (#444) 2025-07-30 23:18:38 +01:00
extract Structured data 2 (#645) 2026-02-23 15:56:29 +00:00
gateway Row embeddings APIs exposed (#646) 2026-02-23 21:52:56 +00:00
librarian Incremental / large document loading (#659) 2026-03-04 16:57:58 +00:00
metering Fix config inconsistency (#609) 2026-01-14 12:31:40 +00:00
model Use model in Azure LLM integration (#657) 2026-03-04 12:06:06 +00:00
processing Fix/startup failure (#445) 2025-07-30 23:42:11 +01:00
prompt Feature/streaming llm phase 1 (#566) 2025-11-26 09:59:10 +00:00
query Fix mismatching ge-query / graph-embeddings-query service idents (#648) 2026-02-24 12:17:29 +00:00
retrieval Structured data 2 (#645) 2026-02-23 15:56:29 +00:00
rev_gateway Messaging fabric plugins (#592) 2025-12-17 21:40:43 +00:00
storage Structured data 2 (#645) 2026-02-23 15:56:29 +00:00
tables Incremental / large document loading (#659) 2026-03-04 16:57:58 +00:00
template Feature/prompts jsonl (#619) 2026-01-26 17:38:00 +00:00
tool_service Tool services - dynamically pluggable tool implementations for agent frameworks (#658) 2026-03-04 14:51:32 +00:00
__init__.py Feature/pkgsplit (#83) 2024-09-30 19:36:09 +01:00