Skip to content

feat(cli): add contract evidence export to bap trace#29

Open
pyyush wants to merge 1 commit intomainfrom
feat/trace-contract-evidence
Open

feat(cli): add contract evidence export to bap trace#29
pyyush wants to merge 1 commit intomainfrom
feat/trace-contract-evidence

Conversation

@pyyush
Copy link
Contributor

@pyyush pyyush commented Mar 25, 2026

Summary

  • Add bap trace --export-evidence to generate normalized skill-contract evidence from session traces
  • Map all 26 BAP commands and 13 action/* subtypes into evidence format
  • Direct action/* calls now appear in evidence.runtime.actions alongside agent/act composite actions
  • Add trace-recorder requestSummary capture for richer evidence extraction
  • Refresh both SKILL.md files with contract blocks

No changeset

Intentional — ships with v1.0. buildContractEvidence is internal (not in package exports field). 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

  • skill-tools: skill-tools/skill-tools#12 — defines the contract schema this evidence feeds into
  • skills.menu: Lint rule count synced separately

Test plan

  • pnpm test --filter @browseragentprotocol/cli — 111 tests pass
  • New test verifies direct action/* calls appear in both tools and actions
  • CI passes on this PR

v1.0 action item

Decide whether buildContractEvidence should be promoted to public API (add to exports field + docs).

🤖 Generated with Claude Code

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant