pub fn ingest_pi_transcript_delta(
project_dir: &Path,
session_id: &str,
cwd: &Path,
transcript_path: &Path,
) -> Result<PiIngestStats>Expand description
Ingest a Pi session transcript file incrementally into project_dir.
- Reads new lines using a session-specific cursor (
pi_transcript_cursor.{session_id}.json). - Appends raw transcript lines to
transcripts/{session_id}.jsonl. - Normalizes tool calls, tool results, and user prompts into
ledger/{session_id}.jsonl. - Updates
state/usage.jsonwith observed model and token totals.