Skip to content

Add agenttrace package for Agent Trace schema support#3

Open
TanGentleman wants to merge 3 commits into
CorridorSecurity:mainfrom
TanGentleman:add-agenttrace
Open

Add agenttrace package for Agent Trace schema support#3
TanGentleman wants to merge 3 commits into
CorridorSecurity:mainfrom
TanGentleman:add-agenttrace

Conversation

@TanGentleman

@TanGentleman TanGentleman commented Feb 7, 2026

Copy link
Copy Markdown

Summary

  • Adds agenttrace/ package implementing the Agent Trace v0.1.0 open specification for tracing AI-generated code
  • Provides Go types (TraceRecord, File, Conversation, Range, Contributor, Tool, Vcs) matching the JSON schema exactly
  • Includes a thread-safe Recorder for accumulating file edits from hookshot handlers and building trace records
  • Adds WriteTrace/ReadTrace for JSON file I/O (stdlib only, zero new dependencies)
  • Updates the multi-hook example to demonstrate integration with OnAfterFileEdit

Test plan

  • go build ./... compiles all packages
  • go test ./... passes (types round-trip, recorder workflow, store I/O)
  • go vet ./... clean

@corridor-security corridor-security Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary: This PR adds an agenttrace package for recording and (optionally) storing JSON trace records and updates the example hook to record edited file paths for attribution; no new command execution, network calls, or privileged operations are introduced.

Risk: Low risk. The changes operate on in-memory data and file I/O only, with the example merely recording file paths without writing or executing them, and no new externally exposed surfaces are added.

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