import: fix cursor per-turn IDs and copilot numeric timestamps

main

Commit

computermode2mo ago

Cursor transcript lines carry only role + message — no per-turn uuid or timestamp — so DeriveCheckpointID collided on an empty UUID and every turn after the first was skipped as a duplicate, with CreatedAt always zero. Key each turn by its line index (the Codex pattern) and fall back to the file modtime for CreatedAt (the Factory/Gemini pattern). Fixtures now match the real on-disk format.

Copilot timestamps may be numeric epoch-millis, not only RFC3339 strings. Decoding into a string field made json.Unmarshal fail on numeric values, hitting the defensive skip and importing zero turns for the session. Decode the timestamp as json.RawMessage and parse it with the agent's dual-format parser (exported as copilotcli.ParseTimestamp).

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com Entire-Checkpoint: 217723121355

Checkpoints

Following work done in https://github.com/entireio/cli/pull/1527, we want to extend the import capabilities to detect the other agents we support, including gemini, opencode, codex etc. Use existing p

Claude CodeOpus 4.8
View session
Checkpoint 1

Fix the PR according to the review comments on https://github.com/entireio/cli/pull/1540

Claude CodeOpus 4.8
View session
Checkpoint 1