trustgraph/docs/tech-specs
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
..
__TEMPLATE.md Add template (#463) 2025-08-21 14:50:57 +01:00
architecture-principles.md More config cli (#466) 2025-08-22 13:36:10 +01:00
cassandra-consolidation.md Feature/consolidate cassandra config (#483) 2025-09-03 23:41:22 +01:00
cassandra-performance-refactor.md Collection delete pt. 3 (#542) 2025-09-30 16:02:33 +01:00
collection-management.md Address legacy issues in storage management (#595) 2026-01-05 13:45:14 +00:00
entity-centric-graph.md Entity-centric graph (#633) 2026-02-16 13:26:43 +00:00
extraction-time-provenance.md Agent explainability tech specs (#655) 2026-02-28 14:44:18 +00:00
flow-class-definition.md Fix config inconsistency (#609) 2026-01-14 12:31:40 +00:00
flow-configurable-parameters.md Fix config inconsistency (#609) 2026-01-14 12:31:40 +00:00
graph-contexts.md Changed schema for Value -> Term, majorly breaking change (#622) 2026-01-27 13:48:08 +00:00
graphql-query.md Feature/graphql table query (#486) 2025-09-03 23:39:11 +01:00
graphrag-performance-optimization.md Graph rag optimisations (#527) 2025-09-23 21:05:51 +01:00
import-export-graceful-shutdown.md Fix import export graceful shutdown (#476) 2025-08-28 13:39:28 +01:00
jsonl-prompt-output.md Feature/prompts jsonl (#619) 2026-01-26 17:38:00 +00:00
large-document-loading.md Incremental / large document loading (#659) 2026-03-04 16:57:58 +00:00
logging-strategy.md Loki logging (#586) 2025-12-09 23:24:41 +00:00
mcp-tool-arguments.md More config cli (#466) 2025-08-22 13:36:10 +01:00
mcp-tool-bearer-token.md MCP auth for the simple case (#557) 2025-11-11 12:28:53 +00:00
minio-to-s3-migration.md Change MinIO integration options in librarian to be more generic - to support a Garage integration (#594) 2025-12-27 18:01:51 +00:00
more-config-cli.md More config cli (#466) 2025-08-22 13:36:10 +01:00
multi-tenant-support.md Address legacy issues in storage management (#595) 2026-01-05 13:45:14 +00:00
neo4j-user-collection-isolation.md Feature/neo4j user collection isolation (#509) 2025-09-10 22:11:21 +01:00
ontology-extract-phase-2.md Feature/improve ontology extract (#576) 2025-12-03 13:36:10 +00:00
ontology.md OntoRAG: Ontology-Based Knowledge Extraction and Query Technical Specification (#523) 2025-11-12 20:38:08 +00:00
ontorag.md Update tech spec (#558) 2025-11-13 16:29:20 +00:00
openapi-spec.md REST API OpenAPI spec (#612) 2026-01-15 11:04:37 +00:00
pubsub.md Messaging fabric plugins (#592) 2025-12-17 21:40:43 +00:00
python-api-refactor.md Python API implements streaming interfaces (#577) 2025-12-04 17:38:57 +00:00
query-time-provenance.md Agent explainability tech specs (#655) 2026-02-28 14:44:18 +00:00
rag-streaming-support.md Streaming rag responses (#568) 2025-11-26 19:47:39 +00:00
schema-refactoring-proposal.md More config cli (#466) 2025-08-22 13:36:10 +01:00
streaming-llm-responses.md Feature/streaming llm phase 1 (#566) 2025-11-26 09:59:10 +00:00
structured-data-2.md Row embeddings APIs exposed (#646) 2026-02-23 21:52:56 +00:00
structured-data-descriptor.md Structured data loader cli (#498) 2025-09-05 15:38:18 +01:00
structured-data-schemas.md More config cli (#466) 2025-08-22 13:36:10 +01:00
structured-data.md Remove graphql collection param (#489) 2025-09-04 10:04:09 +01:00
structured-diag-service.md Structure data diagnosis service (#518) 2025-09-16 21:43:23 +01:00
tool-group.md Feature/tool group (#484) 2025-09-03 23:39:49 +01:00
tool-services.md Tool services - dynamically pluggable tool implementations for agent frameworks (#658) 2026-03-04 14:51:32 +00:00
vector-store-lifecycle.md Fix hard coded vector size (#555) 2025-11-10 16:56:51 +00:00