feat(trace): Copilot skills, spec pointers, and pasted images (M2)
Merged
MI
1mo ago+1831+1831+0123456789012345678901234567890123456789-38-38-01234567890123456789
This PR builds M2 of the plan for GitHub Copilot support in Chainloop Trace (docs/plans/issue-3800-copilot-trace-provider.md): R-008, R-009, and R-010 for these requirements.
- Skills tracking (R-008): the Copilot provider records each skill that the session loaded, from the
skill.invokedevents of the Copilot event log, and captures each skill folder through the shared skill pipeline. A skill listing does not count as a use. - Spec source pointers (R-009): exact copies of stored spec sources are replaced with pointers: full
viewreads, shell reads withcat(also in a combined output, at line boundaries),createcalls, andapply_patchcalls that add one file. Copilot also logs the input of each Trace hook inhook.startrecords, and the same copies there are replaced. Partial reads, changed content, failed tool calls, and other edits stay inline. - Pasted image pointers (R-009): each distinct image that the user attached is stored once as "Pasted image N", and the data of its
session.binary_assetrecord is replaced with a pointer. An image that a tool gives the model stays inline. - End-to-end suite (R-010): the Copilot harness attaches pasted images with
--attachment, so the pasted image check runs headless. The viewer-pointer, inline-copy, and skill-package checks that Codex uses now apply to Copilot too. The compatibility tables show the new Copilot cells. - Cache token accounting: the end-to-end check now compares the stored Copilot token counts with the per-call
session.usage_recordevents of the event log, so the Copilot cell moves from Unknown to Yes.
Differences from the plan:
- No separate
transcript.go: the extensions read the event types ofparse.go. - The Codex e2e checks are made to apply to Copilot, instead of a Copilot copy of them.
- The
catmatching helpers are copied from the Codex provider, not moved to a shared package.
Not verified:
- A skill that the user starts with a slash command. Prompt mode sends the slash command to the model as text, so only skills that the model loads are checked.
- The manual VS Code check, and the open question of the spec about the VS Code event log.
@matiasinsaurralde could you take a look?
Refs #3800
AI disclosure: Claude Code helped to research, implement, and test this change.
š¤ Generated with Claude Code