mempalace.sources.warp
Source: mempalace/sources/warp.py
Warp terminal source adapter.
Ingests Warp terminal command history and AI queries from Warp's local SQLite database (default ~/.local/state/warp-terminal/warp.sqlite) into the palace as :class:DrawerRecord instances.
Warp stores two classes of valuable data:
Commands — shell command history grouped by
session_id. Each session becomes onesource_fileof the shapewarp://<absolute-db-path>#session=<session_id>. Commands within a session are rendered chronologically as a terminal transcript and chunked for palace storage.AI queries — Warp AI conversations keyed by
conversation_id. Each conversation becomes onesource_fileof the shapewarp://<absolute-db-path>#ai=<conversation_id>. Query/response pairs are rendered as exchange-pair markdown.
Both sources support incremental ingest via file mtime versioning.
Classes
class WarpSourceAdapter(BaseSourceAdapter)
Mine Warp terminal command history and AI queries into the palace.
__init__
def __init__(self) -> Nonedescribe_schema
def describe_schema(self) -> AdapterSchemaingest
def ingest(self, *, source: SourceRef, palace: PalaceContext) -> Iterator[object]is_current
def is_current(self, *, item: SourceItemMetadata, existing_metadata: Optional[dict]) -> boolsource_summary
def source_summary(self, *, source: SourceRef) -> SourceSummaryclose
def close(self) -> NoneFunctions
session_source_file
def session_source_file(db_path: str, session_id: str) -> strConstruct the stable per-session source_file identifier.
ai_source_file
def ai_source_file(db_path: str, conversation_id: str) -> strConstruct the stable per-AI-conversation source_file identifier.
