Conversation
- Add json_sanitize.py module - Convert np.float32/64 → Python float - Convert np.int32/64 → Python int - Convert np.ndarray → Python list - Recursive sanitization for nested structures - Comprehensive unit tests (23 tests) Phase 1 of v0.10.0 implementation.
- Wrap all video tool returns with sanitize_json() - Add import for json_sanitize module - Add output sanitization tests (9 tests) Phase 2 of v0.10.0 implementation.
- Add streaming_video_analysis to capabilities - Update version to 0.10.0 - Add streaming capability to all video tools - Add manifest tests (10 tests) Phase 3 of v0.10.0 implementation.
- Remove signature inspection tests (outdated) - Add test for NEW API success path - Add test for fallback to OLD API when NEW fails - Add test for RuntimeError when both APIs fail Tests now match the actual implementation in tracking.py.
Add success/result envelope to all tool returns for v0.10.1 compatibility.
Changes:
- Frame tools return: {"success": True, "result": data}
- Video tools return: {"success": True, "result": {"total_frames", "frames"}}
- Error paths return: {"success": False, "error": message}
Fixes streaming JSON parsing errors and batch video job failures.
Restores v0.9.7 behavior with proper JSON envelope.
Amp-Thread-ID: https://ampcode.com/threads/T-019ca950-82ea-774e-b222-0e4123b8ca09
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019cb5d7-0737-7619-91f7-381f01705cd6 Co-authored-by: Amp <amp@ampcode.com>
… import errors Defer importing team.py and transformers until actually needed, preventing torch.__spec__ errors during test collection on CPU environments. Amp-Thread-ID: https://ampcode.com/threads/T-019cb5d7-0737-7619-91f7-381f01705cd6 Co-authored-by: Amp <amp@ampcode.com>
Video tool functions (_tool_video_ball_detection, _tool_video_pitch_detection,
_tool_video_radar) were wrapping results in {'success': True, 'result': ...}
while _run_video_tool already wrapped the same way, causing double nesting.
Also fix test expectations to unwrap single result envelope correctly.
Amp-Thread-ID: https://ampcode.com/threads/T-019cb5d7-0737-7619-91f7-381f01705cd6
Co-authored-by: Amp <amp@ampcode.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
Add missing
[project]table to root pyproject.toml for plugin validation and pre-commit hook compatibility.Changes
Testing
Checklist