Conversation
Add Pydantic request models for GitHunter toolset: - BlameLineRequest for blame_line tool - FindPRDiscussionRequest for find_pr_discussion tool - GetExpertsRequest for get_file_experts tool - Error model for union return types All models use Annotated[..., Field(...)] pattern with validators. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add tools.py with PydanticAI tool wrappers for GitHunter: - blame_line: Get blame info for a specific line - find_pr_discussion: Find PR discussion for a commit - get_file_experts: Get file experts by commit frequency All tools use RunContext[GitHunterProtocol] for dependency injection and catch GitHunterError to return Error model. Exports githunter_toolset for BondAgent integration. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add comprehensive tests for GitHunter tool functions: - TestBlameLine: success, file not found, line out of range, repo not found - TestFindPRDiscussion: success, None case, rate limited, repo not found - TestGetFileExperts: success, empty list, repo not found, file not found Includes MockGitHunter implementing GitHunterProtocol for testing. All 13 tests pass with mypy and ruff checks. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update __init__.py to export: - githunter_toolset for BondAgent integration - BlameLineRequest, FindPRDiscussionRequest, GetExpertsRequest - Error model for union return types Add GitHunter section to docs/api/tools.md with: - Protocol documentation - Type documentation (BlameResult, FileExpert, PRDiscussion, AuthorProfile) - Request model documentation - Toolset documentation Verified: - Imports work: from bond.tools.githunter import githunter_toolset - mkdocs build --strict passes - All 51 GitHunter tests pass Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Create src/bond/trace/ module with: - TraceEvent: Frozen dataclass for all 8 StreamHandlers callbacks - TraceMeta: Metadata for trace listing without loading events - TraceStorageProtocol: @runtime_checkable interface for backends Event types: block_start, block_end, text_delta, thinking_delta, tool_call_delta, tool_execute, tool_result, complete Both models have to_dict/from_dict for JSON serialization. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add JSONFileTraceStore implementing TraceStorageProtocol:
- Stores events as newline-delimited JSON ({trace_id}.json)
- Stores metadata separately ({trace_id}.meta.json)
- Supports save_event, finalize_trace, load_trace, list_traces, delete_trace
- AsyncIterator for memory-efficient trace loading
Dependencies:
- Add aiofiles>=24.0.0 for async file operations
- Add types-aiofiles>=24.0.0 for mypy stubs
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add create_capture_handlers() that wires all 8 StreamHandlers callbacks to record TraceEvents with sequence numbers for ordering. Features: - Auto-generates trace_id UUID if not provided - Uses monotonic clock for relative timestamps - Sync callbacks schedule async saves via event loop - finalize_capture() helper marks trace complete/failed Pattern follows create_websocket_handlers() from utils.py. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add TraceReplayer class with: - Async iteration support (async for event in replayer) - Manual stepping: step(), step_back() - Position seeking: seek(position), reset() - Properties: position, total_events, current() Events loaded on-demand and cached for stepping operations. Fix protocol: load_trace is async generator, not async function. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add comprehensive unit tests for trace module (62 tests): - test_models.py: TraceEvent/TraceMeta serialization - test_json_store.py: JSONFileTraceStore operations - test_capture.py: create_capture_handlers factory - test_replay.py: TraceReplayer navigation - Export trace types from bond package __init__.py - Add docs/api/trace.md with API reference - Add Trace Persistence section to docs/architecture.md - Add trace to mkdocs.yml navigation Closes fn-3.5 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
All fn-3 tasks complete. Forensic Features epic finished. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add proper ```python and ```json fencing to all Example: sections in docstrings so mkdocstrings renders them with syntax highlighting - Fix Message Types section in utils.py to use ```json block - Create docs/guides/githunter.md with usage guide for GitHunter toolset - Add Guides section to mkdocs.yml navigation Files fixed: - src/bond/utils.py (3 sections) - src/bond/trace/capture.py (2 examples) - src/bond/trace/backends/json_file.py (1 example) - src/bond/tools/githunter/tools.py (3 examples) - src/bond/tools/schema/tools.py (4 examples) - src/bond/tools/memory/tools.py (4 examples) - src/bond/tools/memory/backends/pgvector.py (1 example) - src/bond/tools/memory/backends/qdrant.py (1 example) - src/bond/tools/memory/backends/__init__.py (1 example) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add .pre-commit-config.yaml with hooks for: - ruff format --check (matches CI lint job) - ruff check (matches CI lint job) - mypy (matches CI typecheck job) - Add pre-commit>=3.5.0 to dev dependencies - Fix ruff format issues in 5 files - Fix unused imports in test_json_store.py Install: uv run pre-commit install Run manually: uv run pre-commit run --all-files Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace frozen dataclasses with Pydantic BaseModel for unified serialization with the Memory subsystem. This removes manual to_dict/from_dict methods in favor of Pydantic's model_dump/model_validate methods. Co-Authored-By: Claude Opus 4.5 <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
Changes
GitHunter Toolset
_models.pywith request models (SearchRequest, ContentRequest, CommitRequest)tools.pywithcreate_githunter_toolset()factorybond.tools.githunterTrace System
TraceEventandTraceMetadataclasses for event captureTraceStorageProtocolfor pluggable storage backendsJSONFileTraceStorefor file-based persistencecreate_capture_handlers()factory for recordingTraceReplayerwith step/seek/iterate navigationTest plan
pytest tests/unit/)uv run ruff checkpassesuv run mypy src/bond/passesmkdocs build --strictpasses🤖 Generated with Claude Code