The pi adapter (src/adapters/pi.ts) is derived from pi's docs and source and validated against a synthetic fixture built to it (fixtures/pi/ (generate/ builds the session and its golden)). It has not been run against a real pi session — the adapter header says so. If you use pi, this is the most useful thing you can do for the adapter, and it needs no code unless the real log disagrees.
Steps
npm install -g agitsh.
- agit import — the log lives at
~/.pi/agent/sessions/--<cwd>--/*.jsonl.
- On what it imported:
agit ls, agit show <id>, agit verify <id>, agit replay <id> --timeline.
Report
- pi version.
- The import's summary line: events written, and the skipped counters by name — every record the adapter could not map is counted by its native type, never guessed at. An unmapped type that carries something a reader would want is the finding.
- Whether what you see matches what pi did: message order, tool calls paired with their results,
write results verified verbatim, edit via details.patch, complete read results tagged (native.readOf, native.complete) so fork can recover a base from them.
agit verify result, and whether a second agit import of the same file says "already imported" (byte-identical re-import).
Paste sanitized snippets (keys and shapes, not content) — a session log holds whatever the agent saw — and never attach a raw one. If the real log contradicts the adapter, the adapter is what gets fixed, not the fixture (CONTRIBUTING.md); tests go in test/pi-adapter.test.ts.
The pi adapter (src/adapters/pi.ts) is derived from pi's docs and source and validated against a synthetic fixture built to it (fixtures/pi/ (
generate/builds the session and its golden)). It has not been run against a real pi session — the adapter header says so. If you use pi, this is the most useful thing you can do for the adapter, and it needs no code unless the real log disagrees.Steps
npm install -g agitsh.~/.pi/agent/sessions/--<cwd>--/*.jsonl.agit ls,agit show <id>,agit verify <id>,agit replay <id> --timeline.Report
writeresults verified verbatim,editviadetails.patch, completereadresults tagged (native.readOf,native.complete) soforkcan recover a base from them.agit verifyresult, and whether a secondagit importof the same file says "already imported" (byte-identical re-import).Paste sanitized snippets (keys and shapes, not content) — a session log holds whatever the agent saw — and never attach a raw one. If the real log contradicts the adapter, the adapter is what gets fixed, not the fixture (CONTRIBUTING.md); tests go in test/pi-adapter.test.ts.