feat(parser): support Cline CLI sessions - #1722
Conversation
roborev: Combined Review (
|
248670e to
8dd516e
Compare
roborev: Combined Review (
|
8dd516e to
0a0c101
Compare
roborev: Combined Review (
|
0a0c101 to
d3a09c0
Compare
roborev: Combined Review (
|
Add discovery, parsing, remote sync, and SSH sync support for Cline CLI sessions stored in ~/.cline/data/sessions/. Extracts user and assistant messages, thinking text, tool calls, and per-message token metrics while preserving authoritative total costs, and scopes SSH sync to curated session files.
d3a09c0 to
d1c8546
Compare
roborev: Combined Review (
|
…line Enforce physical root containment for Cline data and data/sessions ancestors in HTTP remote sync and SSH resolution. Reject session IDs containing backslashes to prevent tar escape processing, and prevent clineResolveSessionsDir from falling back to scanning the entire configured root when data/sessions is absent.
roborev: Combined Review (
|
…inked roots Handle attempt_completion as a terminal tool in classifyClineTermination so completed Cline sessions are marked TerminationClean. Reject symlinks at configured Cline roots and direct sessions roots in both SSH and HTTP remote sync resolvers, with root-symlink parity tests.
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
Adds discovery, synchronization, and parsing support for Cline CLI task sessions stored in
~/.cline/data/sessions/.What it does
<sessionId>/<sessionId>.json(metadata, exit code) and<sessionId>/<sessionId>.messages.json(transcript), skipping dot- and underscore-prefixed directories.inputTokens,outputTokens,cacheReadTokens,cacheWriteTokens) from assistant turns for multi-step breakdown and peak context tracking.metadata.totalCost(including explicit zero costs) via non-duplicating aggregate usage events.read_files,replace_in_file) into canonical taxonomy categories.CLINE_DIRenv var,cline_dirsconfig key), UI metadata, and format provenance documentation indocs/internal/session-format-sources.md.Review hardening
.secret), directory separators, and..traversal in session IDs.ContentRawwhile normalizing array-shapedtool_resultcontent blocks.Tradeoffs and Limits
~/.cline/data/sessions/<id>/). Cline VS Code extension sessions stored in extensionglobalStorageare not tracked by this provider.Where to look
internal/parser/cline.go: Session and message parsing, token metrics extraction, authoritative cost preservation, and tool call pairing.internal/parser/cline_provider.go: Directory discovery, path classification, and traversal guards.internal/remotesync/resolve.go: Remote target resolution and empty-root retention for stale eviction.internal/ssh/resolve.go: SSH resolution script emitting curated session files and safe root markers.docs/internal/session-format-sources.md: Format provenance and upstream Cline schema evidence.