Skip to content

Run the pi adapter against a real session #155

Description

@Chirag6722

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

  1. npm install -g agitsh.
  2. agit import — the log lives at ~/.pi/agent/sessions/--<cwd>--/*.jsonl.
  3. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    adapterSupport for another agent runtime's session logsgood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions