Description
Partio currently stores full JSONL session data in git objects on the checkpoint branch. For large sessions this means fetching/reading the full event stream to get a summary view. A compact transcript.jsonl containing only normalized turn-level entries (user prompt + assistant response, stripped of internal tool calls) would make session browsing faster and reduce storage cost for downstream consumers.
This is the approach taken in entireio/cli (changelog 0.5.2, PRs #828, #788, #781).
What to implement
- Add a
checkpoints_v2 boolean field to the Config type (default: false) as a feature flag.
- When the flag is enabled, after writing the full checkpoint blob, also write a compact
transcript.jsonl to a v2 ref path (e.g. refs/partio/checkpoints/v2/<repo-id>).
- The compact transcript format: one JSON object per turn, each with
{"role": "user"|"assistant", "ts": "...", "content": "..."}. Strip raw tool-call events and internal events; keep only conversation-level content.
- The v2 ref write must use the same git plumbing approach (hash-object, mktree, commit-tree, update-ref) as the existing checkpoint storage.
- Add a unit test for the compact transcript generation from a sample JSONL session.
Acceptance Criteria
- When
checkpoints_v2 feature flag is enabled, a compact transcript.jsonl is written to a v2 ref layout alongside the full session JSONL
- The compact transcript contains normalized, per-turn entries (user prompt + assistant response) instead of raw JSONL events
- The v2 ref layout uses a stable path structure (e.g.
refs/partio/checkpoints/v2/main)
- When
checkpoints_v2 is disabled (default), no v2 refs are written — existing behavior is unchanged
make test passes
make lint passes
Source
Inspired by entireio/cli changelog 0.5.2 (PRs #828, #788, #781)
Description
Partio currently stores full JSONL session data in git objects on the checkpoint branch. For large sessions this means fetching/reading the full event stream to get a summary view. A compact
transcript.jsonlcontaining only normalized turn-level entries (user prompt + assistant response, stripped of internal tool calls) would make session browsing faster and reduce storage cost for downstream consumers.This is the approach taken in entireio/cli (changelog 0.5.2, PRs #828, #788, #781).
What to implement
checkpoints_v2boolean field to theConfigtype (default: false) as a feature flag.transcript.jsonlto a v2 ref path (e.g.refs/partio/checkpoints/v2/<repo-id>).{"role": "user"|"assistant", "ts": "...", "content": "..."}. Strip raw tool-call events and internal events; keep only conversation-level content.Acceptance Criteria
checkpoints_v2feature flag is enabled, a compacttranscript.jsonlis written to a v2 ref layout alongside the full session JSONLrefs/partio/checkpoints/v2/main)checkpoints_v2is disabled (default), no v2 refs are written — existing behavior is unchangedmake testpassesmake lintpassesSource
Inspired by entireio/cli changelog 0.5.2 (PRs #828, #788, #781)