arborist/aborist
russell@unturf.com 9ba06cd809
add Grok export source: conversations + media posts
aborist/sources/grok.py exposes two Source subclasses for ingesting
xAI's user data export:

  GrokExportSource    walks ttl/<period>/export_data/<user-id>/ and
                      reads prod-grok-backend.json. Yields one Document
                      per conversation with:
                        - URI: grok://conversation/<conversation-id>
                        - title: the conversation's auto-generated title
                        - content: full message text in turn order
                      source_type='grok_export'.

  GrokMediaPostsSource same export, but yields per media-generation
                      post (image/video prompts) under URI
                      grok://media/<post-id>.
                      source_type='grok_media'.

Both auto-walk down from the export root so callers can pass the
top-level directory xAI delivered (e.g., ~/Downloads/<user-uuid>/).

Wired into the CLI: aborist ingest --source {grok_export,grok_media}
accepts --path <export-root>. tests/test_grok_source.py covers the
walk + parse + Document shape with a fabricated mini-export fixture.

Once ingested, conversations become normal queryable docs in the
shard cluster — your prior chats become memory the corpus can
consult during RAG.

79 tests passing.
2026-04-27 13:49:42 -04:00
..
distill ETL throughput: 4x parser, 2.5x full ingest 2026-04-27 08:51:52 -04:00
qa three relevance signals: title + TF-IDF cores + body density 2026-04-27 13:39:29 -04:00
search strict retrieval: AND + title-required filter 2026-04-27 12:21:35 -04:00
sources add Grok export source: conversations + media posts 2026-04-27 13:49:42 -04:00
__init__.py phase 0 explore: aborist core + sources + distill + evict 2026-04-27 07:53:18 -04:00
cli.py add Grok export source: conversations + media posts 2026-04-27 13:49:42 -04:00
document.py phase 0 explore: aborist core + sources + distill + evict 2026-04-27 07:53:18 -04:00
evict.py phase 0 explore: aborist core + sources + distill + evict 2026-04-27 07:53:18 -04:00
ingest.py progress reporter + structured benchmark 2026-04-27 11:37:20 -04:00
merkle.py phase 0 explore: aborist core + sources + distill + evict 2026-04-27 07:53:18 -04:00
progress.py progress reporter + structured benchmark 2026-04-27 11:37:20 -04:00
source.py phase 0 explore: aborist core + sources + distill + evict 2026-04-27 07:53:18 -04:00
store.py resumable ingest + per-shard audit chain integrity 2026-04-27 11:29:27 -04:00