feat(cli): add contract evidence export to bap trace#29
Open
Conversation
Add `bap trace --export-evidence` to generate normalized skill-contract evidence from session traces. Maps all 26 BAP commands and 13 action/* subtypes. Direct action/* calls now appear in evidence.runtime.actions alongside agent/act composite actions. Also adds trace-recorder requestSummary capture and refreshes SKILL.md contract blocks. No changeset — ships with v1.0. buildContractEvidence is internal (not in package exports). Evidence output change is additive, not breaking. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
bap trace --export-evidenceto generate normalized skill-contract evidence from session tracesaction/*subtypes into evidence formataction/*calls now appear inevidence.runtime.actionsalongsideagent/actcomposite actionsrequestSummarycapture for richer evidence extractionNo changeset
Intentional — ships with v1.0.
buildContractEvidenceis internal (not in packageexportsfield). Evidence output change is additive, not breaking. Evidence format is versioned (version: 1). Bumping all 6 linked packages 0.9.0→0.9.1 before v1.0 is unnecessary noise.Cross-repo
Test plan
pnpm test --filter @browseragentprotocol/cli— 111 tests passaction/*calls appear in bothtoolsandactionsv1.0 action item
Decide whether
buildContractEvidenceshould be promoted to public API (add toexportsfield + docs).🤖 Generated with Claude Code