- Add UUID validation to traces/threads commands to prevent confusion
when users mistakenly pass trace/thread IDs instead of directory paths
- Add --include-metadata and --include-feedback flags to trace command
for consistency with traces command (both now default to off)
- Update tests to cover new validation and flag behavior
The fetch_recent_threads function was using as_completed() which returns
futures in completion order (non-deterministic), not in chronological
order. This caused test failures where threads would be returned in
the wrong order.
Added sorting after all futures complete to restore the original
chronological ordering from the runs query.
- Simplify quickstart section with concise examples
- Add usage-example.jpg image
- Add metadata/feedback flag examples
- Create comprehensive flags table
- Clean up project UUID configuration section
- Update test count from 50 to 71
- Remove config set command (project-name + project-uuid must be paired)
- Remove config set tests
The config set command was removed because the config now stores both
project-name and project-uuid atomically. Allowing users to set just
the UUID would create inconsistent state. Users can edit the YAML file
directly if needed.
When saving traces to a directory without --include-metadata flag,
trace_data is a list of messages rather than a dict. Added type
checking to handle both cases correctly.
Also added comprehensive tests for the traces command directory
output mode, which was previously untested.
- Show progress bar for single trace fetches (removed optimization that skipped it)
- Add concurrent fetching with progress bar to threads command
- Add --no-progress and --max-concurrent flags to threads command
- Progress bar now displays "Fetching X/Y traces..." or "Fetching X/Y threads..."
Improves UX by providing visual feedback for all fetch operations,
even when fetching a single item.
- Make metadata and feedback fetching opt-in (default: OFF)
- Changes default from include_metadata=True to False in fetch_recent_traces
- Changes default from include_feedback=True to False
- Improves single trace fetch time from ~4-5s to ~3s
- Add optional flags for metadata/feedback
- Add --include-metadata flag to traces command
- Add --include-feedback flag to traces command
- Allows users to opt-in when they need extra data
- Standardize config keys to hyphen format
- Normalize all config keys to hyphen format (project-uuid, project-name)
- Update set_config_value() to convert underscores to hyphens
- Add cleanup logic to remove duplicate underscore keys
- Fixes bug where both project-uuid and project_uuid existed in config
Performance impact: Single trace fetch improved from 4-5s to ~3s by
eliminating unnecessary metadata/feedback API calls by default.
Add CONFIGURATION section to main help and reorganize config examples
to prominently display 'config show' command, making it easier for users
to discover how to check their current configuration.
- Fix test_cli.py assertions to check for lowercase message types (human/user)
instead of uppercase (HUMAN/USER) to match formatter output
- Fix test_fetchers.py mock run objects to include required attributes
(feedback_stats, start_time, end_time, extra) to prevent "Mock object
is not iterable" errors
- Add include_metadata=False and include_feedback=False to
fetch_recent_traces test calls for backward-compatible behavior
All 61 tests now pass, including in clean environment (CI-compatible).
Store project name alongside UUID in config to detect staleness.
When LANGSMITH_PROJECT changes, automatically re-fetch UUID and update config.
Changes:
- Add _update_project_config() helper for atomic config updates
- Rewrite get_project_uuid() with sync detection logic
- Clear in-memory cache when project_uuid manually set
- Update priority: LANGSMITH_PROJECT_UUID > sync check > config fallback
Benefits:
- Automatic UUID sync when project name changes
- No API call when project unchanged (string comparison only)
- Backwards compatible with legacy configs
- Explicit override via LANGSMITH_PROJECT_UUID still works
Tests:
- Add 10 comprehensive test cases for sync detection
- Fix existing tests to clear env vars for config fallback
- All 71 tests passing
- Add metadata extraction (status, timing, tokens, costs, custom fields)
- Implement smart feedback fetching (only when feedback exists)
- Create new fetcher functions with metadata support
- Update formatters to display metadata and feedback in all formats
- Update all CLI commands (trace, thread, traces, threads)
- Add comprehensive migration guide in README
- Bump version to 0.3.0
BREAKING CHANGE: Output format changed from list to structured dict with messages, metadata, and feedback keys